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+@).+()$)\b/gi);

if (goodEmail){
   good = true
} else {
   alert('Please enter a valid e-mail address.')
   field.focus()
   field.select()
   good = false
   }
}

function sendOff(){
   namecheck = document.form.name.value    
   if (namecheck.length <1) {
      alert('Please enter your name.')
      return
   }         
   good = false
   checkEmailAddress(document.form.PHORM_FROM)
   if ((document.form.PHORM_FROM.value ==
        document.form.email2.value)&&(good)){
     
   }     
   if ((document.form.PHORM_FROM.value !=
          document.form.email2.value)&&(good)){
          alert("Sorry - both e-mail addresses must match.")
   }
}