function checkEmailAddress(field) { 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() {
nmcheck = document.TheForm.nm.value
if (nmcheck.length < 1) { alert('Please enter your name.')
return }
good = false
checkEmailAddress(document.TheForm.em) if ((document.TheForm.em.value == document.TheForm.emx.value) && (good)) { alert('Name and email address fields verified good.') }
if ((document.TheForm.em.value != document.TheForm.emx.value) && (good)) { alert('Both e-mail address entries must match.') }
}
</script>