

document.write('<form name="TheForm" >')
document.write('Subscribe to the Spiteri Lucas mailing list <input onkeypress="return noenter()" style="height: 16px; width: 120px;border:1px solid #000; font-family: Arial, Helvetica, sans-serif;	font-size: x-small;"  type="text" name="em" >')
document.write('<input type="button" value="Subscribe" style="height: 20px; width: 80px;border:1px solid #000; background:#ccc;" name="SB" onClick="sendOff();">')


// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header

var good;

function noenter() {
  return !(window.event && window.event.keyCode == 13); 
}


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(){
   good = false
   checkEmailAddress(document.TheForm.em)
   if (good){
	  reDir = './email.asp?email=' + document.TheForm.em.value    
      window.location=  reDir
   }     
}

document.write('</form>')

