<!--  Script for IM eSearch Website Feedback Form


// Validate the feedback form entry fields
function validateForm()
{
  var msg;
  var blnCorrectSyntax = true; 

	msg = "_________________________________________________\n\n"
	msg += "The following field(s) are missing or incorrect.\n";
	msg += "Please correct these fields and re-submit.\n";
	msg += "________________________________________________\n\n"


  if (document.fbform.txtFirstname.value == "")
  {
      blnCorrectSyntax = false;
      msg += "*  Please enter your first name\n";
      document.fbform.txtFirstname.select()
      document.fbform.txtFirstname.focus()
  }

  if (document.fbform.txtLastname.value == "")
  {
      blnCorrectSyntax = false;
      msg += "*  Please enter your last name\n";
      document.fbform.txtLastname.select()
      document.fbform.txtLastname.focus()
  }

  if (document.fbform.txtCompany.value == "")
  {
      blnCorrectSyntax = false;
      msg += "*  Please identify your company\n";
      document.fbform.txtCompany.select()
      document.fbform.txtCompany.focus()
  }

  // email address must be in the form a@b.c
  // email address is invalid if it does NOT contain both @ and . (but they cannot be the first character)
  // also invalid if it DOES contain =, <, >, ;, *, : characters
  // These checks are to prevent people attempting to hack into the system using this form
  if ((document.fbform.txtEmail.value.indexOf('@')<1) ||
      (document.fbform.txtEmail.value.indexOf('.')<3) ||
      (document.fbform.txtEmail.value.indexOf('=')!=-1) ||
      (document.fbform.txtEmail.value.indexOf('>')!=-1) ||
      (document.fbform.txtEmail.value.indexOf('<')!=-1) ||
      (document.fbform.txtEmail.value.indexOf('*')!=-1) ||
      (document.fbform.txtEmail.value.indexOf(';')!=-1) ||
      (document.fbform.txtEmail.value.indexOf(':')!=-1))
   {
      blnCorrectSyntax = false;
      msg += "*  Please enter a valid email address\n";
      document.fbform.txtEmail.select()
      document.fbform.txtEmail.focus()
   }

  if (!blnCorrectSyntax)
  {
     alert(msg);
     return false;
  }
}




// end of Script for IM eSearch Website Feedback Form  -->