
	var Last_DropDownMenu  ;
	var Last_Nav_Num ;

	function ToggleMenu(MenuNum,Current_Page){
		HideMenu();
		if(!Current_Page){
			if(MenuNum !=Last_Nav_Num){
				document.getElementById("NavItem_"+MenuNum).className="Top_Nav_Over";
				Last_Nav_Num=MenuNum;
			}else{
				document.getElementById("NavItem_"+MenuNum).className="Top_Nav_Off";
				Last_Nav_Num="";
			}
		}

		if(!document.getElementById("DropDown_"+MenuNum)){
			return false;
		}
		Last_DropDownMenu=MenuNum;
		document.getElementById("DropDown_"+MenuNum).style.display="block";

		LeftOffset=document.getElementById("Page_Container").offsetLeft+document.getElementById("Top_Nav_Background").offsetLeft+document.getElementById("NavItem_"+MenuNum).offsetLeft+5;

		TotalWidth=LeftOffset+document.getElementById("DropDown_"+MenuNum).offsetWidth;
		if(TotalWidth>document.body.scrollWidth){
			LeftOffset=document.body.scrollWidth-document.getElementById("DropDown_"+MenuNum).offsetWidth -20;
		}

		document.getElementById("DropDown_"+MenuNum).style.left=LeftOffset;
	}

	function HideMenu(){
		if(Last_DropDownMenu){
			document.getElementById("DropDown_"+Last_DropDownMenu).style.display="none";
		}
	}

	function Initialize_Menu(){
		var MenuNum = 1;
		while(document.getElementById("NavItem_"+MenuNum)){
			if(document.getElementById("DropDown_"+MenuNum)){
				if(!Last_DropDownMenu){
					Last_DropDownMenu=MenuNum;
				}
				document.getElementById("DropDown_"+MenuNum).style.top=document.getElementById("Page_Container").offsetTop+document.getElementById("Top_Nav_Background").offsetTop+(document.getElementById("Top_Nav_Background").offsetHeight );
				if(document.getElementById("DropDown_"+MenuNum).offsetWidth<document.getElementById("NavItem_"+MenuNum).offsetWidth){
					document.getElementById("DropDown_"+MenuNum).style.width=document.getElementById("NavItem_"+MenuNum).offsetWidth;
					AllTables=document.getElementById("DropDown_"+MenuNum).getElementsByTagName("Table");
					AllTables[0].style.width="100%";
				}
				document.getElementById("DropDown_"+MenuNum).style.display="none";
				document.getElementById("DropDown_"+MenuNum).style.visibility="visible";
				if (window.addEventListener){
					document.getElementById("DropDown_"+MenuNum).addEventListener("mouseover", CancelEvent, false);
				}else if (window.attachEvent){
					document.getElementById("DropDown_"+MenuNum).attachEvent("onmouseover", CancelEvent);
				}
			}
			MenuNum++;
		}

		if (window.addEventListener){
			document.body.addEventListener("mouseover", HideMenu, false);
			document.getElementById("Top_Nav_Container").addEventListener("mouseover", CancelEvent, false);
		}else if (window.attachEvent){
			document.body.attachEvent("onmouseover", HideMenu);
			document.getElementById("Top_Nav_Container").attachEvent("onmouseover", CancelEvent);
		}
	}

	if (window.addEventListener){
		window.addEventListener("load", Initialize_Menu, false);
	}else if (window.attachEvent){
		window.attachEvent("onload", Initialize_Menu);
	}

