// Rev. 25/08/2008 New JS as per client changes

function ShowSubMenu(divid){
if(divid)
		{
			submenu		=	document.getElementById(divid+"block");
			objarr		=	document.getElementById(divid+"arrow");
			objtext		=	document.getElementById(divid+"text");
			if(objtext!=null)
			{
				objtext.style.color="#FFB500";
			}
			if(submenu!=null)
			{
				submenu.style.display="block";
			}
			if(objarr!=null)
			{
				objarr.innerHTML="<img src='images/arrow_leftnav_on3.gif' width='10' height='15' hspace='0' vspace='0' border='0'>";
			}
		}
	}

function HideSubMenu(divid){

		if(divid)
		{
			submenu		=	document.getElementById(divid+"block");
			objarr		=	document.getElementById(divid+"arrow");
			objtext		=	document.getElementById(divid+"text");
			submenu.style.display="none";
			objtext.style.color="white";
			objarr.innerHTML="<img src='images/arrow_leftnav_off.gif' width='10' height='15' hspace='0' vspace='0' border='0'>";
		}
		ShowSubMenu('stat'+document.getElementById('countMenu').value);
	}

function toggleArrow(divid){
	curr_id = divid.substr(0,5);
	objtext		=	document.getElementById(divid+"text");
	objarr		=	document.getElementById(divid+"arrow");
	if (objarr.innerHTML.match("_off")) {
	 objarr.innerHTML="<img src='images/arrow_leftnav_on3.gif' width='10' height='15' hspace='0' vspace='0' border='0'>";
	 objtext.style.color="#FFB500";
   } else {
	 objarr.innerHTML="<img src='images/arrow_leftnav_off.gif' width='10' height='15' hspace='0' vspace='0' border='0'>";
	 objtext.style.color="white";
   }
	}

function Expand() {
   divs=document.getElementsByTagName("div");
      
   for (i=0;i<divs.length;i++) {
     divs[i].style.display="block";
     key=document.getElementById("x" + divs[i].id);
    
     key.innerHTML="<img src='images/add_off.png' width='9' height='9' hspace='0' vspace='0' border='0'>";
   }
}

function Collapse() {
   divs=document.getElementsByTagName("div");
   for (i=0;i<divs.length;i++) {
     divs[i].style.display="none";
     key=document.getElementById("x" + divs[i].id);
     key.innerHTML="<img src='images/add_off.gif' width='16' height='16' hspace='0' vspace='0' border='0'>";
   }
}

