//
function isNameEmpty(strfield1) {
//
strfield1 = document.emailForm.fullName.value 
  //Full Name field
    if (strfield1 == "" || strfield1 == null || !isNaN(strfield1) || strfield1.charAt(0) == ' ')
    {
    alert("Your name is necessary. Please amend and retry.")
    return false;
    }
    return true;
}
//function to check valid email address
function isValidEmail(strEmail){
  validRegExp =   /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
  checkEmail = document.emailForm.email.value;
   // search email text for regular exp matches
    if (checkEmail.search(validRegExp) == -1) 
   {
      alert('A valid e-mail address is required. Please amend and retry');
      return false;
    } 
    return true; 
}
//
function isCommentsEmpty(strfield2) {
//
strfield2 = document.emailForm.message.value 
  //Comments field 
    if (strfield2 == "" || strfield2 == null || strfield2.charAt(0) == ' ')
    {
    alert("Don't have anything to say? Please amend and retry.")
    return false;
    }
    return true;
}
//function that performs all functions, defined in the onsubmit event handler
function check(form){
if (isNameEmpty(form.field1)){
  if (isValidEmail(form.email)){
		if (isCommentsEmpty(form.field2)){		
		  return true;
		}
	  }
}
return false;
}
//