function ContactUsForm_Validator(theForm)
{

  strError = validateEmail(theForm.strEmail.value)
  if (strError != "") {
		alert(strError);
    	theForm.strEmail.focus();
    	return (false);
  }
  
  
  if (theForm.strFirstName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.strFirstName.focus();
    return (false);
  }
  
  if (theForm.strLastName.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.strLastName.focus();
    return (false);
  }

  if (theForm.strMiscellaneous.value == "")
  {
    alert("Please enter your \"Feedback Comment or Request\" field.");
    theForm.strMiscellaneous.focus();
    return (false);
  }
  
  link = new Array()
  link[0] = theForm.link1.value;
   
  for (i = 0; i < link.length; i++){
 
	  if (link[i] != "") {
	  
		var fileext = "";
		
		if (link[i].lastIndexOf(".") != -1) {
			fileext = (link[i].substring(link[i].lastIndexOf(".") + 1, link[i].length)).toLowerCase();
		}
		
		if (!(fileext == "pdf" || fileext == "doc" || fileext == "jpg" || fileext == "gif")) {
			alert("Please upload only pdf, doc, jpg, jpeg, or gif files for  \"Photo Attachment\" ");
			return (false);
		}
		
	  }
  }
  
 
   return (true);  
}

