/* Go to "http://www.interspire.com/content/articles/23/1/Using-Inline-Form-Validation" for more information */
function checkForm() {
email = document.getElementById("email").value;
  if (email == "") {
document.getElementById("apDiv-error").style.display = "inline";
document.getElementById("email").select();
document.getElementById("email").focus();
  return false;
  }
  var emailValidation = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
  if (!emailValidation.test(email)) {
document.getElementById("apDiv-error").style.display = "inline";
document.getElementById("email").select();
document.getElementById("email").focus();
  return false;
  }
hideError();
window.open('', 'popupwindow', 'width=260,height=400');
document.mailinglist.submit();
  return true;
}

function hideError() {
document.getElementById("apDiv-error").style.display = "none"
}

function disableEnterKey(e) {
  var key;
  if(window.event)
key = window.event.keyCode;
  else
key = e.which;
  if(key == 13)
  return false;
  else
  return true;
}
