// JavaScript Document
function isemailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
        result = true;
  }
  return result;
}
function FormValidator(WebForm1)
{
  if (document.WebForm1.email.value == "")
  {
    alert("Please enter your email address");
    document.WebForm1.email.focus();
    return (false);
  }

  if (!isemailAddr(document.WebForm1.email.value))
  {
    alert("The email address you've entered isn't in the proper format (ie: name@domain.com). Please try again.");
    document.WebForm1.email.focus();
    return (false);
  }
	
  if (document.WebForm1.email.value.length < 5)
  {
    alert("Please enter at least 5 characters in the \"email\" field.");
    document.WebForm1.email.focus();
    return (false);
  }
  if (document.WebForm1.email.value != document.WebForm1.Confirmemail.value)
  {
    alert("The 'Email Address' and the 'Confirm Email Address' fields do not match. Please try again.");
    document.WebForm1.Confirmemail.focus();
    return (false);
  }

  if (document.WebForm1.zaddtlcomments.value == "")
  {
    alert("You haven't entered any information on the form. Please select choices from the drop-down menus and describe your problem in the text box below");
    document.WebForm1.topic.focus();
    return (false);
  }

  return (true);
}// JavaScript Document
