// JavaScript Document
function validFields() {
	
	var last_name = document.getElementById("last_name").value;
	if(last_name == '') {
		
		alert("Please Enter Last Name!");
		document.getElementById("last_name").focus();
		return false;
	}
	if(ValidData("last_name")==false)
	{
		return false;	
	}
	
	
	var first_name = document.getElementById("first_name").value;
	if(first_name == '') {
		
		alert("Please Enter First Name!");
		document.getElementById("first_name").focus();
		return false;
	}
	if(ValidData("first_name")==false)
	{
		return false;	
	}
	
	if(ValidData("trainingName")==false)
	{
		return false;	
	}
	
	if(ValidData("certificationDate")==false)
	{
		return false;	
	}
	
	
	
	
	var email = document.getElementById("email").value;
	if(notValidEmail(email)==true) {
		
		alert("Please Enter a valid Email address!");
		document.getElementById("email").value = "";
		document.getElementById("email").focus();
		return false;
	}
	
	var land_phone = document.getElementById("land_phone").value;
	if(land_phone == '') {
		
		alert("Please Enter phone Number!");
		document.getElementById("land_phone").focus();
		return false;
	}
	if(ValidData("land_phone")==false)
	{
		return false;	
	}
	
	if(ValidData("teachingStudio")==false)
	{
		return false;	
	}
		
	if (confirm("Do you want to Continue?"))
	{
		/*var email = document.getElementById("email").value;
		//document.teachersTraining.action="teachersConfirmation.php";
		//document.teachersTraining.submit();
		alert("Email will be sent to the applicant ("+email+").");
		window.location.href="teachersTraining.php";*/
		return true;
	}
	return false;
}
