function isValidEmail(){
  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 amend and retry');
      return false;
    } 
    return true; 
}



function checkCheckBoxes() {
    var myerror=false;
	var napis="";
	strEmail = document.forms[0].email.value;
	validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;

	if (document.forms[0].conditions.checked == false)		
		{	
		myerror=true;
		napis += "Please tick box to accept Terms & Conditions\n"
		}


		if (document.forms[0].first_name.value == "")		
		{	
		myerror=true;
		napis += "Please provide your first name\n"
		}

		if (strEmail.search(validRegExp) == -1)		
		{	
		myerror=true;
		napis += "A valid e-mail address is required\n"
		}

		if (document.forms[0].last_name.value == "")		
		{	
		myerror=true;
		napis += "Please provide your last name\n"
		}

		if (document.forms[0].dob.value == "")		
		{	
		myerror=true;
		napis += "Please provide your date of birth\n"
		}

		if (document.forms[0].address.value == "")		
		{	
		myerror=true;
		napis += "Please provide your address\n"
		}

		if (document.forms[0].emergency_name.value == "")		
		{	
		myerror=true;
		napis += "Please provide Emergency contact name\n"
		}

		if (document.forms[0].emergency_no.value == "")		
		{	
		myerror=true;
		napis += "Please provide Emergency tel no\n"
		}






     if (!myerror){
        return true;
  }else{

   		alert(napis);
		return false;
		
  }




	


}





