<!--
function validateForm(form) {
	// validate the Contact Name
	if (!isAsci(form.Name)) {
		alert('Please enter a valid Contact Name');
		form.Name.focus();
		return false;
	}
	
	// validate the phone number
	if (form.Phone.value == '' || !validPhone(form.Phone.value)) {
		alert('Please enter a valid phone number');
		form.Phone.focus();
		return false;
	}
	
		// Validate the email address
	if (!validEmail(form.Email)) {
 		alert('Your email address doesn\'t appear to be valid.\nPlease make sure that you enter a valid email address.');
 		form.Email.focus();
 		return false;
	 }
	
		// validate the FindAW field
	if (form.FindOut.options[(form.FindOut.selectedIndex)].value == ""){
		alert('Please select a \'How did you FIND OUT about Greybox Homes?\' method ');
		form.FindOut.focus();
		return false;	
	}
	return true;
}

function isAsci(obj) {
	var check=/^[a-zA-Z\s*]+$/;

	
	if(obj.value.search(check) == -1)
		return false;
	else
		return true;
}

 function validEmail(emailad) {
 	var exclude=/[^@\-\.\_\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;
 	var check=/@[\w\-]+\./;
 	var checkend=/\.[a-zA-Z]{2,3}$/;
	
 	if(((emailad.value.search(exclude) != -1)||(emailad.value.search(check)) == -1)||(emailad.value.search(checkend) == -1))
 		return false;
 	else
 		return true;
}

function validPostCode (value) {
	var postCodeSet = "0123456789";
	var loc;
	if (value.length != 4)
		return false;
	for (n=0;n<=value.length - 1;n++) {
		loc = postCodeSet.indexOf(value.charAt(n));
		if (loc == -1) { 			
			return false;
		}
	}	
	return true;
}

function validPhone (value) {
	var phoneNumberSet = "0123456789-+-. ()\t\r\n\f";
	var loc;
	for (m=0;m<=value.length - 1;m++) {
		loc = phoneNumberSet.indexOf(value.charAt(m));
		if (loc == -1) { 			
			return false;
		}
	}
	return true;
}

// -->