function verifyForm(form) {

    // Make quick references to our fields
	var name = form.name;
	var email = form.email;
	var comment = form.comment;
	
	if(isEmpty(name, "Please supply a name")){
    	if(isEmpty(email, "Please supply an email address")){
        	if(isEmpty(comment, "Please supply a comment")){
                if(isEmail(email, "Please provide a valid email address")) {
                
                    return true;
                
                }
        	}
        }
    }
	
	return false;

}

function isEmpty(elem, msg){
	if(elem.value.length == 0){
		alert(msg);
		elem.focus(); // set the focus to this input
		return false;
	}
	return true;
}

function isEmail(elem, msg){
	var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	if(elem.value.match(emailExp)){
		return true;
	}else{
		alert(msg);
		elem.focus();
		return false;
	}
}