function checkcontact() {
 
  name = document.contactusform.name.value;
  message = document.contactusform.message.value;
  email = document.contactusform.email.value;
  filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
  
 returnval = true;
 hideAllErrors();
  if (name == "") {
 returnval = false;
 document.getElementById("nameError").style.display = "inline";
  }
 if (email == "") {
 returnval = false;
 document.getElementById("emailError").style.display = "inline";
  }
 if (email != "" && !(filter.test(email))) { 
 returnval = false;
 document.getElementById("emailError").style.display = "none";
 document.getElementById("email2Error").style.display = "inline";
 }
 if (message == "") {
 returnval = false;
 document.getElementById("messageError").style.display = "inline";
  } 

 return returnval;
}
 
function hideAllErrors() {
document.getElementById("nameError").style.display = "none"
document.getElementById("emailError").style.display = "none"
document.getElementById("email2Error").style.display = "none"
document.getElementById("messageError").style.display = "none"
}


function checksignup() {
 
  memail = document.mailinglist.email.value;
  filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
  
 returnval = true;
 hideAllErrors2();
 if (memail == "") {
 returnval = false;
 document.getElementById("emailError").style.display = "inline";
  }
 if (memail != "" && !(filter.test(memail))) { 
 returnval = false;
 document.getElementById("emailError").style.display = "none";
 document.getElementById("email2Error").style.display = "inline";
 } 

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

function checksignup_new() {
 
  mfirstname = document.mailinglist.firstname.value;
  mlastname = document.mailinglist.lastname.value;
  memail = document.mailinglist.email.value;
  mconfirmemail = document.mailinglist.confirmemail.value;
  filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
  
 returnval = true;
 hideAllErrors3();
 if (mfirstname == "") {
 returnval = false;
 document.getElementById("firstnameError").style.display = "inline";
  }
 if (mlastname == "") {
 returnval = false;
 document.getElementById("lastnameError").style.display = "inline";
  }
 if (memail == "") {
 returnval = false;
 document.getElementById("emailError").style.display = "inline";
  }
 if (memail != "" && !(filter.test(memail))) { 
 returnval = false;
 document.getElementById("emailError").style.display = "none";
 document.getElementById("email2Error").style.display = "inline";
 } 
 if (mconfirmemail == "") {
 returnval = false;
 document.getElementById("confirmemailError").style.display = "inline";
  }
 if (mconfirmemail != "" && !(filter.test(mconfirmemail))) { 
 returnval = false;
 document.getElementById("confirmemailError").style.display = "none";
 document.getElementById("confirmemail2Error").style.display = "inline";
 } 
 if (memail != mconfirmemail) {
 returnval = false;
 document.getElementById("email3Error").style.display = "inline";
  }

 return returnval;
}
 
function hideAllErrors3() {
document.getElementById("firstnameError").style.display = "none";
document.getElementById("lastnameError").style.display = "none";
document.getElementById("emailError").style.display = "none";
document.getElementById("email2Error").style.display = "none";
document.getElementById("email3Error").style.display = "none";
document.getElementById("confirmemailError").style.display = "none";
document.getElementById("confirmemail2Error").style.display = "none";
}

