
	function MenuItemOver(){
		this.className ="DropDownItemOver";
	}

	function MenuItemOut(){
		this.className ="DropDownItemOut";
	}

	var Last_DropDownMenu  ;

	function ToggleMenu(MenuNum){
		HideMenu();
		if(!document.getElementById("DropDown_"+MenuNum)){
			return false;
		}
		Last_DropDownMenu=MenuNum;
		document.getElementById("DropDown_"+MenuNum).style.display="block";
		LeftOffset=document.getElementById("Top_Nav_Container").offsetLeft+document.getElementById("NavItem_"+MenuNum).offsetLeft;

		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;
				}

				if(document.getElementById("DropDown_"+MenuNum).offsetWidth<document.getElementById("NavItem_"+MenuNum).offsetWidth+12){
					document.getElementById("DropDown_"+MenuNum).style.width=document.getElementById("NavItem_"+MenuNum).offsetWidth+12;
					AllTables=document.getElementById("DropDown_"+MenuNum).getElementsByTagName("Table");
					AllTables[0].style.width="100%";
				}

				AllTables=document.getElementById("DropDown_"+MenuNum).getElementsByTagName("Table");
				AllTDs=AllTables[0].getElementsByTagName("TD");
				for(TD_Num=0;TD_Num<AllTDs.length;TD_Num++){
					AllTDs[TD_Num].className="DropDownItemOut";
					if (Mozilla){
						AllTDs[TD_Num].addEventListener("mouseover", MenuItemOver, false);
						AllTDs[TD_Num].addEventListener("mouseout", MenuItemOut, false);
					}else{
						AllTDs[TD_Num].attachEvent("onmouseover", MenuItemOver);
						AllTDs[TD_Num].attachEvent("onmouseout", MenuItemOut);
					}
				}

				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").addEventListener("mouseover", CancelEvent, false);
		}else if (window.attachEvent){
			document.body.attachEvent("onmouseover", HideMenu);
			document.getElementById("Top_Nav").attachEvent("onmouseover", CancelEvent);
		}
	}
