function datechecker()
{
  var theDate = new Date();
  var theMonth;

  var firstDay = price.WSLogonParkingDayIn.options[price.WSLogonParkingDayIn.selectedIndex].text;
  var firstMonth = price.WSLogonParkingMonthIn.options[price.WSLogonParkingMonthIn.selectedIndex].text;
  var firstYear = price.WSLogonParkingYearIn.options[price.WSLogonParkingYearIn.selectedIndex].text;
var firstmin = price.WSLogonParkingMinutesIn.options[price.WSLogonParkingMinutesIn.selectedIndex].text;
var firsthour = price.WSLogonParkingHourIn.options[price.WSLogonParkingHourIn.selectedIndex].text;
	
  var secondDay = price.WSLogonParkingDayOut.options[price.WSLogonParkingDayOut.selectedIndex].text;
  var secondMonth = price.WSLogonParkingMonthOut.options[price.WSLogonParkingMonthOut.selectedIndex].text;
  var secondYear = price.WSLogonParkingYearOut.options[price.WSLogonParkingYearOut.selectedIndex].text;
var secondmin = price.WSLogonParkingMinutesOut.options[price.WSLogonParkingMinutesOut.selectedIndex].text;
var secondhour = price.WSLogonParkingHourOut.options[price.WSLogonParkingHourOut.selectedIndex].text;


  var firstDate = new Date();

	document.price.ParkingError.value='';
	document.price.ParkingError2.value='';  
  
  //alert(firstDate);

	var secondDate = new Date(secondMonth + " " + secondDay + ", " + secondYear + " " + secondhour + ":"+ secondmin+":0");

	
  // alert(secondDate);

  var daysDiff = (secondDate.valueOf() - firstDate.valueOf()) - (1*1000*60*60*24);
	//var daysDiff = (secondDate.valueOf() - firstDate.valueOf());


//alert(daysDiff);
  if (daysDiff<0 ){

alert('Sorry, the Help-Me-Park website cannot accept bookings within 24 hours\nPlease call our office on 0870 300 600 9\n\nWe can usually accept bookings with only one hours notice over the phone but this does depend on availability')
	document.price.ParkingError.value='Please call our office on 0870 300 600 9 to book these';
	document.price.ParkingError2.value='dates, or try again with a different departure date';  

var curDate = firstDate.valueOf() + (1*1000*60*60*24);
  var thecurDate= new Date();
  thecurDate.setTime(curDate);
  price.WSLogonParkingDayOut.options[thecurDate.getDate()].selected = true;
  price.WSLogonParkingMonthOut.options[thecurDate.getMonth()+1].selected = true;
  }

var firstDate = new Date(firstMonth + " " + firstDay + ", " + firstYear + " " + firsthour + ":"+ firstmin +":0");

//alert(firstDate.valueOf() )
//alert(secondDate.valueOf() )

if ( secondDate.valueOf() > firstDate.valueOf() ){
document.price.ParkingError.value='You are arriving before you departed';
document.price.ParkingError2.value='Please correct your arrival date'; 
 (secondDate.valueOf() - firstDate.valueOf())
}


  //alert(daysDiff);
  daysDiff = Math.floor(Math.abs((((daysDiff  / 1000) / 60) / 60) / 24));
  //alert(daysDiff);

  return true;

}