In order to validate an email address with JavaScript it is more convenient and efficient use this function (according with w3school):
function validateEmail(){var x=document.f.email.value;var atpos=x.indexOf("@");var dotpos=x.lastIndexOf(".");if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) { alert("Not a valid e-mail address"); return false; }}
I use it and it's perfect. I hope to be useful.