// JavaScript Document
function checkEnquiryForm(){
	var doc = document.forms[0]
	var Email = doc.emailAddress
	var emailFormat  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

	if (doc.name.value == ""){
		alert("Sorry, you will need to fill in your name !")
		doc.name.focus()
		return false;
	}

	if (!emailFormat.test(Email.value)){
		alert('Sorry, your email address is not correct !');
		doc.emailAddress.focus();																											
		return false;
	}

	if (doc.enquiry.value == ""){
		alert("Sorry, you will need to fill in the enquiry box !")
		doc.enquiry.focus()
		return false;
	}
}

function checkForm(){
	var doc = document.forms[0]
	var Email = doc.emailAddress
	var emailFormat  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

	if (doc.firstName.value == ""){
		alert("Sorry, you will need to fill in your first name !")
		doc.firstName.focus()
		return false;
	}
	if (doc.surName.value == ""){
		alert("Sorry, you will need to fill in your surname !")
		doc.surName.focus()
		return false;
	}
	if (doc.street.value == ""){
		alert("Sorry, you will need to fill in your street name !")
		doc.street.focus()
		return false;
	}
	if (doc.city.value == ""){
		alert("Sorry, you will need to fill in the city name !")
		doc.city.focus()
		return false;
	}
	if (doc._recipients.value == ""){
		alert("Sorry, you will need to select a dealer first.")
		return false
	}
	if (!emailFormat.test(Email.value)){
		alert('Sorry, your email address is not correct !');
		doc.emailAddress.focus();																											
		return false;
	}
}