function isEmpty(strfield1) {
//change "field1, field2 and field3" to your field names

strfield1 = document.forms[0].first_name.value 

  //name field
    if (strfield1 == "" || strfield1 == null || !isNaN(strfield1) || strfield1.charAt(0) == ' ')
    {
    alert("A valid First Name is required\nPlease try again")
    return false;
    }
    return true;
}

//function to check valid email address
function isValidEmail(strEmail){
  validRegExp = /^[^@]+@[^@]+\.[a-z]{2,}$/i;
  strEmail = document.forms[0].email.value;

   // search email text for regular exp matches
    if (strEmail.search(validRegExp) == -1) 
   {
      alert('A valid e-mail address is required\nPlease try again');
      return false;
    } 
    return true; 
}

//function that performs all functions, defined in the onsubmit event handler

function check(form){
if (isEmpty(form.first_name)){
		if (isValidEmail(form.email)){
		  return true;
		}
 }
return false;
}