function validateForm() {

    if (document.info.name.value=="") {
       alert("Please enter your \"Name\".")
       document.info.name.focus();
	 return false;
    }
    if (!validateAlpha(document.info.name.value)) {
		alert('Please verify that there are only alphabetic and . , - \n characters in the \"Name\" box.');
		document.info.name.focus();
		return false;
	}	
	if (document.info.address.value=="") {
       alert("Please enter your \"Address\".")
       document.info.address.focus();
	 return false;
    }	
	if (!validateAlphaNum(document.info.address.value) && (document.info.address.value!="")) {
		alert('Please verify that there are only alphabetic, numeric and . , - \n characters in the \"Address\" box.');
		document.info.address.focus();
		return false;
	}
	if (document.info.city.value=="") {
       alert("Please enter your \"City\".")
        document.info.city.focus();
	  return false;
      }
	if (!validateAlpha(document.info.city.value)) {
		alert('Please verify that there are only alphabetic and . , - \n characters in the \"City\" box.');
		document.info.city.focus();
		return false;
	}
	if (info.state.selectedIndex == 0){
       alert("The first \"State\" option is not a valid selection.  Please choose a State.");
       document.info.state.focus();
       return (false);
    }
	
	if (document.info.zip.value=="") {
       alert("Please enter your \"Zip Code\".")
        document.info.zip.focus();
	  return false;
      }
	
    if (!validateNum(document.info.zip.value) && (document.info.zip.value!="")) {
		alert('Please verify that there are only numeric \n characters in the \"Zip Code\" box. \n There should also be 5 numbers.');
		document.info.zip.focus();
		return false;
	}
	if ((document.info.email.value=="") && (document.info.dphone.value=="") && (document.info.ephone.value=="")) {
       alert('Please enter information into either \"Daytime Phone\", \"Evening Phone\", or \"E-mail" box.');
        document.info.email.focus();
        return false;
	}	
	if (!validateEmail(document.info.email.value) && (document.info.email.value!="")) {
		alert('Please enter a valid \"E-mail\" address using correct syntax. \n Example: \"joe@somewhere.com\"');
		document.info.email.focus();
		return false;
	}
	if (!validatePhone(document.info.dphone.value) && (document.info.dphone.value!="")) {
       alert('The \"Daytime Phone\" box is not mandatory, but if used, must not contain \n other than 10 numbers(including area code) and \"-\" used as a separator.');
        document.info.dphone.focus();
        return false;
	}
	if (!validatePhone(document.info.ephone.value) && (document.info.ephone.value!="")) {
       alert('The \"Evening Phone\" box is not mandatory, but if used, must not contain \n other than 10 numbers(including area code) and \"-\" used as a separator.');
        document.info.ephone.focus();
        return false;
	}
	
	if (info.contact_time.selectedIndex == 0){
       alert("The first \"Best Contact Time\" option is not a valid selection.  Please choose a time.");
       document.info.contact_time.focus();
       return (false);
    }
	
	if (info.hear_about_us.selectedIndex == 0) {
       alert("The first \"How Did You Hear About Us?\" option is not a valid selection.  Please choose a selection.");
       document.info.hear_about_us.focus();
       return (false);
    }
	
	if (!validateAlphaNum(document.info.other.value) && (document.info.other.value!="")) {
		alert('Please verify that there are only alphabetic, numeric, and . , - \n characters in the \"Other\" box.');
		document.info.other.focus();
		return false;
	}
	
	if (info.interested_in.selectedIndex == 0){
       alert("The first \"Interested In\" option is not a valid selection.  Please Choose One.");
       document.info.interested_in.focus();
       return (false);
    }
	
	if (info.timeframe.selectedIndex == 0){
       alert("The first \"Timeframe\" option is not a valid selection.  Please Choose One.");
       document.info.timeframe.focus();
       return (false);
    }
	
	if (info.system.selectedIndex == 0){
       alert("The first \"Do You Own a Home\" option is not a valid selection.  Please Choose One.");
       document.info.system.focus();
       return (false);
    }
		   
	if (!validateAlphaNum(document.info.message.value) && (document.info.message.value!="")) {
		alert('Please verify that there are only alphabetic, numeric, and . , \n characters in the \"Message\" box.');
		document.info.message.focus();
		return false;
	}
	if (!validateSize(document.info.message.value)) {
		alert('The \"Comment\" box cannot exceed 2000 characters.');
		document.info.message.focus();
		return false;
	}




document.info.submit();
}


function validateAlpha(strValue) {
	var objRegExp  = /(^[a-zA-Z',.\-\ ]+$)/;
	return objRegExp.test(strValue);
}

function validateAlphaNum(strValue) {
	var objRegExp  = /(^[a-z0-9A-Z',.\-\ ]+$)/;
	return objRegExp.test(strValue);
}

function validateAlphaNumText(strValue) {
	var objRegExp  = /(^[a-z0-9A-Z',&@#$%!.\-\ ]+$)/;
	return objRegExp.test(strValue);
}


function validateNum(strValue) {
	var objRegExp  = /(^[0-9',.\-\ ]+$)/;
	return objRegExp.test(strValue);
}

function validateEmail(strValue) {
	var objRegExp = /^[a-z0-9]([a-z0-9_\-\.]*)@([a-z0-9_\-\.]*)(\.[a-z]{2,3}(\.[a-z]{2}){0,2})$/i;
	return objRegExp.test(strValue);
}

function validatePhone(strValue) {
	var objRegExp = (/^(\d{3})-?\d{3}-?\d{4}$/);
	return objRegExp.test(strValue);
}

function validateSize( strValue ) {
var strTemp = strValue;
if(strTemp.length > 2000)
{
return false;
} 
return true;
}
