<!--
function mOTX(elementChangedID){
	if (document.getElementById(elementChangedID).selectedIndex == 1){document.getElementById("mMonthMonth").selectedIndex=1;document.getElementById("mYearYearYearYear").selectedIndex=1;}
		if (document.getElementById(elementChangedID).selectedIndex == 2){document.getElementById("mMonthMonth").selectedIndex=2;document.getElementById("mYearYearYearYear").selectedIndex=2;}
}
function TAXX(elementChangedID){
	if (document.getElementById(elementChangedID).selectedIndex == 1){document.getElementById("tMonthMonth").selectedIndex=1;document.getElementById("tYearYearYearYear").selectedIndex=1;}
}
function lService(elementChangedID){
	if (document.getElementById(elementChangedID).selectedIndex == 1){document.getElementById("lSDayDay").selectedIndex=1;document.getElementById("lSMonthMonth").selectedIndex=1;document.getElementById("lSYearYearYearYear").selectedIndex=1;}
}
function validateForSubmission(theImage){
	mOTX('mMonthMonth'); mOTX('mYearYearYearYear');
	TAXX('tMonthMonth'); TAXX('tYearYearYearYear');
	lService('lSDayDay'); lService('lSMonthMonth'); lService('lSYearYearYearYear');
	var theErrorMessage=""; var theValuationMessage="";
	if (document.getElementById('makeAndModel').value == ""){theErrorMessage+="MAKE and MODEL is a mandatory field"+"\r\n";}
	if (document.getElementById('noOfDoors').value == ""){theErrorMessage+="Please tell us the NO OF DOORS your car has"+"\r\n";}
	if (document.getElementById('colour').value == ""){theErrorMessage+="You must tell us your car's COLOUR"+"\r\n";}		
	if (document.getElementById("fuelType").options[document.getElementById("fuelType").selectedIndex].value == ""){theErrorMessage+="Please tell us what FUEL TYPE your car uses"+"\r\n";}
	if (document.getElementById("bodyType").options[document.getElementById("bodyType").selectedIndex].value == ""){theErrorMessage+="We need to know your car's BODY TYPE"+"\r\n";}
	if (document.getElementById("manualAutomatic").options[document.getElementById("manualAutomatic").selectedIndex].value == ""){theErrorMessage+="We need to know if your car is MANUAL / AUTOMATIC"+"\r\n";}
	if (document.getElementById('fullReg').value == ""){theErrorMessage+="We need to know your FULL Registration Plate Number"+"\r\n";}
	if (document.getElementById('year').value == ""){theErrorMessage+="We need to know what YEAR your car was registered"+"\r\n";}
	if (document.getElementById('engineSize').value == ""){theErrorMessage+="We require a value for ENGINE SIZE"+"\r\n";}
	if (document.getElementById('mileage').value == ""){theErrorMessage+="We require a value for MILEAGE"+"\r\n";}
	if (document.getElementById("mMonthMonth").options[document.getElementById("mMonthMonth").selectedIndex].value == ""){theErrorMessage+="We need to know what MONTH your car's MOT expires"+"\r\n";}
	if (document.getElementById("mYearYearYearYear").options[document.getElementById("mYearYearYearYear").selectedIndex].value == ""){theErrorMessage+="We need to know what YEAR your car's MOT expires"+"\r\n";}
	if (document.getElementById("tMonthMonth").options[document.getElementById("tMonthMonth").selectedIndex].value == ""){theErrorMessage+="We need to know what MONTH your car TAX expires"+"\r\n";}
	if (document.getElementById("tYearYearYearYear").options[document.getElementById("tYearYearYearYear").selectedIndex].value == ""){theErrorMessage+="We need to know the TAX YEAR of your car"+"\r\n";}
	if (document.getElementById("previousOwners").options[document.getElementById("previousOwners").selectedIndex].value == ""){theErrorMessage+="We need to know how many PREVIOUS OWNERS your car has had"+"\r\n";}
	if (document.getElementById("serviceHistory").options[document.getElementById("serviceHistory").selectedIndex].value == ""){theErrorMessage+="Please tell us about your car's SERVICE HISTORY"+"\r\n";}
	if (document.getElementById("lSDayDay").options[document.getElementById("lSDayDay").selectedIndex].value == ""){theErrorMessage+="Please tell us the DAY of your car's LAST RECORDED SERVICE or select 'UNKNOWN'"+"\r\n";}
	if (document.getElementById("lSMonthMonth").options[document.getElementById("lSMonthMonth").selectedIndex].value == ""){theErrorMessage+="Please tell us the MONTH of your car's LAST RECORDED SERVICE or select 'UNKNOWN'"+"\r\n";}
	if (document.getElementById("lSYearYearYearYear").options[document.getElementById("lSYearYearYearYear").selectedIndex].value == ""){theErrorMessage+="Please tell us the YEAR of your car's LAST RECORDED SERVICE or select 'UNKNOWN'"+"\r\n";}
	if (document.getElementById('setsOfKeys').value == ""){theErrorMessage+="We require a value for YEAR"+"\r\n";}
	if (document.getElementById('howLongOwned').value == ""){theErrorMessage+="Please tell us HOW LONG you have OWNED your car"+"\r\n";}
	if (document.getElementById("engine").options[document.getElementById("engine").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's ENGINE"+"\r\n";}
	if (document.getElementById("gearbox").options[document.getElementById("gearbox").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's GEARBOX"+"\r\n";}
	if (document.getElementById("clutch").options[document.getElementById("clutch").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's CLUTCH"+"\r\n";}
	if (document.getElementById("steering").options[document.getElementById("steering").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's STEERING"+"\r\n";}
	if (document.getElementById("suspension").options[document.getElementById("suspension").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's SUSPENSION"+"\r\n";}
	if (document.getElementById("brakes").options[document.getElementById("brakes").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's BRAKES"+"\r\n";}
	if (document.getElementById("carpets").options[document.getElementById("carpets").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's CARPETS"+"\r\n";}
	if (document.getElementById("seatTrim").options[document.getElementById("seatTrim").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's SEAT TRIM"+"\r\n";}
	if (document.getElementById("interior").options[document.getElementById("interior").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's INTERIOR"+"\r\n";}
	if (document.getElementById("exhaust").options[document.getElementById("exhaust").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's EXHAUST"+"\r\n";}
	if (document.getElementById("lightLenses").options[document.getElementById("lightLenses").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's LIGHT LENSES"+"\r\n";}
	if (document.getElementById("windscreen").options[document.getElementById("windscreen").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's WINDSCREEN"+"\r\n";}
	if (document.getElementById("bodywork").options[document.getElementById("bodywork").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's BODYWORK"+"\r\n";}
	if (document.getElementById("tyres").options[document.getElementById("tyres").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's TYRES"+"\r\n";}
	if (document.getElementById("alloyWheels").options[document.getElementById("alloyWheels").selectedIndex].value == ""){theErrorMessage+="Please tell us the condition of your car's WHEELS"+"\r\n";}
	if (document.getElementById('howMuchWanted').value == ""){theErrorMessage+="Please tell us HOW MUCH you are hoping to get for your car"+"\r\n";}
	if (document.getElementById('whereHeard').value == ""){theErrorMessage+="Please tell us WHERE YOU HEARD ABOUT US"+"\r\n";}
	if (document.getElementById('name').value == ""){theErrorMessage+="Please supply us with a contact NAME"+"\r\n";}
	if (document.getElementById('townOrCity').value == ""){theErrorMessage+="Please tell the TOWN / CITY your car is located in"+"\r\n";}
	if (document.getElementById("phoneOrEmail").options[document.getElementById("phoneOrEmail").selectedIndex].value == ""){theErrorMessage+="Please tell us whether you'd prefer us to contact you by PHONE or EMAIL"+"\r\n";}
	if ((document.getElementById("phoneOrEmail").options[document.getElementById("phoneOrEmail").selectedIndex].value == "Phone") && ((document.getElementById('phoneNumber').value == "") || (document.getElementById('phoneNumber').value.length < 10))){theErrorMessage+="Please provide us with a valid PHONE NUMBER"+"\r\n";}
	if ((document.getElementById("phoneOrEmail").options[document.getElementById("phoneOrEmail").selectedIndex].value == "Email") && ((document.getElementById('emailAddress').value == "") || ((document.getElementById('emailAddress').value).indexOf("@") == -1) || ((document.getElementById('emailAddress').value).indexOf(".") == -1))){theErrorMessage+="Please provide us with a valid EMAIL ADDRESS"+"\r\n";}
	if ((document.getElementById('emailAddress').value != document.getElementById('emailConfirm').value)){theErrorMessage+="Your EMAIL ADDRESS and CONFIRMATION EMAIL ADDRESS do not match."+"\r\n";}
	if (theImage=='1' && ((document.getElementById('humanOrBot').value).toLowerCase())=="justify reciprocal"){;}else{if (theImage=='2' && ((document.getElementById('humanOrBot').value).toLowerCase())=="overhead government"){;}else{if (theImage=='3' && ((document.getElementById('humanOrBot').value).toLowerCase())=="flat convention"){;}else{theErrorMessage+="Anti Spam Box is not correct, please try again\r\n";}}}
if (theErrorMessage!=""){alert(theErrorMessage);}else{document.contactUs.submit();}
}
// -->
