<!-- // Don't forget to add the onSubmit in your form tag. 
// <FORM ACTION="?" METHOD="POST" onSubmit="return checkData()">
function checkData (){

// Check for valid email
if (document.forms[0].Email.value.length ==0){
document.forms[0].Email.focus()
alert("Please enter an e-mail address.")
return false}
if (document.forms[0].Email.value.length >0){
i=document.forms[0].Email.value.indexOf("@")
j=document.forms[0].Email.value.indexOf(".",i)
k=document.forms[0].Email.value.indexOf(",")
kk=document.forms[0].Email.value.indexOf(" ")
jj=document.forms[0].Email.value.lastIndexOf(".")+1
len=document.forms[0].Email.value.length

if ((i>0) && (j>(1+1)) && (k==-1) && (kk==-1) &&
(len-jj >=2) && (len-jj<=3)) {
}
else {
document.forms[0].Email.focus()
document.forms[0].Email.select()
alert("Please enter an exact email address.\n" +
document.forms[0].Email.value + " is invalid.")
return false}
}

}
//-->