function failEmail(vField){
   var checkString = vField.value ;
   var checkChar;
   var newstr = "";
   var posAt = checkString.indexOf("@");
   if (posAt < 0 ) {
      alertBox (vField, "The email address you have entered does not contain\n an @ symbol.", "text");
      return (true);
    } 
   var posDot = checkString.lastIndexOf(".");
    if ( posDot < posAt+3) {
      alertBox (vField, "The email address you have entered either does not contain\n a dot after the @ symbol or not at least two characters separation.", "text");
      return (true);
    }
   var posEnd = checkString.length;
    if ( posEnd < posDot+2) {
      alertBox (vField, "The email address you have entered does not contain\n at least one character after the final dot.", "text");
      return (true);
    }
   for (var i = 0; i < posEnd; i++) {
      checkChar = checkString.substring(i, i + 1);
      if ((checkChar >= "A" && checkChar <= "Z") || (checkChar >= "a" && checkChar <= "z") || (checkChar == "@") || (checkChar == ".") || (checkChar == "_") || (checkChar == "-") || (checkChar >= "0" && checkChar <= "9")) {
         newstr += checkChar;
      } else {
         alertBox ( vField, checkChar + " Is not allowed.\n\nPlease use only the following non-alphanumeric characters:\n\ndot hyphen underscore @", "text" ); 
         return (true);
      }
      return (false);
   }
}
