function Validate(theForm)
{
  if (theForm.email.value == "")
  { alert("Please enter an e-mail address before hitting the 'Subscribe' button");
    theForm.email.focus();
    return (false); }
  if (CheckEmail(theForm.email)) return (false);
return (true);
}

function CheckEmail(txtbox) {
 txt=txtbox.value;
 if (txt.indexOf("@")<2){
  alert("This email address seems wrong. Please check the prefix and '@' sign.");
  txtbox.focus();
  return (true);
 }
 if ((txt.indexOf(".com")<6)&&(txt.indexOf(".org")<6)
     &&(txt.indexOf(".gov")<6)&&(txt.indexOf(".net")<6)
     &&(txt.indexOf(".mil")<6)&&(txt.indexOf(".edu")<6))
  {	alert("This email address seems wrong. Please check the suffix for accuracy. (It should include a.com, .edu, .net, .org, .gov or .mil)");
  	txtbox.focus();
  	return (true);
  }
}
