function formValidator(){
	var name = document.getElementById('name');
	var email = document.getElementById('email');
	var comments = document.getElementById('comments');

	
		if(isAlphabeten(name, "Το όνομά σας είναι λάθος.\n Μόνο ελληνικοί χαρακτήρες με κόμμα και κενά επιτρέπονται.")){
		if(emailValidator(email, "To email σας δέν είναι στη σωστή μορφή.")){
		if(notEmpty(comments, "Τα σχόλια σας δέν πρέπει να είναι κενά.")){
		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 isAlphabeten(elem, helperMsg){
	var alphaExp = /^([Α-Ωα-ω]\s?)+([,]\s?([Α-Ωα-ω]\s?)+)*$/;
	// /^[a-zA-Z&\s]+$/;
	if(elem.value.match(alphaExp)){
		return true;
	}else{
		alert(helperMsg);
		elem.focus();
		return false;
	}
}

function notEmpty(elem, helperMsg){
	if(elem.value.length == 0){
		alert(helperMsg);
		elem.focus(); // set the focus to this input
		return false;
	}
	return true;
}
