

function Emails_Validator(theForm)
{

  if (theForm.Email.value == theForm.EmailNew.value && theForm.EmailBackup.value == theForm.EmailBackupNew.value)
  {
    alert("There's nothing new to add.");
    return (false);
  }

  
  if (theForm.EmailNew.value == "")
  {
    alert("Please enter a value for the \"Primary Email\" field.");
    theForm.EmailNew.focus();
    return (false);
  }


  if (theForm.EmailNew.value.length > 80)
  {
    alert("Please enter at most 80 characters in the \"Primary Email\" field.");
    theForm.EmailNew.focus();
    return (false);
  }
  

  if (theForm.EmailNew.value.length < 5)
  {
    alert("Please enter your primary email.");
    theForm.EmailNew.focus();
    return (false);
  }


  if (allowEmail( (theForm.EmailNew.value) ,  "Email") == 0)
  {
  theForm.EmailNew.focus();
  return (false);
  }
  
  
  if (theForm.EmailBackupNew.value.length > 80)
  {
    alert("Please enter at most 80 characters in the \"Backup Email\" field.");
    theForm.EmailNew.focus();
    return (false);
  }


  if (allowEmail( (theForm.EmailBackupNew.value) ,  "Backup Email") == 0)
  {
  theForm.EmailBackupNew.focus();
  return (false);
  }
    
  return (true);
}




//-->




