

/********************************************************
* Validate form fields for the property inquiry form.
*********************************************************/

function verify() {

	if (ContactUs.First_Name.value == "") {
		alert("Please enter your first name.");
   		ContactUs.First_Name.focus();
   		return false;
	}
	if (ContactUs.Last_Name.value == "") {
		alert("Please enter your last name.");
		ContactUs.Last_Name.focus();
		return false;
	}
	if (ContactUs.Day_Phone.value == "") {
		alert("Please enter your daytime phone.");
		ContactUs.Day_Phone.focus();
		return false;
	}
	if (ContactUs.EmailAddress.value == "") {
		alert("Please enter your email address.");
		ContactUs.EmailAddress.focus();
		return false;
	}
	
	if (ContactUs.strCAPTCHA.value == ""){
   		alert("You did not enter the anti-spam verification code.");
   		ContactUs.strCAPTCHA.focus();
   		return false;
   	}
		
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.ContactUs.EmailAddress.value)){
	alert("Invalid email address. Please re-enter.");
	document.ContactUs.EmailAddress.focus();
	return false;
	}
	
	return true;
}