Updated check_email_script.tpl this should prevent any problems with Gift Certificates as well as Affiliate registrations also:
Code:
{* $Id: check_email_script.tpl,v 1.6.2.2 2004/03/26 09:47:33 svowl Exp $ *}
{literal}
<script language="JavaScript1.2">
function checkEmailAddress(field) {
var goodEmail = field.value.search(/^[A-Za-z0-9]{1}([A-Za-z0-9_\-\.]+)[^\.]\@[^\.]([A-Za-z0-9_\-\.]+\.)+[A-Za-z]{2,6}[ ]*$/gi);
if (goodEmail!=-1) {
if(document.registerform.emailtwo) {
if(field.value==document.registerform.emailtwo.value) {
return true;
} else {
alert("Email's do not match, please correct!");
document.registerform.emailtwo.focus();
document.registerform.emailtwo.select();
return false;
}
} else {
return true;
}
} else {
{/literal}
alert("{$lng.txt_email_invalid|replace:"\n":" "|replace:"\r":" "}");
{literal}
field.focus();
field.select();
return false;
}
}
</script>
{/literal}