<!--
// Copyright 2005 Simply Extras Ltd
function dpos(my,d,t){
	var m=my.substring(0,3);
	var y=(my.substring(3,5)-0)+2000;
	var h=t.substring(0,2);
	var mn=t.substring(2,4);
	var a=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
	var f=false;
	for(i=0;i<a.length;i++){
		if(m==a[i]){
			m=i;f=true;break;
		}
	}
	if(!f)return 1;
	var n = new Date();
	var dt = new Date(y,m,d,h,mn,0);
	return (dt<n)?-1:((dt>n)?1:0);
}
function vd(s,x,z){
	var m=x.substring(0,3);
	var y=(x.substring(3,5)-0)+2000;
	var d=31;
	if(m=='Feb'){
		d=(y%4==0&&(y%1000==0||y%100!=0))?29:28;
	}else if(m=='Apr'||m=='Jun'||m=='Sep'||m=='Nov'){
		d=30;
	}
	if(z>d){
		alert('The '+s+' date you have chosen does not exist.');
		return 0;
	}
	return 1;
}
function vpf(){
	var f=document.forms['parking_form'];
	if (f.a.value == 0) {
		alert('Please select an Airport.');
		f.a.focus();
		return false;
	}
	var a=f.fmy.options.selectedIndex;
	var r=f.tmy.options.selectedIndex;
	if(r<a){
		alert('The return date must be on or after the arrival date.');
		return false;
	}else if(r==a){
		a=f.fd.options.selectedIndex;
		r=f.td.options.selectedIndex;
		if(r<a) {
			alert('The return date must be on or after the arrival date.');
			return false;
		}else if(r==a){
			a=f.ft.options.selectedIndex;
			r=f.tt.options.selectedIndex;
			if(r<=a){
				alert('The return time must be after the arrival time.');
				return false;
			}
		}
	}
	if(dpos(f.fmy.value,f.fd.value,f.ft.value)<1){
		alert('The arrival time must be in the future.');
		return false;
	}
	if(!vd('arrival',f.fmy.value,f.fd.value))return false;
	if(!vd('return',f.tmy.value,f.td.value))return false;
	return true;
}
function fpf(d1,m1,hm1,d2,m2,hm2,year,loc){
	var a=new Array('1','Akron (CAK)','2','Albany (ALB)','3','Albuquerque (ABQ)','4','Anchorage (ANC)','5','Atlanta (ATL)','6','Austin (AUS)','7','Baltimore (BWI)','8','Birmingham (BHM)','9','Boise (BOI)','10','Boston (BOS)','11','Buffalo (BUF)','12','Burbank (BUR)','13','Charleston (CHS)','14','Charlotte (CLT)','15','Chattanooga (CHA)','16','Chicago (ORD)','17','Chicago Midway (MDW)','18','Cincinnati (CVG)','19','Cleveland (CLE)','20','College Station (CLL)','21','Columbus (CMH)','22','Dallas (DFW)','23','Dallas Love Field (DAL)','24','Dayton (DAY)','25','Denver (DEN)','26','Des Moines (DSM)','27','Detroit (DTW)','28','El Paso (ELP)','29','Flint (FNT)','30','Fort Lauderdale (FLL)','31','Fort Myers (RSW)','32','Harrisburg (HIA)','33','Hartford (BDL)','34','Honolulu (HNL)','35','Houston (IAH)','36','Houston Hobby (HOU)','37','Indianapolis (IND)','38','Jacksonville (JAX)','39','Kansas City (KCI)','40','Kingsport (TRI)','41','Las Vegas (LAS)','42','Lehigh Valley (ABE)','43','Little Rock (LIT)','44','Los Angeles (LAX)','45','Louisville (SDF)','46','Manchester (MHT)','47','Memphis (MEM)','48','Miami (MIA)','49','Milwaukee (MKE)','50','Minn. St. Paul (MSP)','51','Nashville (BNA)','52','New Orleans (MSY)','53','New York (JFK)','54','New York (LGA)','55','Newark (EWR)','56','Norfolk (ORF)','57','Oakland (OAK)','58','Oklahoma City (OKC)','59','Omaha (OMA)','60','Ontario (ONT)','61','Orange County (SNA)','62','Orlando (MCO)','63','Philadelphia (PHL)','64','Phoenix (PHX)','65','Pittsburgh (PIT)','66','Portland (PDX)','67','Providence (PVD)','68','Raleigh Durham (RDU)','69','Reno (RNO)','70','Richmond (RIC)','71','Sacramento (SMF)','72','Salt Lake City (SLC)','73','San Antonio (SAT)','74','San Diego (SAN)','75','San Francisco (SFO)','76','San Jose (SJC)','77','Seattle (SEA)','78','Spokane (GEG)','79','Springfield (SGF)','80','St. Louis (STL)','81','St. Petersburg (PIE)','82','Syracuse (SYR)','83','Tampa (TPA)','84','Toledo (TOL)','85','Tucson (TUS)','86','Tulsa (TUL)','87','Washington DC (DCA)','88','Washington Dulles (IAD)');
	var h=new Array('00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23');
	var m=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
	var f=document.forms['parking_form'];
	var i;
	var max;
	var yr;
	var nyr;
	var tyr;
	var syr;
	if (f.a.type!='hidden') {
		if(f.a.length < 2){
			f.a.length=0;
			ao(f.a,'0','Select an Airport',((loc==0)?1:0));
			ao(f.a,'0','-----------------------',0);
			for(i=0;i<a.length;i+=2){
				ao(f.a,a[i],a[i+1],((loc==a[i])?1:0));
			}
		}
	}
	f.fd.length=0;
	f.td.length=0;
	f.fmy.length=0;
	f.tmy.length=0;
	f.ft.length=0;
	f.tt.length=0;
	for(i=1;i<32;i++){
		ao(f.fd,i,i,(i==d1));
		ao(f.td,i,i,(i==d2));
	}
	if(year<10){
		yr='0'+year;
		nyr=year+1;
		if(nyr<10)nyr='0'+nyr;
		tyr=year+2;
		if(tyr<10)tyr='0'+tyr;
	}else{
		yr=year;
		nyr=year+1;
		tyr=year+2;
	}
	for(i=m1-1;i<12;i++){
		ao(f.fmy,m[i]+yr,m[i]+' '+yr,(i==m1-1));
		ao(f.tmy,m[i]+yr,m[i]+' '+yr,(i==m2-1));
	}
	max=(m1-1)+18;
	for(i=12;i<max;i++){
		syr=(i<24)?nyr:tyr;
		ao(f.fmy,m[i]+syr,m[i]+' '+syr,(i==m1-1));
		ao(f.tmy,m[i]+syr,m[i]+' '+syr,(i==m2-1));
	}
	for(i=0;i<24;i++){
		ao(f.ft,h[i]+'00',h[i]+':00',(hm1==h[i]+'00'));
		ao(f.ft,h[i]+'15',h[i]+':15',(hm1==h[i]+'15'));
		ao(f.ft,h[i]+'30',h[i]+':30',(hm1==h[i]+'30'));
		ao(f.ft,h[i]+'45',h[i]+':45',(hm1==h[i]+'45'));
		ao(f.tt,h[i]+'00',h[i]+':00',(hm2==h[i]+'00'));
		ao(f.tt,h[i]+'15',h[i]+':15',(hm2==h[i]+'15'));
		ao(f.tt,h[i]+'30',h[i]+':30',(hm2==h[i]+'30'));
		ao(f.tt,h[i]+'45',h[i]+':45',(hm2==h[i]+'45'));
	}
}
function ao(sb,val,t,sel){
    var o=new Option;
    o.value=val;
    o.text=t;
    sb.options[sb.length]=o;
    if(sel){
        sb.options[sb.length-1].selected=true;
    }
}
//-->