//Global Nav's IE Hover fix
/*
	fnHover = function()
	{
		if (document.getElementById("nav")) {
			var objLists = document.getElementById("nav").getElementsByTagName("LI");
		
			for (var i=0; i<objLists.length; i++)
			{
				objLists[i].onmouseover=function()
				{
					this.className+=" iehover";
				}
				objLists[i].onmouseout=function()
				{
					this.className=this.className.replace(new RegExp(" iehover\\b"), "");
				}
			}
		}
	}



	if (window.attachEvent) window.attachEvent("onload", fnHover);
	*/

	// Global variables
	var url=location.pathname.toLowerCase();

	var qString=location.search.toLowerCase();
	var qStringArray=qString.split('id=');
	var id=qStringArray[1];
	var pgLoaded=false;
	if (qStringArray[1] == null) {
		id = "none";
	}
	//***************** Browser Checking **********************
	function ylib_Browser() {
	 d=document;
	 this.agt=navigator.userAgent.toLowerCase();
	 this.major = parseInt(navigator.appVersion);
	 this.dom=(d.getElementById)?1:0;
	 this.ns=(d.layers);
	 this.ns4up=(this.ns && this.major >=4);
	 this.ns6=(this.dom&&navigator.appName=="Netscape");
	 this.op=(window.opera? 1:0);
	 this.ie=(d.all);
	 this.ie4=(d.all&&!this.dom)?1:0;
	 this.ie4up=(this.ie && this.major >= 4);
	 this.ie5=(d.all&&this.dom);
	 this.win=((this.agt.indexOf("win")!=-1) || (this.agt.indexOf("16bit")!=-1));
	 this.mac=(this.agt.indexOf("mac")!=-1);
	}
	var oBw = new ylib_Browser();
	if (oBw.ns||oBw.op||(oBw.ns6&&oBw.agt.indexOf("6.0")!=-1)||(oBw.ns6&&oBw.agt.indexOf("6.1")!=-1)) {
	 //document.location.href = "http://sbc.yahoo.com/browser_upgrade.html";
	}
	//************** End Browser Checking **************


	//chrome setting
	var chromeColor = '#485a78';
	var chromeWidth = 831;
	var bCrumbLevel_1 = 'destinations';
	var bCrumbLevel_2_text = 'Disneyland Resort';
	var bCrumbLevel_2_url = 'http://disneyland.disney.go.com/dlr/index';
	var bCrumbLevel_3_text = null;
	var bCrumbLevel_3_url = null;
	var legalFooterColor = null;
	var legalFooterImg="disney_footer.png";
	var legalFooterImgLink="http://home.disney.go.com/index";
	var legalFtrOpts = ["<span style='font-family:Helvetica,sans-serif;'><i>Disneyland</i>® Resort Guest Services" , "http://disneyland.disney.go.com/dlm/common/externalLink?id=DisneylandResortGuestServicesExternalPage", "<i>Disneyland</i>® Resort Help</span>","http://disneyland.disney.go.com/dlm/common/externalLink?id=DisneylandResortHelpExternalPage"];
	var legalFtrLine1 = "<span style='font-family:Helvetica,sans-serif;'><i>Disneyland</i>® Meetings</span>";

	function popup(url,name,features){
		var w;
		w=window.open(url,name,features);
		w.focus();
	}

	function closeWindow() {
		window.close();
	}

	function printit(){
		if(oBw.ie5 || oBw.ns4up){
			window.print();
		}else{
			alert('To print this page you must click File and then click Print on the menu bar above.');
		}
	}

	/* go to other disney sites */
	function gotoOtherDisneySites()	{
		objSitesDropDown = document.getElementById('OtherDisneySitesSelFormField');
		selectedValue = objSitesDropDown.options[objSitesDropDown.options.selectedIndex].value;

		if (selectedValue != 'null' && selectedValue != null && selectedValue != ''){
			//location.href = selectedValue;
			popupWin = window.open(selectedValue,
			  'open_window', 'menubar, toolbar, location, directories, status, scrollbars, resizable, dependent, width=1040, height=880, left=0, top=0');
		}
	}

	function setCookie( name, value, path, domain, expires, secure ) {
		// set time, it's in milliseconds
		var today = new Date();
		today.setTime( today.getTime() );

		/*
		if the expires variable is set, make the correct 
		expires time, the current script below will set 
		it for x number of days, to make it for hours, 
		delete * 24, for minutes, delete * 60 * 24
		*/
		
		var expires_date = new Date( today.getTime() + (expires) );
		alert(expires_date);

		document.cookie = name + "=" +escape( value ) +
		( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
		( ( path ) ? ";path=" + path : "" ) + 
		( ( domain ) ? ";domain=" + domain : "" ) +
		( ( secure ) ? ";secure" : "" );
	}

	//toggle audio on or off
	function getCookie(c_name)
	{
		if (document.cookie.length>0)
		  {
		  c_start=document.cookie.indexOf(c_name + "=")
		  if (c_start!=-1)
			{ 
			c_start=c_start + c_name.length+1 
			c_end=document.cookie.indexOf(";",c_start)
			if (c_end==-1) c_end=document.cookie.length
			return unescape(document.cookie.substring(c_start,c_end))
			} 
		  }
		return ""
	}

	function toggleAudio(objImage)
	{
		volume = getCookie('VolumeOn');		
		audioOnOffObject = document.getElementById('GlobalToolbarAudioOnOffMedia');
		objActive = objGlobalToolbarAudioOnOffMediaRollover.activeImg;	
		objInactive = objGlobalToolbarAudioOnOffMediaRollover.inactiveImg;

		if (volume == '' || volume == 'false') {
			turnAudioOn();
		} else {
			turnAudioOff();			
		}
		
		objGlobalToolbarAudioOnOffMediaRollover.activeImg = objInactive;
		objGlobalToolbarAudioOnOffMediaRollover.inactiveImg = objActive;
	}

	function preLoadAudioImage()
	{
		objImage = document.getElementById("GlobalToolbarAudioOnOffMedia");
		if (objImage != null)
		{
			volume = getCookie('VolumeOn');	
			objActive = objGlobalToolbarAudioOnOffMediaRollover.activeImg;
			objInactive = objGlobalToolbarAudioOnOffMediaRollover.inactiveImg;
			
			if (volume == '' || volume == 'false') {
				objImage.src = objGlobalToolbarAudioOnOffMediaRollover.activeImg.src;
				objGlobalToolbarAudioOnOffMediaRollover.activeImg = objInactive;
				objGlobalToolbarAudioOnOffMediaRollover.inactiveImg = objActive;
			}
			
		}
	}

	window.onload = preLoadAudioImage;

	function turnAudioOn() {
		domain = ".go.com";
		path = "/";
		name = 'VolumeOn';
		value = "true";
		expires = "";
		secure = "";
		var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
		document.cookie = curCookie;
		// turn on the volume of any QT movies
		numberOfApplets = document.applets.length;
		for (i=0; i < numberOfApplets; i++) {
			tempCodebase = document.applets[i].getAttribute('codebase');
			if (tempCodebase.indexOf("apple") >= 0) {
				document.applets[1].setVolume(100);
			}
		}

	}
	function turnAudioOff() {
		domain = ".go.com";
		path = "/";
		name = 'VolumeOn';
		value = "false";
		expires = "";
		secure = "";
		var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
		document.cookie = curCookie;
		// turn off the volume of any QT movies
		numberOfApplets = document.applets.length;
		for (i=0; i < numberOfApplets; i++) {
			tempCodebase = document.applets[i].getAttribute('codebase');
			if (tempCodebase.indexOf("apple") >= 0) {
				document.applets[1].setVolume(0);
			}
		}

	}

	function flashParameters() {
		var swfId = mediaObjId;
		var swfPath = mediaObjPath;
		var swfPara = mediaObjParameters;
	}


	 