function checkForm() {
 
  firstname = document.emaillist.firstname.value;
  lastname = document.emaillist.lastname.value;
  email = document.emaillist.email.value;
  filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
  
 returnval = true;
 hideAllErrors();
  if (firstname == "") {
 returnval = false;
 document.getElementById("firstnameError").style.display = "inline";
  }
 if (lastname == "") {
 returnval = false;
 document.getElementById("lastnameError").style.display = "inline";
  } 
 if (email == "") {
 returnval = false;
 document.getElementById("emailError").style.display = "inline";
  }
if (email != "" && !(filter.test(email))) { 
 returnval = false;
 document.getElementById("email2Error").style.display = "inline";
 }
 return returnval;
}
 
  function hideAllErrors() {
document.getElementById("firstnameError").style.display = "none"
document.getElementById("lastnameError").style.display = "none"
document.getElementById("emailError").style.display = "none"
document.getElementById("email2Error").style.display = "none"
}


function checkemail() {
 
  sfirstname = document.subscribe.firstname.value;
  slastname = document.subscribe.lastname.value;
  semail = document.subscribe.email.value;
  filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
  
 returnval = true;
 hideAllErrors2();
  if (sfirstname == "") {
 returnval = false;
 document.getElementById("firstnameError").style.display = "inline";
  }
 if (slastname == "") {
 returnval = false;
 document.getElementById("lastnameError").style.display = "inline";
  } 
 if (semail == "") {
 returnval = false;
 document.getElementById("emailError").style.display = "inline";
  }
if (semail != "" && !(filter.test(semail))) { 
 returnval = false;
 document.getElementById("email2Error").style.display = "inline";
 }
 return returnval;
}
 
  function hideAllErrors2() {
document.getElementById("firstnameError").style.display = "none"
document.getElementById("lastnameError").style.display = "none"
document.getElementById("emailError").style.display = "none"
document.getElementById("email2Error").style.display = "none"
}

function searchemail() {
 
  semail = document.emailsearch.email.value;
  filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
  
 returnval = true;
 hideAllErrors3();
 if (semail == "") {
 returnval = false;
 document.getElementById("emailError").style.display = "inline";
  }

 return returnval;
}
 
function hideAllErrors3() {
  document.getElementById("emailError").style.display = "none";
}
