

function formValidator(){
	// Make quick references to our fields
	var name = document.getElementById('Name');
	
	var email = document.getElementById('email');
	var phone = document.getElementById('Tele');
	
	
	// Check each input in the order that it appears in the form!
	  
       if(name.value=="")
       {
       alert("Please enter your name");
       name.focus();
       return false;
       }
	  
	   
	   
	 
	  if(emailValidator(email, "Please enter a valid email address"))
	  {
	     if(isNumeric(phone, "Please enter a valid phone number"))
	    {
      
		return true;
        }
	
	  }
	return false;
	
}

function emailValidator(elem, helperMsg){
	var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	if(elem.value.match(emailExp)){
		return true;
	}else{
		alert(helperMsg);
		elem.focus();
		return false;
	}
}
function isNumeric(elem, helperMsg){
	var alphaExp = /^[0-9]+$/;
	if(elem.value.match(alphaExp)){
		return true;
	}else{
		alert(helperMsg);
		elem.focus();
		return false;
	}
}


   

