function emailCheck () {
   
    var theForm = document.forms[0];
    var emailStr = theForm.email.value;
    var emailPat=/^(.+)@(.+)$/;
    var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
    var validChars="\[^\\s" + specialChars + "\]";
    var quotedUser="(\"[^\"]*\")";
    var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
    var atom=validChars + '+';
    var word="(" + atom + "|" + quotedUser + ")";
    var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
    var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
    var matchArray=emailStr.match(emailPat);
    if (matchArray==null) {
	alert("Your e-mail address is incorrectly formatted.\nPlease re-enter your e-mail address in the proper format.\n(e.g.: johndoe@aol.com)");
        theForm.email.select();
        theForm.email.focus();
	return false;
    }
    var user=matchArray[1];
    var domain=matchArray[2];
    if (user.match(userPat)==null) {
	alert("Your e-mail address is incorrectly formatted.\nPlease re-enter your e-mail address in the proper format.\n(e.g.: johndoe@aol.com)");
        theForm.email.select();
        theForm.email.focus();
        return false;
    }
    // Domain is symbolic name
    var domainArray=domain.match(domainPat);
    if (domainArray==null) {
        theForm.email.select();
        theForm.email.focus();
	alert("Your e-mail address is incorrectly formatted.\nPlease re-enter your e-mail address in the proper format.\n(e.g.: johndoe@aol.com)");
        return false;
    }
    var atomPat=new RegExp(atom,"g");
    var domArr=domain.match(atomPat);
    var len=domArr.length;
    if (domArr[domArr.length-1].length<2 || 
    domArr[domArr.length-1].length>3) {
	alert("Your e-mail address is incorrectly formatted.\nPlease re-enter your e-mail address in the proper format.\n(e.g.: johndoe@aol.com)");
        theForm.email.select();
        theForm.email.focus();
        return false;
    }
    if (len<2) {
	alert("Your e-mail address is incorrectly formatted.\nPlease re-enter your e-mail address in the proper format.\n(e.g.: johndoe@aol.com)");
        theForm.email.select();
        theForm.email.focus();
        return false;
    }
    return true;
}
