
//Validation Script file  for the Forgot Password Page

function ForgotPasswordValidator()
{

  if (document.getElementById("UserFirstName").value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    document.getElementById("UserFirstName").focus();
    return (false);
  }

  if (document.getElementById("UserFirstName").value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"First Name\" field.");
    document.getElementById("UserFirstName").focus();
    return (false);
  }

  if (document.getElementById("UserFirstName").value.length > 20)
  {
    alert("Please enter at most 20 characters in the \"First Name\" field.");
    document.getElementById("UserFirstName").focus();
    return (false);
  }

  if (document.getElementById("UserLastName").value == "")
  {
    alert("Please enter a value for the \"UserLastName\" field.");
    document.forms[0].UserLastName.focus();
    return (false);
  }

  if (document.getElementById("UserLastName").value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"UserLastName\" field.");
    document.getElementById("UserLastName").focus();
    return (false);
  }

  if (document.forms[0].UserLastName.value.length > 25)
  {
    alert("Please enter at most 25 characters in the \"UserLastName\" field.");
    document.getElementById("UserLastName").focus();
    return (false);
  }

  if (document.getElementById("UserEmail").value == "")
  {
    alert("Please enter a value for the \"Email Address\" field.");
    document.getElementById("UserEmail").focus();
    return (false);
  }

  if (document.getElementById("UserEmail").value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"Email Address\" field.");
    document.getElementById("UserEmail").focus();
    return (false);
  }

  if (document.getElementById("UserEmail").value.length > 55)
  {
    alert("Please enter at most 55 characters in the \"Email Address\" field.");
    document.getElementById("UserEmail").focus();
    return (false);
  }
  return (true);

}
