// JavaScript Document
function clearTitle(box) {
    box.value = "";
    box.style.color = "black";
    box.onfocus = null;
}

//Checks for valid email addresses//

var good;
function checkEmailAddress(field) {

// Note: The next expression must be all on one line...
//       allow no spaces, linefeeds, or carriage returns!
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);

if (goodEmail){
   good = true;
} else {
   alert('Please enter a valid e-mail address.');
   field.focus();
   field.select();
   good = false;
   }
}

function sendOff() {
   checkEmailAddress(document.mailinglist.email);
   return good;
 }
