

//展开、收缩菜单
function showsubmenu(sid)
{
	var whichEl = document.getElementById("submenu" + sid);
	var imageId = document.getElementById("imgMenu" + sid);
	var MenuICOId = document.getElementById("MenuICO" + sid);
	var strShow=true;
	 
	if (whichEl.style.display == "none")
	{
		whichEl.style.display="";
		imageId.src="images/Menu_close.gif";
		MenuICOId.src="images/openfolder.gif";
		
			 for (i=0; i<document.all.length; i++)
     {
        srcelement=document.all(i);
        if(srcelement.className=="MenuPIC"){
			var targetid=srcelement.id;
			var targetelement=document.all(targetid);
			var strbuf=srcelement.src;
			if(strbuf.indexOf("Menu_close.gif"))
			  strShow=false;				
			}			
	}
	}
	else
	{
		whichEl.style.display="none";
		imageId.src="images/Menu_open.gif";
		MenuICOId.src="images/Menufolder.gif";
		
	 for (i=0; i<document.all.length; i++)
     {
        srcelement=document.all(i);
        if(srcelement.className=="MenuPIC"){
			var targetid=srcelement.id;
			var targetelement=document.all(targetid);
			var strbuf=srcelement.src;
			if(strbuf.indexOf("Menu_open.gif"))
			 strShow=true;
						
		}			
	}
}
	
	
	var AllShowTitle=document.getElementById("AllShowTitle");
	if(strShow==true){
	   AllShowTitle.innerHTML = "";	
		}else if(strShow==false){
	   AllShowTitle.innerHTML = "";	
			}
	
}


//全部展开/收缩菜单
function AllShowsubmenu()
{
  var AllShowTitle=document.getElementById("AllShowTitle");
  
  for (i=0; i<document.all.length; i++)
  {
        srcelement=document.all(i);
        if(srcelement.className=="MenuPIC")
        {
			var targetid=srcelement.id;
			var targetelement=document.all(targetid);			
			var strbuf=srcelement.src;
			
			var strbufId=targetid.replace("imgMenu","");
			var whichEl = document.getElementById("submenu" + strbufId);
		    var MenuICOId = document.getElementById("MenuICO" + strbufId);
			
			if(AllShowTitle.innerHTML == ""){
					srcelement.src="images/Menu_open.gif";
					MenuICOId.src="images/Menufolder.gif";
					whichEl.style.display="none";
				}else{
					srcelement.src="images/Menu_close.gif";
					MenuICOId.src="images/openfolder.gif";				
					whichEl.style.display="";
				}
        }
   }
   
  if(AllShowTitle.innerHTML == "")
     AllShowTitle.innerHTML = "";
  else
     AllShowTitle.innerHTML = "";
}

