<!--

function checkSearchForm(theForm) {
if (theForm.s_type.selectedIndex==0) {
alert("Please choose a type");
return false;
}
return true;
}

function checkContactForm(theForm) {
if (theForm.name.value=="") {
alert("Please add your name");
theForm.name.focus();
return false;
}
if (theForm.name.value.match("@")) {
alert("Your name includes an illegal character");
theForm.name.focus();
return false;
}   
if (theForm.tel.value=="") {
alert("Please add your telephone number");
theForm.tel.focus();
return false;
}
if (theForm.tel.value.match("@")) {
alert("Your telephone number includes an illegal character");
theForm.tel.focus();
return false;
} 
if (theForm.email.value=="") {
alert("Please add your email");
theForm.email.focus();
return false;
}
if (theForm.email.value.indexOf("@") == -1) {
alert("Please enter a valid email address (you have not entered an @ sign)");
theForm.email.focus();
return false;
}    
if (theForm.email.value.indexOf(".") == -1) {
alert("Please enter a valid email address (you have not entered a full stop anywhere)");
theForm.email.focus();
return false;
}
return true;
}


function checkSellingForm(theForm) {
if (theForm.make.value=="") {
alert("Please add the make/manufacturer");
theForm.make.focus();
return false;
}
if (theForm.model.value=="") {
alert("Please add the model");
theForm.model.focus();
return false;
}
if (theForm.year.value=="") {
alert("Please add the year of registration or letter");
theForm.year.focus();
return false;
}
if (theForm.name.value=="") {
alert("Please add your name");
theForm.name.focus();
return false;
}
if (theForm.name.value.match("@")) {
alert("Your name includes an illegal character");
theForm.name.focus();
return false;
}  
if (theForm.tel.value=="") {
alert("Please add your telephone number");
theForm.tel.focus();
return false;
}
if (theForm.tel.value.match("@")) {
alert("Your telephone number includes an illegal character");
theForm.tel.focus();
return false;
}  
if (theForm.email.value=="") {
alert("Please add your email");
theForm.email.focus();
return false;
}
if (theForm.email.value.indexOf("@") == -1) {
alert("Please enter a valid email address (you have not entered an @ sign)");
theForm.email.focus();
return false;
}
if (theForm.email.value.indexOf(".") == -1) {
alert("Please enter a valid email address (you have not entered a full stop anywhere)");
theForm.email.focus();
return false;
}
return true;
}
//-->


