function formCheck(form) {
	var errMsg="";

	var vFName=form.firstname.value;
	var error_FName="È richiesto un nome proprio.\n";
	if(vFName=="") { errMsg+=error_FName; }

	var vLName=form.lastname.value;
	var error_LName="È richiesto un cognome.\n";
	if(vLName=="") { errMsg+=error_LName; }

	var vCompany=form.company.value;
	var error_Company="È richiesta una società.\n";
	if(vCompany=="") { errMsg+=error_Company; }

	var vCity=form.city.value;
	var error_City="È richiesta una città.\n";
	if(vCity=="") { errMsg+=error_City; }

	var vState=form.state.value;
	var error_State="È richiesto uno stato o una provincia.\n";
	if(vState=="") { errMsg+=error_State; }

	var vZip=form.zip.value;
	var error_Zip="È richiesto un codice di avviamento postale (CAP).\n";
	if(vZip=="") { errMsg+=error_Zip; }

	var vCountry=form.country[form.country.selectedIndex].value;
	var error_Country="È richiesto un paese. Selezionarne uno dall'elenco dei paesi.\n";
	if(vCountry==35555) { errMsg+=error_Country; }

	var vPhone=form.phone.value;
	var error_Phone="È richiesto un numero telefonico.\n";
	if(vPhone=="") { errMsg+=error_Phone; }

	var vEmail=form.email.value;
	var error_Email="È richiesto un indirizzo e-mail.\n";
	var error_EmailInvalid="L'indirizzo e-mail deve contenere il simbolo '@' e non può includere delle virgole. Correggere l'indirizzo e-mail.\n";
	var RE_comma=new RegExp(",");
	var RE_at=new RegExp("@");
	if(vEmail=="") { errMsg+=error_Email; }
	else if(RE_comma.test(vEmail) || !RE_at.test(vEmail)) { errMsg+=error_EmailInvalid; }

	if(document.getElementById('kc')) {
		if(!displaycheck()) { errMsg+="Immettere il codice captcha correttamente.\n"; }
	}

	if(errMsg!="") {
		alert(errMsg);
		return false;
	}
	else {
		return true;
	}
}

