		// Elite Sounds
		// Nicholas Antonucci, 2004
		
	function doPopup(url, name,w,h)
	{
		popUpWindow=null
		x = ((screen.width/2)-w/2);
		y = ((screen.height/2)-h/2);
	
		args = "alwaysRaised=yes,dependent=yes,width="+w.toString()+",Height="+h.toString()+",innerwidth="+w.toString()+",innerHeight="+h.toString()+",screenX="+x.toString()+",screenY="+y.toString();
		popUpWindow=window.open(url, name ,args);
		popUpWindow.focus();
	}
	
	
	function doVirtualPopup(url, name,w,h)
	{
		popUpWindow=null
		x = ((screen.width/2)-w/2);
		y = ((screen.height/2)-h/2);	
		args = "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,status=no,alwaysRaised=yes,dependent=yes,width="+w.toString()+",Height="+h.toString()+",innerwidth="+w.toString()+",innerHeight="+h.toString()+",screenX="+x.toString()+",screenY="+y.toString();
		popUpWindow=window.open(url, name ,args);
		popUpWindow.focus();
	}

	
	function doSimulationPopup(url, name,w,h)
	{	
		x = ((screen.width/2)-w/2);
		y = ((screen.height/2)-h/2);
		args = "scrollbars=yes,alwaysRaised=yes,dependent=yes,width="+w.toString()+",Height="+h.toString()+",innerwidth="+w.toString()+",innerHeight="+h.toString()+",screenX="+x.toString()+",screenY="+y.toString();
		popUpWindow=window.open(url, name, args);
		popUpWindow.focus();
	}
	
   function resizeOuterTo(w,h) 
   {
	   if (parseInt(navigator.appVersion)>3) {
	   if (navigator.appName=="Netscape") {
	   top.outerWidth=w;
	   top.outerHeight=h;
	   }
	   else top.resizeTo(w,h);
	   }
   }
		//Position
		var target = ""
		var bannerBottom = 203
		
		var openings = new Array("about", "career", "apply", "community")
		var closeings = new Array("about", "career", "apply", "community")
		
		var numberOfItems = new Array("about", "career", "apply", "community")
		var menus= new Array("about", "career", "apply", "community")
		var ieClippingHeight = new Array("about", "career", "apply", "community")
		
		var acCount = 0
	
	 if (navigator.appVersion.indexOf("MSIE 5.01") != -1)
			jamesAnomaly = true
		else
		 	jamesAnomaly = false
			
		var initXpoz  = new Array("about", "career", "apply", "community")
		
		function setXPozs(a,b,c,d)
		{
			 initXpoz["about"]= a
			 initXpoz["career"] = b
			 initXpoz["apply"] = c
			 initXpoz["community"] = d
		}
		
		function fixTheJamesAnomaly()
		{
			if (jamesAnomaly)
			{
				initXpoz["about"]=  initXpoz["about"]+8
				 initXpoz["career"] =  initXpoz["career"]+8
				 initXpoz["apply"] =  initXpoz["apply"]+8
				 initXpoz["community"] =  initXpoz["community"]+1
				 jamesAnomaly = false
			}
		}
		
		function setup()
		{
			
			if (document.all)
			{
				menus["about"] = document.all["about2"].style;
				menus["career"] = document.all["career2"].style;
				menus["apply"] = document.all["apply2"].style;
				menus["community"] = document.all["community2"].style;
				
				document.recalc() 
				w = document.body.clientWidth
				
				if (w>700)
				{
					//window.alert(navigator.appVersion.indexOf("MSIE 5.01"))
					
					//fixTheJamesAnomaly()
					if (navigator.appVersion.indexOf("MSIE 5.01") == -1)
						offset = (w-700)/2-1
					else
						offset = (w-700)/2-9
					
					menus["about"].left = initXpoz["about"]+offset
					menus["career"].left =initXpoz["career"]+offset
					menus["apply"].left = initXpoz["apply"]+offset
					menus["community"].left = initXpoz["community"]+offset
				}
				else
				{
					fixTheJamesAnomaly()
					if (navigator.appVersion.indexOf("MSIE 5.01") == -1)
						offset = -1
					else
						offset = -9
					menus["about"].left = initXpoz["about"]+offset
					menus["career"].left =initXpoz["career"]+offset
					menus["apply"].left = initXpoz["apply"]+offset
					menus["community"].left = initXpoz["community"]+offset
				}
				
				fixTheJamesAnomaly()
				
			}
			else
			{
				menus["about"] = document.layers["about"];
				menus["career"] =  document.layers["career"];
				menus["apply"] =  document.layers["apply"];
				menus["community"] =  document.layers["community"];
				
				w =window.innerWidth
				
				if (w>700)
				{
					offset = ((w-700)/2)+3
					menus["about"].x =initXpoz["about"] + offset-1
					menus["career"].x =initXpoz["career"] + offset-1
					menus["apply"].x =initXpoz["apply"] + offset-1
					menus["community"].x =initXpoz["community"] + offset-1
					
					document.layers["menuHeadabout"].x =initXpoz["about"] + offset
					document.layers["menuHeadcareer"].x =initXpoz["career"] + offset
					document.layers["menuHeadapply"].x =initXpoz["apply"] + offset
					document.layers["menuHeadcommunity"].x =initXpoz["community"] + offset
				}
				else
				{
					offset =2
					menus["about"].x =initXpoz["about"] + offset
					menus["career"].x =initXpoz["career"] + offset
					menus["apply"].x =initXpoz["apply"] + offset
					menus["community"].x =initXpoz["community"] + offset
					
					document.layers["menuHeadabout"].x =initXpoz["about"] + offset
					document.layers["menuHeadcareer"].x =initXpoz["career"] + offset
					document.layers["menuHeadapply"].x =initXpoz["apply"] + offset
					document.layers["menuHeadcommunity"].x =initXpoz["community"] + offset
				}
			
			document.layers["menuHeadabout"].visibility = "show"
			document.layers["menuHeadcareer"].visibility = "show"
			document.layers["menuHeadapply"].visibility = "show"
			document.layers["menuHeadcommunity"].visibility = "show"
			setAllToClosed()
			}

		

		}
		

		function setNumberOfItems(menuid,n)
		{
			numberOfItems[menuid] = n
		}

		function setAllToClosed()
		{
			if (document.all )
			{
				menus["about"].visibility = "hidden"
				menus["about"].top = bannerBottom-(1+26*numberOfItems["about"]);
				ieClippingHeight["about"]  =(1+26*numberOfItems["about"]);
				
				menus["career"].visibility = "hidden"
				menus["career"].top = bannerBottom-(1+26*numberOfItems["career"]);
				ieClippingHeight["career"] = (1+26*numberOfItems["career"]);
				
				menus["apply"].visibility = "hidden"
				menus["apply"].top = bannerBottom-(1+26*numberOfItems["apply"]);
				ieClippingHeight["apply"]  = (1+26*numberOfItems["apply"]);
				
				menus["community"].visibility = "hidden"
				menus["community"].top = bannerBottom-(1+26*numberOfItems["community"]);
				ieClippingHeight["community"]  = (1+26*numberOfItems["community"]);
			}
			else
			{
				menus["about"].visibility = "hide"
				menus["about"].y = bannerBottom-(1+26*numberOfItems["about"]);
				menus["about"].clip.top = (1+26*numberOfItems["about"]);
				
				menus["career"].visibility = "hide"
				menus["career"].y = bannerBottom-(1+26*numberOfItems["career"]);
				menus["career"].clip.top = (1+26*numberOfItems["career"]);
				
				menus["apply"].visibility = "hide"
				menus["apply"].y = bannerBottom-(1+26*numberOfItems["apply"]);
				menus["apply"].clip.top = (1+26*numberOfItems["apply"]);
				
				menus["community"].visibility = "hide"
				menus["community"].y = bannerBottom-(1+26*numberOfItems["community"]);
				menus["community"].clip.top = (1+26*numberOfItems["community"]);
			}
		}

		function doOpen(menuid)
		{
			if (target == "")
			{
				if (document.all )
					delay = 20
				else
					delay = 10
				
				acCount = 0
		
				if (window.closeings[menuid])
					clearInterval(closeings[menuid])
				
				openTread(menuid)
					
				if (menuid == "about")
					openings[menuid]=setInterval("openAboutTread()",delay)
				else if (menuid == "career")
					openings[menuid]=setInterval("openCareerTread()",delay)
				else if (menuid == "apply")
					openings[menuid]=setInterval("openApplyTread()",delay)
				else if (menuid == "community")
					openings[menuid]=setInterval("openCommunityTread()",delay)
	
				if (document.all)
					menus[menuid].visibility = "visible"
				else
					menus[menuid].visibility = "show"
			}

			// Nicholas Antonucci 2004 - stop Helper SELECT boxes obscuring menus
			//if (((menuid == "community") || (menuid == "apply")) && (document.frmHelper)) {
				//if (document.all) {
					//document.frmHelper.selType.style.visibility = "hidden";
					//document.frmHelper.selSubject.style.visibility = "hidden";
				//} else {
					//document.frmHelper.selType.visibility = "hidden";
					//document.frmHelper.selSubject.visibility = "hidden";
				//}
			//}
		}
		
		function doClose(menuid)
		{
			if (document.all )
				delay = 20
			else
				delay = 10
				
			acCount = 0
		
			clearInterval(openings[menuid])
			if (menuid == "about")
				closeings[menuid]=setInterval("closeAboutTread()",delay)
			else if (menuid == "career")
				closeings[menuid]=setInterval("closeCareerTread()",delay)
			else if (menuid == "apply")
				closeings[menuid]=setInterval("closeApplyTread()",delay)
			else if (menuid == "community")
				closeings[menuid]=setInterval("closeCommunityTread()",delay)


			// Nicholas Antonucci 2004 - stop Helper SELECT boxes obscuring menus
			//if (((menuid == "community") || (menuid == "apply")) && (document.frmHelper)) {
				//if (document.all) {
					//document.frmHelper.selType.style.visibility = "visible";
					//if (document.frmHelper.selSubject.length > 0) {
						//document.frmHelper.selSubject.style.visibility = "visible";
					//}
				//} else {
					//document.frmHelper.selType.visibility = "visible";
					//if (document.frmHelper.selSubject.length > 0) {
						//document.frmHelper.selSubject.visibility = "visible";
					//}
				//}
			//}
		}
	
		
		function openTread(menuid)
		{


		 	if (document.all )
				x = 10
			else
				x = 5
		
			if (document.all && menus[menuid].pixelTop<=bannerBottom-x)
			{
				menus[menuid].pixelTop=menus[menuid].pixelTop+x;
				ieClippingHeight[menuid] = ieClippingHeight[menuid]-x
				menus[menuid].clip = 'rect(' + ieClippingHeight[menuid] + ' auto auto 0)';
			}
			else if (document.layers && menus[menuid].y<bannerBottom-x)
			{
				menus[menuid].clip.top = menus[menuid].clip.top-x;
				menus[menuid].moveBy(0,x);
			}
			else
			{	
				clearInterval(openings[menuid])
				
				if (document.all)
				{
					adjust = menus[menuid].pixelTop - bannerBottom
					menus[menuid].pixelTop=bannerBottom-3
					ieClippingHeight[menuid] = ieClippingHeight[menuid]+adjust+3
					menus[menuid].clip = 'rect(' + ieClippingHeight[menuid] + ' auto auto 0)';
				}
				else
				{
					adjust = menus[menuid].y - bannerBottom
					menus[menuid].clip.top = menus[menuid].clip.top+adjust+3
					menus[menuid].y = bannerBottom-3
				}
			}
		}
		
		
		
		function closeTread(menuid)
		{

			if (target != "")
			{
				if (document.all )
					x = 20
				else
					x = 10
			}
			else
			{
				if (document.all )
						x = 8
					else
						x = 4
			}
			
			if (document.all && ieClippingHeight[menuid] < 26*numberOfItems[menuid])
			{
					ieClippingHeight[menuid] = ieClippingHeight[menuid]+x
					menus[menuid].clip = 'rect(' + ieClippingHeight[menuid] + ' auto auto 0)';
					menus[menuid].pixelTop=menus[menuid].pixelTop-x;
			}
			else if (document.layers && menus[menuid].clip.height>x)
			{
					menus[menuid].clip.top = menus[menuid].clip.top+x;
					menus[menuid].moveBy(0,-x);
			}
			else 
			{
				clearInterval(closeings[menuid])
				if (document.all)
					menus[menuid].visibility = "hidden"
				else
					menus[menuid].visibility = "hide"
					
				if (target != "")
				{
					window.location.href = target
					target = ""
				}
			}

		}
		
		function openAboutTread(){openTread("about")}
		function closeAboutTread() {closeTread("about")}
		function openCareerTread(){openTread("career")}
		function closeCareerTread() {closeTread("career")}
		function openApplyTread(){openTread("apply")}
		function closeApplyTread() {closeTread("apply")}
		function openCommunityTread(){openTread("community")}
		function closeCommunityTread() {closeTread("community")}


		function itemSelected(url,menuid)
		{
			target = url
			doClose(menuid)
		}
		
