function modifyaccount_Validator(theForm)
{
  if (theForm.email.value == "")
  {
    alert("Please enter your Email Address.");
    theForm.email.focus();
    return (false);
  }

  if ((theForm.email.value.indexOf('@',0) == -1) || (theForm.email.value.indexOf('.',0) == -1))
  {
    alert("Email Address is incorrectly formatted. Please enter again.");
    theForm.email.focus();
    return (false);
  }

  if ((theForm.passwordcurrent.value != "") && ((theForm.passwordnew.value == "") || (theForm.passwordnewconfirm.value == "")))
  {
    alert("If changing password please provide current and new. Please try again.");
    theForm.passwordcurrent.focus();
    return (false);
  }

  if ((theForm.passwordcurrent.value == "") && ((theForm.passwordnew.value != "") || (theForm.passwordnewconfirm.value != "")))
  {
    alert("If changing password please provide current and new. Please try again.");
    theForm.passwordcurrent.focus();
    return (false);
  }

  if (theForm.passwordnew.value != theForm.passwordnewconfirm.value)
  {
    alert("New Password entries do not match. Please try again.");
    theForm.passwordnew.focus();
    return (false);
  }

  return (true);
}
