function CreateNew () {
 str = document.createnew.email.value;

 vRetVal = (str.lastIndexOf(".") > 2) && (str.indexOf("@") > 0) && (str.lastIndexOf(".") > (str.indexOf("@")+1)) && (str.indexOf("@") == str.lastIndexOf("@"));
  
 if (!vRetVal) {
  alert("The format of this email is incorrect.");
  return false;
 }

 if (document.createnew.email.value != document.createnew.cemail.value) {
  alert("The system requires that email addresses match.");
  return false;
 }
 
 document.createnew.dowhat.value = "create";
 document.createnew.submit();
}
