//menu objects

function onLoad() {
    window.onResize = onLoad;
    loadMenus();
}

function loadMenus () {
    window.menu1 = new Menu("Learn About 360");
    menu1.addMenuItem("company", "top.location='/Company/static.jsp'");
    menu1.addMenuItem("people", "top.location='/People/static.jsp'");
    menu1.addMenuItem("what's new", "top.location='/LatestNews/static.jsp'");
    menu1.addMenuItem("contact us", "top.location='/Home/contactus.jsp'");
    menu1.bgColor = "#c6e0ed";
    menu1.menuContainerBgColor = "#c6e0ed";
    menu1.menuHiliteBgColor = "#8DB1C7";
    menu1.menuItemBgColor = "#c6e0ed";
    menu1.onMenuItemOut = "hideMenu(this);";
	menu1.disableHide = false;
	
    window.menu2 = new Menu("360 Products");
    menu2.addMenuItem("quick fixes", "top.location='/QuickFix/Static/static.jsp'");
    menu2.addMenuItem("product inquiry", "top.location='/QuickFix/Inquiry/requestform.jsp'");
    menu2.bgColor = "#c6e0ed";
    menu2.menuContainerBgColor = "#c6e0ed";
    menu2.menuHiliteBgColor = "#8DB1C7";
    menu2.menuItemBgColor = "#c6e0ed";

    window.menu3 = new Menu("Operator Education");
    menu3.addMenuItem("operator education", "top.location='/Home/operatoreducation.jsp'");
    menu3.bgColor = "#c6e0ed";
    menu3.menuContainerBgColor = "#c6e0ed";
    menu3.menuHiliteBgColor = "#8DB1C7";
    menu3.menuItemBgColor = "#c6e0ed";

    window.menu4 = new Menu("Industry Links");
    menu4.addMenuItem("regulators", "top.location='/Home/regulators.jsp'");
    menu4.addMenuItem("associations", "top.location='/Associations/static.jsp'");
    menu4.addMenuItem("manufacturers", "top.location='/Manufacturers/static.jsp'");
    menu4.bgColor = "#c6e0ed";
    menu4.menuContainerBgColor = "#c6e0ed";
    menu4.menuHiliteBgColor = "#8DB1C7";
    menu4.menuItemBgColor = "#c6e0ed";

    window.menu5 = new Menu("Plant Tours");
    menu5.addMenuItem("plant tours", "top.location='/Home/planttours.jsp'");
    menu5.bgColor = "#c6e0ed";
    menu5.menuContainerBgColor = "#c6e0ed";
    menu5.menuHiliteBgColor = "#8DB1C7";
    menu5.menuItemBgColor = "#c6e0ed";

    menu5.writeMenus();
}

	var mnuSelected = '';
	var subMnuSelected = '';

	function showMenu(menu) {
		var left = 0;
		var width = 0;
		
		hideMenu(mnuSelected);

		if (menu == 'mnuLearn') {
			left = 0;
			width = 82;
		} else if (menu == 'mnuEducation') {
			left = 0;
			width = 159;
		} else if (menu == 'mnuLinks') {
			left = 173;
			width = 92;
		}

		top.window.document.getElementById(menu).style.top = 120;
		top.window.document.getElementById(menu).style.left = left;
		top.window.document.getElementById(menu).style.width = width;
		top.window.document.getElementById(menu).style.visibility = 'visible';

		mnuSelected = menu;
	}
	function hideMenu(menu){
		if(mnuSelected!='')
			top.window.document.getElementById(menu).style.visibility = 'hidden';
	}
	function showSubMenu(menu){
		hideSubMenu(subMnuSelected);
		top.window.document.getElementById(menu).style.visibility = 'visible';
		subMnuSelected = menu;
	}
	function hideSubMenu(menu){
		if(subMnuSelected!='')
			top.window.document.getElementById(menu).style.visibility = 'hidden';
	}
	function init(){
		top.window.document.getElementById('mnuLearn').style.left = 0;
		top.window.document.getElementById('mnuEducation').style.left = 44;
		top.window.document.getElementById('mnuLinks').style.left = 173;

		top.window.document.getElementById('mnuLearn').style.top = 0;
		top.window.document.getElementById('mnuEducation').style.top = 0;
		top.window.document.getElementById('mnuLinks').style.top = 0;
	}
	
	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}

	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}

	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}

	function MM_findObj(n, d) { //v4.0
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && document.getElementById) x=document.getElementById(n); return x;
	}	