Why do you not simplify things and cut out the clumsy email verification function. Replace:-
Code:
if(document.theform.email.value == "") {
alert ( "Please fill in your email address." );
valid = false;
}
if(Verify_Email_Address(document.theform.email.value)){
alert ( "Please enter a valid email address.");
valid = false;
}
By:-
Code:
var em = document.theform.email.value;
if (!(/^([a-z0-9])([\w\.\-\+])+([a-z0-9])\@(([\w\-]?)+\.)+([a-z]{2,4})$/i.test(em))) {
alert ( "Please fill in a valid email address." );
valid = false;
}
BTW, the time to say "thanks" is afterwards, not beforehand which gives the impression that you take other people's unpaid assistance for granted. Or as British politician Neil Kinnock put it, "Don't belch before you have had the meal." Prefer to use "please" beforehand and if you find a response helpful then you can use the "Thank User For This Post" button.