function checkQuote()
{
 if (document.form.name.value=='')
 {
  alert('Please enter your Name!');
  return(false);
 }
 if ((document.form.address.value=='')||(document.form.postcode.value=='')||(document.form.country.selectedIndex==0))
 {
  alert('Please enter your Full Address!');
  return(false);
 }
 if (document.form.tel.value=='')
 {
  alert('Please enter your Telephone Number!');
  return(false);
 }
 if (document.form.email.value=='')
 {
  alert('Please enter your Email Address!');
  return(false);
 }
 else
 {
  var str = document.form.email.value;
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  if ((!r1.test(str)==true)&&(r2.test(str)==false))
  {
   alert('Sorry, you must provide a real Email Address!');
   return(false);
  }
 }
 if ((document.form.arrivedate.selectedIndex==0)||(document.form.arrivemonth.selectedIndex==0)||(document.form.arriveyear.selectedIndex=='-')||(document.form.depart_hours.selectedIndex==0)||(document.form.depart_minutes.selectedIndex==0))
 {
  alert('Please enter a Departure Date and Time!');
  return(false);
 }
 if ((document.form.departure_place.value=='')||(document.form.departure_county.selectedIndex==0))
 {
  alert('Please enter your Place and County of Departure!');
  return(false);
 }
 if (document.form.destination.value=='')
 {
  alert('Please enter your Destination!');
  return(false);
 }
 if ((document.form.departdate.selectedIndex==0)||(document.form.departmonth.selectedIndex==0)||(document.form.departyear.selectedIndex==0)||(document.form.return_hours.selectedIndex==0)||(document.form.return_minutes.selectedIndex==0))
 {
  alert('Please enter a Return Date and Time!');
  return(false);
 }
 if ((document.form.accommodation[0].checked==true)&&(document.form.nights.value==''))
 {
  alert('Please enter the Number of Nights you require accommodation for!');
  return(false);
 }
 if (document.form.no_of_passengers.value=='')
 {
  alert('Please enter the Number of Passengers that will be travelling!');
  return(false);
 }
 if (document.form.coach_size[document.form.coach_size.selectedIndex].value=='-')
 {
  alert('Please choose the Size of Coach you would like!');
  return(false);
 }
 if ((document.form.coach_type[0].checked==false)&&(document.form.coach_type[1].checked==false)&&(document.form.coach_type[2].checked==false)&&(document.form.coach_type[3].checked==false)&&(document.form.coach_type[4].checked==false)&&(document.form.coach_type[5].checked==false)&&(document.form.coach_type[6].checked==false))
 {
  alert('Please choose the Type of Coach you would like!');
  return(false);
 }
 if (document.form.confirm_by[2].checked==true)
 {
  if (document.form.fax.value=='')
  {
   alert('Please enter your Fax Number!');
   return(false);
  }
 }
 if ((document.form.confirm_by[0].checked==false)&&(document.form.confirm_by[1].checked==false)&&(document.form.confirm_by[2].checked==false))
 {
  alert('Please choose how you would like the Quotation Sent!');
  return(false);
 }
 arrivedate = document.form.arrivedate.options[document.form.arrivedate.selectedIndex].value;
 if (arrivedate<10)
  arrivedate = "0"+arrivedate;
 arrivemonth = document.form.arrivemonth.options[document.form.arrivemonth.selectedIndex].value;
 if (arrivemonth<10)
  arrivemonth = "0"+arrivemonth;
 arriveyear = document.form.arriveyear.options[document.form.arriveyear.selectedIndex].value;
 departdate = document.form.departdate.options[document.form.departdate.selectedIndex].value;
 if (departdate<10)
  departdate = "0"+departdate;
 departmonth = document.form.departmonth.options[document.form.departmonth.selectedIndex].value;
 if (departmonth<10)
  departmonth = "0"+departmonth;
 departyear = document.form.departyear.options[document.form.departyear.selectedIndex].value;
 document.form.depart.value = arrivedate+"/"+arrivemonth+"/"+arriveyear;
 document.form.returning.value = departdate+"/"+departmonth+"/"+departyear;
}

function checkContact()
{
 if ((document.form.arrivedate.selectedIndex==0)||(document.form.arrivemonth.selectedIndex==0)||(document.form.arriveyear.selectedIndex==0))
 {
  alert('Please select the preferred date of travel');
  return(false);
 }
 if (document.form.name.value=='')
 {
  alert('Please enter your name');
  return(false);
 }
 if (document.form.email.value=='')
 {
  alert('Please enter your Email Address!');
  return(false);
 }
 else
 {
  var str = document.form.email.value;
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  if ((!r1.test(str)==true)&&(r2.test(str)==false))
  {
   alert('Sorry, you must provide a real Email Address!');
   return(false);
  }
 }
 if (document.form.number.value=='')
 {
  alert('Please enter the number of travellers');
  return(false);
 }
 arrivedate = document.form.arrivedate.options[document.form.arrivedate.selectedIndex].value;
 if (arrivedate<10)
  arrivedate = "0"+arrivedate;
 arrivemonth = document.form.arrivemonth.options[document.form.arrivemonth.selectedIndex].value;
 if (arrivemonth<10)
  arrivemonth = "0"+arrivemonth;
 arriveyear = document.form.arriveyear.options[document.form.arriveyear.selectedIndex].value;
 document.form.traveldate.value = arrivedate+"/"+arrivemonth+"/"+arriveyear;
}

