
function validateForm(formObject)
{
	if (isBlank(formObject.subject)) {
		alert("Please enter a Subject.");
		return false;
	}
	if (!validateEmail(formObject.send_from.value)) {
		alert("Please enter a valid Email Address.");
		return false;
	}
	if (isBlank(formObject.Message)) {
		alert("Please enter a message.");
		return false;
	}
	return true;
}


function isBlank(checkField) {
	// if a field is blank, highlight it
	if (checkField.value.length == 0) {
		return true;
	}
	//if it is not blank, clear the highlight
	else {
		return false;
	}
}

function validateEmail( strValue) {
/************************************************
DESCRIPTION: Validates that a string contains a
  valid email pattern.

 PARAMETERS:
   strValue - String to be tested for validity

RETURNS:
   True if valid, otherwise false.

REMARKS: Accounts for email with country appended
  does not validate that email contains valid URL
  type (.com, .gov, etc.) or valid country suffix.
*************************************************/
var objRegExp  =
 /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

  //check for valid email
  return objRegExp.test(strValue);
}