	var days = new Array('SUN','MON','TUE','WED','THU','FRI','SAT');
	var months = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
	
	function FormatDate(date) { 	
	   if (date == "")
	      return null;
		else
		{   var d = new Date(date);
			if (!d)
			   return null;
			else
			   return ((days[d.getDay()]) + "  " + (months[d.getMonth()]) + " " + d.getDate()); 
		}
	}
		
	// Get the Yahoo! weather feed (xml)
	function getWeather() {
        var http_request = false;
        var path = 'forecastrss?p=49757';
        var url = 'php_proxy_simple.php?yws_path=' + encodeURIComponent(path);
        
		if (window.XMLHttpRequest) { // Mozilla, Safari, ...
           http_request = new XMLHttpRequest();
		   if (http_request.overrideMimeType) {
              http_request.overrideMimeType('text/xml');
           }
        } else if (window.ActiveXObject) { // IE
           try {
              http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                 try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                 } catch (e) {}
              }  
           }
		
        if (!http_request) {
            return false;
        }
        
        http_request.onreadystatechange = function() { getWeatherData(http_request); };
	    http_request.open('GET', url, true);
        http_request.send(null);
    }
    
	
	// Check for successful file open - If successful, build the weather table
    function getWeatherData(http_request) {
        if (http_request.readyState == 4) {
            if (http_request.status == 200) {
			  buildWeatherTable(http_request);
            } 
        }
	}
    
    
	// Get the data elements from the xml file & populate the weather table
	function buildWeatherTable(http_request)
	{	
		var xmldoc = http_request.responseXML;
		
		// Current Condition (Use the image for the current condition for today's forecast)
		var weatherdata = xmldoc.getElementsByTagName('yweather:condition');
		if (weatherdata.length == 0) {  
		   weatherdata = xmldoc.getElementsByTagName('condition');  }
			
		if (weatherdata.length > 0)	{	
		   var text = weatherdata[0].getAttribute('text');
		   var code = weatherdata[0].getAttribute('code');
		}		
		
		// Forecast
		weatherdata = xmldoc.getElementsByTagName('yweather:forecast');
		if (weatherdata.length == 0) {  
		   weatherdata = xmldoc.getElementsByTagName('forecast');  }
			
		for (i=0; i<weatherdata.length; i++) {	
		   var day = weatherdata[i].getAttribute('day');
		   var date = weatherdata[i].getAttribute('date');
		   var low = weatherdata[i].getAttribute('low');
		   var high = weatherdata[i].getAttribute('high');
		   if (i>0) {
		      var text = weatherdata[i].getAttribute('text');
			  var code = weatherdata[i].getAttribute('code');
			}
			
			if (text == 'Unknown')
			   text = "";
			   
			var weatherImage=document.getElementById('img' + i);
			weatherImage.src = "images/weather_icon_" + code + ".gif";
			weatherImage.alt=text;
			document.getElementById('date' + i).innerHTML = date;
			document.getElementById('hi' + i).innerHTML = high;
			document.getElementById('low' + i).innerHTML = low;
			document.getElementById('text' + i).innerHTML = text;
	   }
	}	



var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var oActivePanel = 1;
function myFlash_DoFSCommand(command, args) {
	var myFlashObj = InternetExplorer ? myFlash : document.myFlash;
	var oDining = document.getElementById('dining');
	var oAttractions = document.getElementById('attractions');
	if(!oDining || !oAttractions) return;
	
	var aPanels = [null, oDining, oAttractions];
	aPanels[oActivePanel].style.display = 'none';
	aPanels[args].style.display = 'block';
	oActivePanel = args;
}

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
  document.write('<SCRIPT LANGUAGE=VBScript\> \n');
  document.write('on error resume next \n');
  document.write('Sub myFlash_FSCommand(ByVal command, ByVal args)\n');
  document.write(' call myFlash_DoFSCommand(command, args)\n');
  document.write('end sub\n');
  document.write('</SCRIPT\> \n');
} 

function writeSWF(url, width, height, id) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '" title="", id="' + id + '">');
	document.write('<param name="movie" value="' + url + '">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<embed src="' + url + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '" wmode="transparent" name="' + id + '"></embed>');
	document.write('</object>');	
}

// JavaScript Document