<!--

function validate_inquiryform() {

	if (trimString(document.inquiryform.firstname.value) == "")
	{
		alert("Please tell us your First Name.");
		return;
	}
	if (trimString(document.inquiryform.email.value) == "")
	{
		alert("Please tell us your Email Address. Your Email Address will be kept confidential, and will not be re-sold or re-distributed in any way, shape, matter or form.");
		return;
	}
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(trimString(inquiryform.email.value))){
		}
		else {
		alert("The Email address you entered is invalid. Please re-enter it.")
	  return;
	  }
	  
	var typeOption = -1;
	for (i=0; i<inquiryform.type.length; i++) {
	if (inquiryform.type[i].checked) {
	typeOption = i;
	}
	}
	if (typeOption == -1) {
	alert("Please tell us whether you're a potential buyer or seller.");
	return;
	}

	if (trimString(document.inquiryform.propertyclass.value) == "")
	{
		alert("Please tell us the property type that you're interested in.");
		return;
	}
	if (trimString(document.inquiryform.location.value) == "")
	{
		alert("Please tell us the Maryland location that you're interested in.");
		return;
	}
	if (trimString(document.inquiryform.description.value) == "")
	{
		alert("Please briefly describe your Real Estate needs.");
		return;
	}

	if (document.inquiryform.termsagreement.checked)
		 {

		 }
	else
		 {
			alert("Please verify that you agree to the terms and conditions");
	return;
		 }

	
	if (trimString(document.inquiryform.antispam.value) == "")
	{
		alert("Please fill in the Anti-Spam code.");
		return;
	}
	

document.getElementById('inquiry_form_submit').innerHTML = "<img src=\"images/processing.gif\" width=\"66\" height=\"25\" alt=\"processing\" border=\"0\">";
// document.getElementById('inquiry_form_message').innerHTML = "<span class=\"errormessage\">Request processing, please wait ...</span>";
document.inquiryform.submit()

}


//-->
