	function validate() {
		var errorString = '';
		
		// first name
		if(document.quote.Name.value == "") {
			errorString += ' - No Full Name\n';
			noName = true;
		}
		else {
			noName = false;
		}

		// Telephone number
		if(document.quote.Telephone.value == "") {
			errorString += ' - No Daytime Telephone\n';
			noTelephone = true;
		}
		else {
			noTelephone = false;
		}

		// Address
		if(document.quote.Address.value == "") {
			errorString += ' - No Address\n';
			noAddress = true;
		}
		else {
			noAddress = false;
		}

		// Postcode
		if(document.quote.Postcode.value == "") {
			errorString += ' - No Postcode\n';
			noPostcode = true;
		}
		else {
			noPostcode = false;
		}
		
		if(document.quote.Email.value == "") {
			errorString += ' - No Email Address\n';
			noEmail = true;
			invalidEmail = false;
		}
		else {
			noEmail = false;

			if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.quote.Email.value)){
				invalidEmail = false;
			}
			else {
				errorString += ' - Invalid Email Address\n';
				invalidEmail = true;
			}
		}


		// Source
		// Set this to true to start us off
		if(document.quote.Source.value == "") {			
			errorString += ' - No Source\n';
			noSource = true;
		}
		

		// Vehicle Make
		if(document.quote.VehicleMake.value == "") {
			errorString += ' - No Vehicle Make\n';
			noMake = true;
		}
		else {
			noMake = false;
		}

		// Vehicle Model
		if(document.quote.VehicleModel.value == "") {
			errorString += ' - No Vehicle Model\n';
			noModel = true;
		}
		else {
			noModel = false;
		}

		// Engine
		if(document.quote.Engine.value == "") {
			errorString += ' - No Engine Size\n';
			noEngine = true;
		}
		else {
			noEngine = false;
		}

		// YearOfManufacture
		if(document.quote.YearOfManufacture.value == "") {
			errorString += ' - No Year of Manufacture\n';
			noYearOfManufacture = true;
		}
		else {
			noYearOfManufacture = false;
		}

		// Current value
		if(document.quote.Value.value == "") {
			errorString += ' - No Current Value\n';
			noValue = true;
		}
		else {
			noValue = false;
		}

		if(document.quote.VehicleOwner[0].checked != true && document.quote.VehicleOwner[1].checked != true) {
				errorString += ' - No Vehicle Owner\n';				
				noVehicleOwner = true;
		}
		else {
			noVehicleOwner = false;
		}
		
		// Vehicle Owner
		if(document.quote.VehicleOwner[0].checked == true) {
			// If vehicle owner, imminenet insurance renewal
			if(document.quote.ImminentRenewal[0].checked != true && document.quote.ImminentRenewal[1].checked != true) {
				errorString += ' - No Insurance Due Next 30 Days\n';				
				noRenew30 = true;
			}
			else {
				noRenew30 = false;
				
			}
			// Renewal Month
			if(document.quote.ImminentRenewal[1].checked == true) {
				if(document.quote.RenewalMonth.value == "") {
					errorString += ' - What month is your insurance due?\n';				
					noRenewMonth = true;
				}
				else {
					noRenewMonth = false;
				}
			}
			else {
				// If the value is set to 
				noRenewMonth = false;
			}
			
			
			// If vehicle owner, date purchased
			if(document.quote.DatePurchased.value == "") {
				errorString += ' - No Date Purchased\n';				
				noPurchaseDate = true;
			}
			else {
				noPurchaseDate = false;
			}

		}
		else {
			noRenew30 = false;
			noRenewMonth = false;
			noPurchaseDate = false;
		}

		// Body
		if(document.quote.Body.value == "") {
			errorString += ' - No Type of Body\n';
			noBody = true;
		}
		else {
			noBody = false;
		}

		// Drive Type
		if(document.quote.DriveType[0].checked != true && document.quote.DriveType[1].checked != true) {
			errorString += ' - No Type of Drive (Left/Right)\n';
			noDriveType = true;
		}
		else {
			noDriveType = false;
		}


		// Is the vehiclhe fitted with an imobilser?
		if(document.quote.Immobiliser[0].checked != true && document.quote.Immobiliser[1].checked != true) {
			errorString += ' - Does The Vehicle Have An Immobiliser?\n';				
			noImmob = true;
		}
		else {
			noImmob = false;
		}
		
		//have they enetered the value as yes?
		if(document.quote.Immobiliser[0].checked == true) {
		
			/// If it has an imobiliser, how was it fitted
			if(document.quote.Factory[0].checked != true && document.quote.Factory[1].checked != true) {
				errorString += ' - How was the Immobiliser Fitted?\n';				
				noFitting = true;
			}
			else {
				noFitting = false;
			}

			// If the factory value is set and is set to no, make sure they tell us where it was fitted
			if(document.quote.Factory[1].checked == true) {
				if(document.quote.ImmobiliserModel.value == "") {
					errorString += ' - What is the Immobiliser make & model?\n';				
					noImmobMake = true;
				}
				else {
					noImmobMake = false;
				}
			}
			else {
				// If the value is set to 
				noImmobMake = false;
			}
		
		}
		else {
			noFitting = false;
			noImmobMake = false;
		}
		
		// Vehicle Owner
		if(document.quote.Tracker[0].checked != true && document.quote.Tracker[1].checked != true) {
			errorString += ' - Does The Vehicle Have A Tracker?\n';	
			noTracker = true;
		}
		else {
			noTracker = false;
		}
		
		//if the tracker is yes get the make and model
		if(document.quote.Tracker[0].checked == true) {

			// If vehicle owner, date purchased
			if(document.quote.TrackerModel.value == "") {
					errorString += ' - No Tracker Model\n';				
					noTrackerModel = true;
				}
				else {
					noTrackerModel = false;
				}
		}
		
		else {
			noTrackerModel = false;
		}


		// Transmission
		if(document.quote.Transmission[0].checked != true && document.quote.Transmission[1].checked != true) {
			errorString += ' - No Transmission\n';
			noTransmission = true;
		}
		else {
			noTransmission = false;
		}

		//Fuel
		if(document.quote.Fuel[0].checked != true && document.quote.Fuel[1].checked != true && document.quote.Fuel[2].checked != true) {
			errorString += ' - No Fuel\n';
			noFuel = true;
		}
		else {
			noFuel = false;
		}

		// Mileage Pleasure
		if(document.quote.MileageforPleasure.value == "") {
			errorString += ' - No Mileage for Pleasure\n';
			noPleasureMiles = true;
		}
		else {
			noPleasureMiles = false;
		}

		// Mileage Business
/*		if(document.quote.MileageforBusiness.value == "") {
			errorString += ' - No Mileage for Business\n';
			noBusinessMiles = true;
		}
		else {
			noBusinessMiles = false;
		}
*/
		// Location
		if(document.quote.Location.value == "") {
			errorString += ' - No Nighttime Location\n';
			noLocation = true;
		}
		else {
			noLocation = false;
		}
		
		/// Previous vehicle information
		if(document.quote.PreviousVehicle[0].checked != true && document.quote.PreviousVehicle[1].checked != true) {
			errorString += ' - Did You Previously Own Another Vehicle?\n';
			noPrevious = true;
		}
		else {
			noPrevious = false;
		}
		
		// If had a previous make sure they fill in make and model
		if(document.quote.PreviousVehicle[0].checked == true) {
			//validate make
			if(document.quote.PreviousMake.value == "") {
				errorString += ' - No Previous Vehicle Make\n';
				noPrevMake = true;
			}
			else {
				noPrevMake = false;
			}
			
			// Validate model
			if(document.quote.PreviousModel.value == "") {
				errorString += ' - No Previous Vehicle Model\n';
				noPrevModel = true;
			}
			else {
				noPrevModel = false;
			}
			
		}
		else {
			//set all to flase
			noPrevMake = false;
			noPrevModel = false;
		}
				
		
		// Type of Cover
		if(document.quote.CoverType.value == "") {
			errorString += ' - No Type of Cover\n';
			noCoverType = true;
		}
		else {
			noCoverType = false;
		}

		// Class of Use
		if(document.quote.ClassOfUse.value == "") {
			errorString += ' - No Class of Use\n';
			noClassOfUse = true;
		}
		else {
			noClassOfUse = false;
		}

		// No Claims Bonus
		if(document.quote.NCB[0].checked != true && document.quote.NCB[1].checked != true) {
			errorString += ' - Do you have any no claims discount?\n';				
			noNCB = true;
		}
		else {
			noNCB = false;
		}
		
		if(document.quote.NCB[0].checked == true) {
		
			/// If yes, how many years?
			if(document.quote.NCBYears.value == "") {
				errorString += ' - How many years NCB?\n';				
				noNCBYears = true;
			}
			else {
				noNCBYears = false;
			}

			// If 4 or more, would they like protection
			if(document.quote.NCBYears.value >= 4 || document.quote.NCBYears.value == "5+") {
				if(document.quote.NCBProtect[0].checked != true && document.quote.NCBProtect[1].checked != true) {
					errorString += ' - Would you like to protect your NCB?\n';				
					noNCBProtect = true;
				}
				else {
					noNCBProtect = false;
				}
			}
			else {
				// If the value is set to 
				noNCBProtect = false;
			}
		
		}
		else {
			noNCBYears = false;
			noNCBProtect = false;
		}

		// Who will Drive?
		if(document.quote.Drive[0].checked != true && document.quote.Drive[1].checked != true && document.quote.Drive[2].checked != true && document.quote.Drive[3].checked != true) {
			errorString += ' - Who will Drive?\n';
			noDrive = true;
		}
		else {
			noDrive = false;
		}


		// Email valid or not??
		if (document.quote.Email.value == ""){
			errorString += ' - No Email Address\n';
			invalidEmail = true;
		}
		else {
			invalidEmail = false;
		}
		
		///////// VALIDATE EVERYTHING
		if(errorString) {
			alert('Errors were detected with these fields:\n\n'+ errorString +'\nPlease check and try again.');
			
			// clear failed string
			errorString = "";
			return false;
		}
		else {
			//gotoPage();
			document.quote.submit();
			return true;
		}
	}
