function rem(title, url)
{
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
alert('To Bookmark the Park and Go website please press Ctrl+D on your Keyboard.');
}

function drawHotelMenu(formtype)
{
if (formtype == "room") {form = '<option value="S10">Single - 1 Adult</option><option value="D20" selected="selected">Double - 2 Adults</option><option value="T20">Twin - 2 Adults</option><option value="T11">Twin - 1 Adult 1 Child</option><option value="T12">Triple - 1 Adult 2 Children</option><option value="T21">Triple - 2 Adults 1 Child</option><option value="T30">Triple - 3 Adults</option><option value="F13">Family - 1 Adult 3 Children</option><option value="F22">Family - 2 Adults 2 Children</option><option value="F23">Family - 2 Adults 3 Children</option><option value="F31">Family - 3 Adults 1 Child</option><option value="F32">Family - 3 Adults 2 Children</option>';}else{form = '<option value="" selected="selected">No, Thank You</option><option value="S10">Single - 1 Adult</option><option value="D20">Double - 2 Adults</option><option value="T20">Twin - 2 Adults</option><option value="T11">Twin - 1 Adult 1 Child</option><option value="T12">Triple - 1 Adult 2 Children</option><option value="T21">Triple - 2 Adults 1 Child</option><option value="T30">Triple - 3 Adults</option><option value="F13">Family - 1 Adult 3 Children</option><option value="F22">Family - 2 Adults 2 Children</option><option value="F23">Family - 2 Adults 3 Children</option><option value="F31">Family - 3 Adults 1 Child</option><option value="F32">Family - 3 Adults 2 Children</option>';}
document.write(form);
}

function alternate(id){ 
 if(document.getElementsByTagName){  
   var table = document.getElementById(id);   
   var rows = table.getElementsByTagName("tr");   
   for(i = 0; i < rows.length; i++){           
 //manipulate rows 
     if(i % 2 == 0){ 
       rows[i].className = "even"; 
     }else{ 
       rows[i].className = "odd"; 
     }       
   } 
 } 
}

function submitForm(documentation) {

w = window.open(documentation.action, "Documentation", 'width=710,height=500,resizable=1,scrollbars=1,menubar=1,toolbar=1');
w.focus();
documentation.submit();
}

function saveMenu(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readMenu(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function loadMenu()
{
var MenuString = readMenu("menu");
if (MenuString) {
var MenuArray=MenuString.split(":");
document.parking.Airport.value = MenuArray[0]; 
document.parking.fromday.value = MenuArray[1]; 
document.parking.frommonth.value = MenuArray[2]; 
document.parking.fromyear.value = MenuArray[3]; 
document.parking.today.value = MenuArray[4]; 
document.parking.tomonth.value = MenuArray[5]; 
document.parking.toyear.value = MenuArray[6]; 
}
}

function setDates()
{
	var ms = 86400000;
	var today = new Date();

	var dateInMS = today.getTime() + (ms*1);
	var fromDate = new Date(dateInMS);

	var dateInMS = fromDate.getTime() + (ms*7);
	var toDate = new Date(dateInMS);

	document.parking.fromday.value = fromDate.getDate();
	document.parking.frommonth.value = fromDate.getMonth() + 1;
	document.parking.fromyear.value = fromDate.getFullYear();

	document.parking.today.value = toDate.getDate();
	document.parking.tomonth.value = toDate.getMonth() + 1;
	document.parking.toyear.value = toDate.getFullYear();
}

function changeDates()
{
	var ms = 86400000;
	var fromDate=new Date();
	fromDate.setDate(document.parking.fromday.value);
	fromDate.setMonth(document.parking.frommonth.value-1);  
	fromDate.setYear(document.parking.fromyear.value); 

	var dateInMS = fromDate.getTime() + (ms*7);
	var toDate = new Date(dateInMS);

	document.parking.today.value = toDate.getDate();
	document.parking.tomonth.value = toDate.getMonth() + 1;
	document.parking.toyear.value = toDate.getFullYear();
}



var currentid=new Array();

function ShowMinfo(id)
{
if (currentid[0] != null) {
	HideMinfo(currentid[0]);
	}
    
currentid[0]=id;

	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = '';
	}
}

function HideMinfo(id)
{
	if (document.getElementById) { // DOM3 = IE5, NS6
	document.getElementById(id).style.display = 'none';
	}
}

function toggle(obj) {
      var el = document.getElementById(obj);
      if (el.style.display != 'block') {
            el.style.display = 'block';
      } else {
            el.style.display = 'none';
      }
}