
function checkForm (inForm) {
    if ( inForm.email.value=="" || inForm.email.value==inForm.email.defaultValue) {
          alert ("Please enter a valid email address before submitting this form");
          return false;
    } else {
          if (checkEmail(inForm.email)) {
	        return confirm ("You entered: "+inForm.email.value+"\n\nIs this correct?");
	  } else {
	        return false;
	  }
    }
}

function checkEmail (inField) {
    if (inField.value != "") {
        if (inField.value.indexOf("@",1) == -1 || inField.value.indexOf(".",1) == -1) {
           alert("Please enter a valid Internet email address.\nFormat: username@host.domain.");
           inField.select();
           inField.focus();
       }  else {
          return true;
       }
    }
}
