name="airnetmain";
var agt=navigator.userAgent.toLowerCase();
//remove comment for Insurance release
//function insAnnual(form){if(form.multi.checked){form.AAType.value='M'}else{form.AAType.value=''}}
function bookmark(){window.external.AddFavorite("http://www.airline-network.co.uk","Airline Network");}
function openDatewin(iday,imonthyear,oday,omonthyear,form,ioflag,qsi,qso,calendar){
	if (iday!=''){outday=eval('(document.'+form+'.'+iday+'.selectedIndex+1)');}
	if (oday!=''){retday=eval('(document.'+form+'.'+oday+'.selectedIndex+1)');}
	if (ioflag=='i'){opencal(iday,imonthyear,form,qsi,calendar);}
	if (ioflag=='o'){opencal(oday,omonthyear,form,qso,calendar);}}
function opencal(dayctrl,monthyearctrl,form,qs,calname){
	outday=eval('document.'+form+'.'+dayctrl+'.selectedIndex+1');
	retday=outday+7;
	themonth=eval('document.'+form+'.'+monthyearctrl+'[document.'+form+'.'+monthyearctrl+'.selectedIndex].value'+'.substr(0,2)');
	theyear=eval('document.'+form+'.'+monthyearctrl+'[document.'+form+'.'+monthyearctrl+'.selectedIndex].value'+'.substr(2,4)');
	openwin(''+calname+'.asp?month='+themonth+'&year='+theyear+'&type='+qs+'&out='+outday+'&ret='+retday,196,230,0);}
function manageState(){
if ((document.getElementById) && (agt.indexOf("opera")==-1))
	{changeForm(document.viewstate.previousDiv.value);}
	if (document.inputform.sReturn.value){
		var val = new String(document.inputform.sReturn.value)
		arr = val.split('|');
		document.inputform.lDepartureDay.selectedIndex = arr[0];
		document.inputform.lDepartureMonthYear.selectedIndex = arr[1];
		document.inputform.lReturnDay.selectedIndex = arr[2];
		document.inputform.lReturnMonthYear.selectedIndex = arr[3];
	}
	if (document.searchform.sReturn.value){
		var val = new String(document.searchform.sReturn.value)
		arr = val.split('|');
		document.searchform.pday.selectedIndex = arr[0];
		document.searchform.pickupMonthYear.selectedIndex = arr[1];
		document.searchform.dday.selectedIndex = arr[2];
		document.searchform.dropoffMonthYear.selectedIndex = arr[3];
	}
	return false;}
function changeForm(divname) {
	if (divname==''){divname='flights'};
	document.viewstate.previousDiv.value=divname;
	if ((document.getElementById)&&((agt.indexOf("opera")==-1)))
	{document.getElementById("flights").style.display='none';
	document.getElementById("hotels").style.display='none';
	document.getElementById("cars").style.display='none';
	//edocument.getElementById("ins").style.display='none';
	eval('document.getElementById("' + divname + '").style.display="";');}
	else{window.location.href="homepage.asp?display=" + divname;}}
function addDays(myDate,days) {return new Date(myDate.getTime() + days*24*60*60*1000);}
function GetSIforMMYYYY(month,year) {nowDate = new Date();return ((year-nowDate.getFullYear())*12)+(month-(nowDate.getMonth()+1)); }
function setComboDates(idays,dayctrl,monthyearctrl) {
	var cboDate = new Date();
	cboDate = addDays(cboDate,idays);
	var SI=GetSIforMMYYYY(cboDate.getMonth()+1,cboDate.getFullYear());
	dayctrl.selectedIndex=cboDate.getDate()-1;
	monthyearctrl.selectedIndex=SI;}
//outday is the day that the outbound date has been set to for the comparison on return date (==daytoset for outbound controls)
//daytoset is the actual date required, lead is the min lead time on the search - others are controls
function setdateto(outday,daytoset,lead,dayctrl,myctrl,slash){
	var compDate = new Date();
	compDate = addDays(compDate,lead-1);
	if (slash == 'y'){
		var newDate = new Date(myctrl[myctrl.selectedIndex].value.substr(3,5),myctrl[myctrl.selectedIndex].value.substr(0,2)-1,outday);}
	else
		{var newDate = new Date(myctrl[myctrl.selectedIndex].value.substr(2,4),myctrl[myctrl.selectedIndex].value.substr(0,2)-1,outday);}
	dayctrl.selectedIndex=daytoset-1;
	if (compDate>newDate){myctrl.selectedIndex=1;}else{myctrl.selectedIndex=0;}}
function ValidDate(y, m, d){with (new Date(y, (m-1), d))return (getDate()==d) && (getMonth()==(m-1))}
var retflightflag
var retcarflag
function alterdates(days,iDay,iMonthYear,oDay,oMonthYear,formname) {
	if (retflightflag=='change' & formname=='inputform'){return false;}
	if (retcarflag=='change' & formname=='searchform'){return false;}
	var dDate = eval('new Date(document.'+formname+'.'+iMonthYear+'[document.'+formname+'.'+iMonthYear+'.selectedIndex].value.substr(2,4),document.'+formname+'.'+iMonthYear+'[document.'+formname+'.'+iMonthYear+'.selectedIndex].value.substr(0,2)-1,document.'+formname+'.'+iDay+'[document.'+formname+'.'+iDay+'.selectedIndex].value);');
dDate = addDays(dDate,days);
var SI=GetSIforMMYYYY(dDate.getMonth(),dDate.getFullYear());
eval('document.'+formname+'.'+oDay+'.selectedIndex = dDate.getDate()-1;');
eval('document.'+formname+'.'+oMonthYear+'.selectedIndex = SI+1;')
}
	var newwin;
function openwin(pageurl,winwidth,winheight,scroll) {if (newwin != null){if (!newwin.closed){newwin.close();}}newwin = window.open(pageurl,'newwin','toolbar=0,location=0,directories=0,menubar=0,scrollbars=' + scroll + ',resizable=1,width=' + winwidth + ',height=' + winheight + ',left=300,top=185'); if(!newwin.opener) newwin.opener.name='mainwindow';}
function ValidateSearch(form){
	var outDate = new Date(form.pickupMonthYear.value.substr(2,4) + "/" + form.pickupMonthYear.value.substr(0,2) + "/" + form.pday.value);
	var retDate = new Date(form.dropoffMonthYear.value.substr(2,4) + "/" + form.dropoffMonthYear.value.substr(0,2) +  "/" + form.dday.value);
	if (outDate > retDate){alert('Please ensure depart date is before return date!');return false;}
	if ((ValidDate(form.dropoffMonthYear.options[form.dropoffMonthYear.selectedIndex].value.substr(2,4),form.dropoffMonthYear.options[form.dropoffMonthYear.selectedIndex].value.substr(0,2), form.dday.selectedIndex+1)==false)||(ValidDate(form.pickupMonthYear.options[form.pickupMonthYear.selectedIndex].value.substr(2,4),form.pickupMonthYear.options[form.pickupMonthYear.selectedIndex].value.substr(0,2), form.pday.selectedIndex+1)==false)){alert("Invalid date detected");return false;}
	if ((form.pickup.value=="")||(form.dropoff.value=="")){alert("Please enter both a pickup and dropoff point");return false;}
	if (form.ptime.value.substr(0,2)=='24'){form.ptime.value='00:' + form.ptime.value.substr(3,2)}
	if (form.dtime.value.substr(0,2)=='24'){form.dtime.value='00:' + form.dtime.value.substr(3,2)}
	form.ptime.value = form.ptime.value.split(".").join(":");
	form.dtime.value = form.dtime.value.split(".").join(":");
	//var ptime = form.ptime.value;if (ptime.match(/\d+:\d\d/) == null || ptime.split(":")[0] > 23 || ptime.split(":")[1] > 59){alert("Your pick-up time is not in the format hh:mm \n\nfor example: 17:00\n\n");return false;}
	//var dtime = form.dtime.value;if (dtime.match(/\d+:\d\d/) == null || dtime.split(":")[0] > 23 || dtime.split(":")[1] > 59){alert("Your drop-off time is not in the format hh:mm \n\nfor example: 17:00\n\n");return false;}
	
	var ptime = form.ptime.value;if (ptime.match(/\d{1,2}:\d\d/) == null || ptime.split(":")[0] > 23 || ptime.split(":")[1] > 59){form.ptime.select(); alert("Your pick-up time is not in the format hh:mm \n\nfor example: 17:00\n\n"); form.ptime.select(); return false;}
	var dtime = form.dtime.value;if (dtime.match(/\d{1,2}:\d\d/) == null || dtime.split(":")[0] > 23 || dtime.split(":")[1] > 59){form.dtime.select(); alert("Your drop-off time is not in the format hh:mm \n\nfor example: 17:00\n\n"); form.dtime.select(); return false;}

	if ( form.ptime.value.length > 5 ) 
	{ 
		form.ptime.value = form.ptime.value.substr( 0, 5 );
		form.ptime.select();
		alert("Your pick-up time is not in the format hh:mm \n\nfor example: 17:00\n\n"); 
		return false;		
	}

	if ( form.dtime.value.length > 5 ) 
	{ 
		form.dtime.value = form.dtime.value.substr( 0, 5 );
		form.dtime.select();
		alert("Your drop-off time is not in the format hh:mm \n\nfor example: 17:00\n\n"); 
		return false;		
	}


	
	var pickupdate = new Date(form.pickupMonthYear.options[form.pickupMonthYear.selectedIndex].value.substr(2,4),form.pickupMonthYear.options[form.pickupMonthYear.selectedIndex].value.substr(0,2)-1,form.pday.options[form.pday.selectedIndex].value);
	var dropoffdate = new Date(form.dropoffMonthYear.options[form.dropoffMonthYear.selectedIndex].value.substr(2,4),form.dropoffMonthYear.options[form.dropoffMonthYear.selectedIndex].value.substr(0,2)-1,form.dday.options[form.dday.selectedIndex].value);
	var now=new Date();
	if((pickupdate-now)/(60*60*24*1000)<=6){alert("Sorry, you must give at least 7 days notice for car hire bookings");return false;}
	if((pickupdate-now)/(60*60*24*1000)>331){alert("Sorry, you may only book up to 11 months in advance (331 days)");return false;}
	if((dropoffdate-pickupdate)/(60*60*24*1000)>28){alert("Sorry, if you require a booking greater than 28 days then please telephone or request 2 sequential bookings");return false;}
	if(pickupdate>=dropoffdate){alert("Please select a dropoff date after the pickup date");return false;}
	form.pickupdatetime.value = (form.pday.selectedIndex+1) + '/' + form.pickupMonthYear[form.pickupMonthYear.selectedIndex].value.substr(0,2) + '/' + form.pickupMonthYear[form.pickupMonthYear.selectedIndex].value.substr(2,4) + ' ' + form.ptime.value + ':00';
	form.dropoffdatetime.value = (form.dday.selectedIndex+1) + '/' + form.dropoffMonthYear[form.dropoffMonthYear.selectedIndex].value.substr(0,2) + '/' + form.dropoffMonthYear[form.dropoffMonthYear.selectedIndex].value.substr(2,4) + ' ' + form.dtime.value + ':00';
	form.sReturn.value = form.pday.selectedIndex + "|" + form.pickupMonthYear.selectedIndex + "|" + form.dday.selectedIndex + "|" + form.dropoffMonthYear.selectedIndex;
	return true;}
function CheckSearchDetails(form){
	if (form.sDestinationCode.value==""){alert("You have not entered a destination");form.sDestinationCode.focus();return false;}
	for (i=1;i<form.iNoChildren.selectedIndex+1;i++)
		{if (eval("form.iChildAge"+i+".value==''") || eval("form.iChildAge"+i+".value=='0'"))
			{alert("You have entered children but not specified their age.\n Please specify all ages");ChangeChildPassengers(form.iNoChildren.selectedIndex);return false;}}
	
	
	//	this code allows for the fact that we have differnet field names in version one and version 2
	{
		if (ValidDate(form.lDepartureMonthYear.value.substr(2,4),form.lDepartureMonthYear.value.substr(0,2), form.lDepartureDay.value)==false){alert("Your departure date is not a valid date");form.lDepartureDay.focus();return false;}
	
		var outDate = new Date(form.lDepartureMonthYear.value.substr(2,4) + "/" + form.lDepartureMonthYear.value.substr(0,2) + "/" + form.lDepartureDay.value);
		var retDate = new Date(form.lReturnMonthYear.value.substr(2,4) + "/" + form.lReturnMonthYear.value.substr(0,2) +  "/" + form.lReturnDay.value);

		var now = new Date();
		var today = new Date(now.getYear(),now.getMonth(),now.getDate());
		if (outDate < today){alert('Your departure date is before today.');return false;}
		if (outDate > retDate){alert('Your return date is before your departure date.');return false;}
		if (form.sJourneyType.options[form.sJourneyType.selectedIndex].value=='R'){
		if (ValidDate(form.lReturnMonthYear.value.substr(2,4),form.lReturnMonthYear.value.substr(0,2), form.lReturnDay.value)==false){alert("Your return date is not a valid date");form.lReturnDay.focus();return false;}}	
		form.sReturn.value =  form.lDepartureDay.selectedIndex + "|" + form.lDepartureMonthYear.selectedIndex + "|" + form.lReturnDay.selectedIndex + "|" + form.lReturnMonthYear.selectedIndex;
	}
	
	return true;}
function ChangeChildPassengers(selindex) {
	for (i=1;i<6;++i) {eval("document.inputform.iChildAge"+i+".value = '';")}
	if (selindex != 0){
	if (newwin != null){if (!newwin.closed){newwin.close();}}newwin = window.open('/flights/popup/ageselect.asp?num=' + selindex,'AgeSelector','toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=0,width=300,height=300,left=300,top=185');}}
function SubmitHotelForm(form){
	if (ValidDate(form.date_MonthYear.value.substr(2,4),form.date_MonthYear.value.substr(0,2), form.date_dom.value)==false){
		alert("Your check-in date is not valid");form.date_dom.focus();return false;}
	if (isNaN(form.num_nights.value)){alert("Please enter a numerical number of nights");form.num_nights.focus();return false;}
return true;}
function canRecall(form){
	if ((form.bookingref.value == "")||(isNaN(form.bookingref.value))||(form.bookingref.value.length < 6)){
		alert("Please enter a 6 figure booking reference to recall. Thank you.");
		document.recallform.bookingref.focus();return false;}
	return true;}
function addMonthYear(obj,max,slash){
	for(i=0;i<max;i++){
		if (slash=='y')
		{addOpt(obj,aSlashMonthYear[i][0],aSlashMonthYear[i][1],false,false);}
		else
		{addOpt(obj,aMonthYear[i][0],aMonthYear[i][1],false,false);}}}

function addOpt(obj,sValue,sText,bIsDefault,bIsSelected)
{
	var newOpt = new Option(sText,sValue,bIsDefault,bIsSelected);
	obj.options[obj.length] = newOpt;
}

function IntOpt(obj,min,max,lead0){
	for(i=min;i<=max;i++){
		if (lead0=='y') 
			{addOpt(obj,make2chars(i),i,false,false);}
		else
			{addOpt(obj,i,i,false,false);}}}

function TimeOpt(obj)
{	
	var i
	var SelectIndex
	
	i = 0;
	for(h = 0; h <= 23; h++)
	{ 
	    for ( m = 0; m <= 45; m = m + 15 )
	    {
			sTime = make2chars(String(h)) + ':' + make2chars(String(m));
			bDefault = (sTime == '12:00') ? true : false;							
			if (bDefault)
				SelectIndex = i;
			addOpt(obj, sTime, sTime, bDefault, bDefault);
			i++;
		}			
	}	
	//For some reason, passing the boolean values in the call to the Option
	//constructor (wrapped in the function addOpt) does not select the
	//correct item. In fact it always seems to select the item prior to the
	//one expected. One way around this would have been to try to select the
	//item immediately after the one that you really want to select, fooling
	//the code into selecting the one that you really wanted (ie. telling the
	//code that you wanted item 36 when in fact you really wanted 35). But
	//this seems like a fudge. Instead, the index of the correct item has
	//been obtained, and this can then be used to select the required item.
	obj.selectedIndex = SelectIndex
}

//all code below added for insurance search

var newwin;
function cal(obj,objOut,objRet,retfunc){
	var s1 = new String(obj.value);
	var ss = s1.split("/",3);
	calname='/ins/calendar.asp?month='+ss[1]+'&year='+ss[2]+'&out='+objOut.value+'&ret='+objRet.value+'&retfunc='+retfunc;
	openwin(calname,196,230,0);}
function selectOption(obj,valToSelect){
	for (var i=0;i<obj.length;i++){
		if (obj.options[i].value==valToSelect){obj.selectedIndex=i;}}}
function USDate(sDate){
	return sDate.substring(3,5) + '/' + sDate.substring(0,2) + '/' + sDate.substring(6,10);}
function y2k(number) { return (number < 1000) ? number + 1900 : number; }
function isDateFormat(sDate){
	return Date.parse(sDate)==Date.parse(sDate);}
function isDate (day,month,year){
    var today = new Date();
    year = ((!year) ? y2k(today.getYear()):year);
    month = ((!month) ? today.getMonth():month-1);
    if (!day) return false
    var test = new Date(year,month,day);
    if ( (y2k(test.getYear()) == year) &&
         (month == test.getMonth()) &&
         (day == test.getDate()) )
        return true;
    else
        return false;}
function isValidDate(sDate){
	if (isDateFormat(sDate)){
		return isDate(sDate.substring(0,2),sDate.substring(3,5),sDate.substring(6,10));}
	else {return false;}}
function updateDay(objDay,objMonYr,obj){
	var s;
	s=ensureDateValid(objDay,objMonYr);
	if (obj.name=='AADepartDate') setDepartDate(s.concat(obj.value.substring(2,10)));
	else setLandDate(s.concat(obj.value.substring(2,10)));
	selectOption(objDay,s);
	}
function ensureDateValid(objDaySelect,objMonYrSelect){
	var startDay = objDaySelect.options[objDaySelect.selectedIndex].value;
	for (var i=Number(startDay);i>0;i=i-1){
		if (isValidDate(make2chars(String(i))+'/'+objMonYrSelect.options[objMonYrSelect.selectedIndex].value)){
			break;}}
	return make2chars(String(i));}
function make2chars(snum){
	if (Number(snum) < 10) return '0'+snum;
	else return snum;}
function updateMonYr(objDay,objMonYr,obj){
	var s;
	s=ensureDateValid(objDay,objMonYr);
	if (obj.name=='AADepartDate') setDepartDate(s.concat('/',objMonYr.options[objMonYr.selectedIndex].value));
	else setLandDate(s.concat('/',objMonYr.options[objMonYr.selectedIndex].value));
	obj.value=s.concat('/',objMonYr.options[objMonYr.selectedIndex].value);
	selectOption(objDay,s);}
function setDepartDate(dte){
	document.inssearchform.AADepartDate.value=dte;
	selectOption(document.inssearchform.XXDepartDay,dte.substring(0,2));
	selectOption(document.inssearchform.XXDepartMonYr,dte.substring(3,10));
	var dteDD = new Date(USDate(dte));
	var dteLD = new Date(USDate(document.inssearchform.AALandDate.value));
	if (dteLD.getTime() < dteDD.getTime()){
		setLandDate(dte);}}
function setLandDate(dte){
	document.inssearchform.AALandDate.value=dte;
	selectOption(document.inssearchform.XXLandDay,dte.substring(0,2));
	selectOption(document.inssearchform.XXLandMonYr,dte.substring(3,10));
	var dteDD = new Date(USDate(document.inssearchform.AADepartDate.value));
	var dteLD = new Date(USDate(dte));
	if (dteDD.getTime() > dteLD.getTime()){
		setDepartDate(dte);}}
var soWin;
function popSO(){
	if (soWin != null){
		if (!soWin.closed){
			soWin.close();}}
	soWin = window.open('stopover.htm','soWin','toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=0,width=300,height=300,left=300,top=185');}
function checkPass(){
	 var adults = new Number(document.inputform.iNoAdults.options[document.inputform.iNoAdults.selectedIndex].text);
	 var child = new Number(document.inputform.iNoChildren.options[document.inputform.iNoChildren.selectedIndex].text);
			 
	 if ((adults + child) > 6){
	 	alert("Sorry, we can only make reservations for a maximum of 6 passengers per booking via our website.");
		return false;
	 }else{
		 return true;
	 }
}	
var url;
function go(url)
{
location.href = (url + ".htm");
}

	var t_date = new Date();
  var t_month = t_date.getMonth();
  var month = new Array(12);
  var t_year = t_date.getFullYear();
  var year = new Array(12);
  var my_value = new Array (12);
  var my_title = new Array (12);
  var my_s_value = new Array (12);
   
   for (i=0;i<12;i++)
   {      
     if ((t_month+i)==12)
      {
      if (t_date.getMonth() == 7)
	 offset = 5;
      if (t_date.getMonth() == 8)
	 offset = 4;
      if (t_date.getMonth() == 9)
	 offset = 3;
      if (t_date.getMonth() == 10)
	 offset = 2;
      if (t_date.getMonth() == 11)
	 offset = 1;
      if (t_date.getMonth() == 12)
	 offset = 0;
      t_date.setMonth(0);
       t_month = t_date.getMonth()-1;
      t_date.setYear(t_year + 1);
      t_year = t_date.getFullYear();
      }
    month[i] = t_month + i + 1;
    year[i] = t_year;
  switch (month[i])
  { 
   case 1:
     my_title[i] = "Jan";
     break
   case 2:
      my_title[i] = "Feb";
     break
   case 3:
     my_title[i] = "Mar";
     break
   case 4:
     my_title[i] = "Apr";
     break
   case 5:
     my_title[i] = "May";
     break
   case 6:
     my_title[i] = "Jun";
     break
   case 7:
     my_title[i] = "Jul";
     break
   case 8:
     my_title[i] = "Aug";
     break
   case 9:
     my_title[i] = "Sep";
     break
   case 10:
     my_title[i] = "Oct";
     break
   case 11:
     my_title[i] = "Nov";
     break
   case 12:
     my_title[i] = "Dec";
     break
  }
  if ((t_month+i) < 10)
  {
   month[i] = "0" + month[i];
  }
  my_title[i] = my_title[i]+" "+year[i];
  my_value[i] = month[i] +""+ year[i];
  my_s_value[i] = month[i]+"/"+year[i];
   } 
 
   var aMonthYear = new Array(
   new Array (my_value[0],my_title[0]),new Array (my_value[1],my_title[1]),new Array (my_value[2],my_title[2]),new Array (my_value[3],my_title[3]),new Array (my_value[4],my_title[4]),new Array (my_value[5],my_title[5]),new Array (my_value[6],my_title[6]),new Array (my_value[7],my_title[7]),new Array (my_value[8],my_title[8]),new Array (my_value[9],my_title[9]),new Array (my_value[10],my_title[10]),new Array (my_value[11],my_title[11])
   );
   var aSlashMonthYear = new Array(
   new Array (my_s_value[0],my_title[0]),new Array (my_s_value[1],my_title[1]),new Array (my_s_value[2],my_title[2]),new Array (my_s_value[3],my_title[3]),new Array (my_s_value[4],my_title[4]),new Array (my_s_value[5],my_title[5]),new Array (my_s_value[6],my_title[6]),new Array (my_s_value[7],my_title[7]),new Array (my_s_value[8],my_title[8]),new Array (my_s_value[9],my_title[9]),new Array (my_s_value[10],my_title[10]),new Array (my_s_value[11],my_title[11])
   );
			
			function popUp(url) {
				sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,WIDTH=500,height=450');
				self.name = "mainWin"; 
			}

function checkNotNumber(strToTest) {
  var acceptableChars = "abcdefghijklmnopqrstuvwxyz ";
  strToTest = strToTest.toLowerCase();
  for ( var i=strToTest.length-1; i>=0; i-- ) {
    if ( acceptableChars.indexOf(strToTest.charAt(i))==-1 ){
      return false;
    }
  }
return true;
}

function isNumeric(strToTest) {
  var acceptableChars = "1234567890 ";
  for ( var i=strToTest.length-1; i>=0; i-- ) {
    if ( acceptableChars.indexOf(strToTest.charAt(i))==-1 ){
      return false;
    }
  }
  return  true;
}

function isAlphaNumeric(strToTest) {
  var acceptableChars = "abcdefghijklmnopqrstuvwxyz1234567890 ";
  strToTest = strToTest.toLowerCase();
  for ( var i=strToTest.length-1; i>=0; i-- ) {
    if ( acceptableChars.indexOf(strToTest.charAt(i))==-1 ){
      return false;
    }
  }
return true;
}

function checkForBackspace(){
	if(event.keyCode == 8){
		//must have been a backspace
		return false;
	}
	else{
		return true;
	}
	
}

function ValidDate(y, m, d){
	with (new Date(y, (m-1), d))
	return (getDate()==d) && (getMonth()==(m-1))
} 
function change(){
		if (document.searchform.dropoff.value == '')
			 document.searchform.dropoff.value = document.searchform.pickup.value;
}