function formSubmit(arrayCheck){
	var azienda			= document.contatti.azienda;
	var firstName		= document.contatti.firstName;
	var lastName		= document.contatti.lastName;
	var nation			= document.contatti.nation;
	var phone			= document.contatti.phone;
	var phone_reg_exp 	= /^([0-9_\.\-\+\ \/])+$/;
	var email	 		= document.contatti.email;
	var email_reg_exp 	= /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
	var privacy 		= document.contatti.privacy.checked;
	var colorKO			= "#F36E6E";
	
	if (azienda.value == "" || azienda.value == "undefined"){
		alert (arrayCheck["azienda"]);
		azienda.style.backgroundColor = colorKO;
		azienda.focus();
	}
	else if (firstName.value == "" || firstName.value == "undefined"){
		alert (arrayCheck["firstName"]);
		firstName.style.backgroundColor = colorKO;
		firstName.focus();
	}
	else if (lastName.value == "" || lastName.value == "undefined"){
		alert (arrayCheck["lastName"]);
		lastName.style.backgroundColor = colorKO;
		lastName.focus();
	}
	else if (nation.value == "" || nation.value == "undefined"){
		alert (arrayCheck["nation"]);
		nation.style.backgroundColor = colorKO;
		nation.focus();
	}
	else if (phone.value != "" && !phone_reg_exp.test(phone.value)){
		alert(arrayCheck["phone2"]);
		phone.style.backgroundColor = colorKO;
		phone.value = '';
		phone.focus();
	}
	else if ((email.value == "") || (email.value == "undefined")){
		alert(arrayCheck["email1"]);
		email.style.backgroundColor = colorKO;
		email.focus();
	}
	else if (email.value != "" && !email_reg_exp.test(email.value)){
		alert(arrayCheck["email2"]);
		email.style.backgroundColor = colorKO;
		email.value = '';
		email.focus();
	}
	else if (privacy == false){
		alert(arrayCheck["privacy"]);
	}
	else{
		document.contatti.action = 'modules/Contatti/form.php';
		document.contatti.submit();
	}
}



function colorOK(field){
	var colorOK	= "#FFFFFF";
	if (field == "azienda")
		document.contatti.azienda.style.backgroundColor = colorOK;
	if (field == "firstName")
		document.contatti.firstName.style.backgroundColor = colorOK;
	if (field == "lastName")
		document.contatti.lastName.style.backgroundColor = colorOK;
	if (field == "nation")
		document.contatti.nation.style.backgroundColor = colorOK;
	if (field == "phone")
		document.contatti.phone.style.backgroundColor = colorOK;
	if (field == "email")
		document.contatti.email.style.backgroundColor = colorOK;
}