/***********************************************************
 Comment: Validate the E-Mail
 Input:  (must)ChkStr -- The E-mail Address
 Returns: true -- nonlicet
          false -- licit
 Editor:  cndragon  2000-12-13
 Modify:
***********************************************************/
function isMail( ChkStr )
{
  if (ChkStr.length < 5) {return false;}
  if (ChkStr.indexOf(" ") > 2) {return false;}
  var i = 1;
  var sLength = ChkStr.length;
  while ((i < sLength) && (ChkStr.charAt(i) != "@"))
  { i++
  }
  if ((i >= sLength) || (ChkStr.charAt(i) != "@")) {return false;}
  else {i += 2;}
  while ((i < sLength) && (ChkStr.charAt(i) != "."))
  { i++
  }
  if ((i >= sLength - 1) || (ChkStr.charAt(i) != ".")){ return false;}
  else {return true;}
}
