function formValidator(){
	// Make quick references to our fields
	var email = document.getElementById('email');
	// Check each input in the order that it appears in the form!
		
	if(emailValidator(email, "Please enter a valid Email Address")){
		return true;
	}
	
		return false;
}

function isEmpty(elem, helperMsg){
	if(elem.value.length == 0){
		alert(helperMsg);
		elem.focus(); // set the focus to this input
		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;
	}
}

