<!-- // Don't forget to add the onSubmit in your form tag. 
// <FORM ACTION="?" METHOD="POST" onSubmit="return checkData()">
function checkCMAData (){
	if (document.cmaForm.Owner_Name.value.length ==0){
		document.cmaForm.Owner_Name.focus();
		alert("Please enter the name of the property's owner.");
		return false;
	}
	if (document.cmaForm.Subject_Address.value.length ==0){
		document.cmaForm.Subject_Address.focus();
		alert("Please enter the address of the property for which you are requesting a CMA report.");
		return false;
	}
	if (document.cmaForm.Town.value.length ==0){
		document.cmaForm.Town.focus();
		alert("Please enter the town of the property for which you are requesting a CMA report.");
		return false;
	}
	if (document.cmaForm.Day_Phone.value.length ==0){
		document.cmaForm.Day_Phone.focus();
		alert("Please enter a Daytime Phone.");
		return false;
	}
	if (document.cmaForm.Evening_Phone.value.length ==0){
		document.cmaForm.Evening_Phone.focus();
		alert("Please enter a Evening Phone.");
		return false;
	}
	if (document.cmaForm.Zip.value.length ==0){
		document.cmaForm.Zip.focus();
		alert("Please enter a Zip Code.");
		return false;
	}
	if (document.cmaForm.Property_Description.value.length ==0){
		document.cmaForm.Property_Description.focus();
		alert("Please enter a Property Description.");
		return false;
	}
	if (document.cmaForm.Property_Size.value.length ==0){
		document.cmaForm.Property_Size.focus();
		alert("Please enter a Property Size.");
		return false;
	}
	if (document.cmaForm.Structure_Age.value.length ==0){
		document.cmaForm.Structure_Age.focus();
		alert("Please enter an Approx. Year Built.");
		return false;
	}
	if (document.cmaForm.Email.value.length ==0){
		document.cmaForm.Email.focus();
		alert("Please enter an e-mail address.");
		return false;
	}
	
	if (document.cmaForm.Email.value.length >0){
		i=document.cmaForm.Email.value.indexOf("@")
		j=document.cmaForm.Email.value.indexOf(".",i)
		k=document.cmaForm.Email.value.indexOf(",")
		kk=document.cmaForm.Email.value.indexOf(" ")
		jj=document.cmaForm.Email.value.lastIndexOf(".")+1
		len=document.cmaForm.Email.value.length
		if ((i>0) && (j>(1+1)) && (k==-1) && (kk==-1) && (len-jj >=2) && (len-jj<=3)) {
		} else {
			document.cmaForm.Email.focus()
			document.cmaForm.Email.select()
			alert("Please enter a valid email address.")
			return false
		}
	}
}
