
function check_news_email() {
  var valid = 1;

  if (document.news.email.value.indexOf("@") == -1) {
	valid = 0; mes = ' All e-mail addresses must contain a "@"!';
  }
  if (document.news.email.value.indexOf(" ") != -1) {
	valid = 0; mes = " E-mail addresses cannot contain spaces!";
  }
  if (document.news.email.value.length <= 6) {
	valid = 0; mes = " This is too short to be a valid e-mail address!";
  }
  if (document.news.email.value.indexOf("@.") != -1 || document.news.email.value.indexOf (".@") != -1) {
	valid = 0; mes = ' Dot punctuation cannot be adjacent to the "@"!';
  }

  if (valid == 0 && document.news.email.value.length > 0) {
	alert('"'+ document.news.email.value + '"' + " is not a valid e-mail address." + "\n" + mes + "\n" + " Please try again.");
	document.news.email.value = "";
	document.news.email.focus();
  }
}

function checkNewsForm() {
  if (document.news.Name.value == "" || document.news.email.value == "") { alert("Please fill in all fields to send the message."); return false; }
  else { return true; }
}

function message(txt) { window.status = txt; }
function remove_message() { window.status = ""; }
