function validateAndSubmitForm(form)
{
	if(!checkString(form.elements["number"], "numero ospiti", false)){
		return;
	}
	if(!checkString(form.elements["datain"], "data arrivo", false)){
		return;
	}
	if(!checkString(form.elements["dataout"], "data partenza", false)){
		return;
	}
	if(!checkString(form.elements["name"], "Nome", false)){
		return;
	}
	if(!checkString(form.elements["surname"], "Cognome", false)){
		return;
	}
	if(!isEmail(form.elements["email"].value)){
		alert("Inserire un indirizzo di email corretto!");
		return;
	}
	if(!checkString(form.elements["phone"], "telefono", false)){
		return;
	}
	form.action="checkcaptcha.php";
	//form.action="prenotazioni_Invio.php";
	form.submit();
}

//REGISTRAZIONE
function ValidateAndSubmitGuestbookForm(form)
{
	if(!checkString(form.elements["name"], "nome", false))
		return;
	if(!checkString(form.elements["surname"], "cognome", false))
		return;
	if(!isEmail(form.elements["email"].value)){
		alert("Inserire un indirizzo di email corretto!");
		return;
	}
	if(!checkString(form.elements["commento"], "cognome", false))
		return;
	form.action="checkcaptcha.php";
	//form.action="prenotazioni_Invio.php";
	form.submit();
}



