function validate() {
    if (document.bookingform.clientname.value.length < 1) {
        alert("Please enter your name.");
        return false;
    }
	if (document.bookingform.clientname.value.length > 100) {
        alert("Sorry your name is too long - 100 characters maximum.");
        return false;
	}
    if (document.bookingform.clientaddress1.value.length < 1) {
       alert("Please enter the first line of your address.");
       return false;
   }
   if (document.bookingform.clientaddress1.value.length > 100) {
        alert("Sorry the first line of your address is too long - 100 characters maximum. Please use line 2");
        return false;
	}
   if (document.bookingform.clientaddress2.value.length > 100) {
       alert("Sorry the second line of your address is too long - 100 characters maximum.");
       return false;
   }
   if (document.bookingform.clientaddress3.value.length < 1) {
       alert("Please enter your town or city.");
       return false;
   }
   if (document.bookingform.clientaddress3.value.length > 50) {
        alert("Sorry the town or city name is too long - 50 characters maximum.");
        return false;
	}
   if (document.bookingform.clientaddress4.value.length < 1) {
       alert("Please enter your county, state or province.");
       return false;
   }
    if (document.bookingform.clientaddress4.value.length > 50) {
       alert("Sorry the state or province name is too long - 50 characters maximum.");
       return false;
   }
   if (document.bookingform.postcode.value.length < 1) {
       alert("Please enter your postcode or zip.");
       return false;
   }
   if (document.bookingform.postcode.value.length > 30) {
       alert("Sorry the postcode or zip is too long - 30 characters maximum.");
       return false;
   }
    if (document.bookingform.telno.value.length > 60) {
       alert("Sorry the telephone number is too long - 60 characters maximum.");
       return false;
   }
    if (document.bookingform.emailaddress.value.length < 8) {
       alert("Please enter your email address.");
       return false;
   }
    if (document.bookingform.emailaddress.value.length > 60) {
       alert("Sorry your email address is too long - 60 characters maximum.");
       return false;
   }
   if (document.bookingform.tandc.value != "YES") {
       alert("Sorry your booking form cannot be submitted unless the Terms and Conditions are agreed.");
       return false;
   }
   if (document.bookingform.agreedate.value.length < 1) {
       alert("Please enter today's date.");
       return false;
   }
    
   return true;
}