function hideMenuDiv(menu_id){
	document.getElementById('menu_' + menu_id).style.display = "none";
	document.getElementById('menuimg_' + menu_id).src = site_skin_images + "/menu_tree_arrow_right.gif";
}

function showMenuDiv(menu_id){
	document.getElementById('menu_' + menu_id).style.display = "block";
	document.getElementById('menuimg_' + menu_id).src = site_skin_images + "/menu_tree_arrow_down.gif";
}
	
function showHideMenu(menu_id){
	if(document.getElementById('menu_' + menu_id).style.display == "block") {
   		hideMenuDiv(menu_id);
    }
   	else{
       	showMenuDiv(menu_id);
    }
}

function menuCollapseExpand(){
	ex = document.getElementById("menuimg_ce");
	for(var i=0; i<menuNodes.length; i++){
		if(ex.menustate == "collapsed"){
			showMenuDiv(menuNodes[i]);
		}
		else{
			hideMenuDiv(menuNodes[i]);
		}
	}
	ex.menustate = ex.menustate == "collapsed"?"expanded":"collapsed";
	ex.src = site_skin_images + "/menu_tree_" + (ex.menustate=="collapsed"?"expand":"collapse") + ".gif";
}
