var good;
function checkemailaddress(field) {
// the following expression must be all on one line...
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
   }
}

u = window.location;
m = "I thought this might interest you ...";
function mailthisurl(){
   good = false
   checkemailaddress(document.emailer.address)
   if (good){
      // the following expression must be all on one line...
      window.location = "mailto:"+document.emailer.address.value+"?subject="+m+"&body="+document.title+" "+u;
   }
}
