// JavaScript Document
function checkform() {
	var bSubmit = true;
	var messaggio = "";
	var valore = "";

	var i = new RegExp("([a-zA-Z\ \']{2,})");
	valore = $("#ut_nome").val();
	if((!i.test(valore)) || (valore = '')) { 
		messaggio += "\nPlease provide information for field: First name";
		$("#ut_nome").addClass("errore");
		bSubmit = false;
	}else{
		$("#ut_nome").removeClass("errore");
	}

	var i = new RegExp("([a-zA-Z\ \']{2,})");
	valore = $("#ut_cognome").val();
	if((!i.test(valore)) || (valore = '')) { 
		messaggio += "\nPlease provide information for field: Surname";
		$("#ut_cognome").addClass("errore");
		bSubmit = false;
	}else{
		$("#ut_cognome").removeClass("errore");
	}

	var i = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
	valore = $("#ut_email").val();
	if((!i.test(valore)) || (valore = '')) { 
		messaggio += "\nPlease provide information for field: Email";
		$("#ut_email").addClass("errore");
		bSubmit = false;
	}else{
		$("#ut_email").removeClass("errore");
	}

	valore = $("#ut_nazione").val();
	if(valore == '') { 
		messaggio += "\nPlease provide information for field: Country";
		$("#ut_nazione").addClass("errore");
		bSubmit = false;
	}else{
		$("#ut_nazione").removeClass("errore");
	}

	if(bSubmit){
		if(confirm("Please confirm authenticity of your data information and please authorize treatment of your persona information")) {
			$("#ut_informativa_1").attr("checked", "checked");
		} else {
			bSubmit = false;
		}
	}else{
		alert(messaggio);
	}
	return bSubmit;
}
