function Prenota_CityTour(TIPO_UTENTE){
	Posti_Liberi = "si";
	if (document.FrmPrenotazione.DT_data.value == "") alert("Selezionare una data");
	else if (document.FrmPrenotazione.num_adulti.value == "0" && document.FrmPrenotazione.num_bambini.value == "0") alert("Selezionare numero adulti/bambini");
	else if (TIPO_UTENTE == "Business" && document.FrmPrenotazione.RagSoc.value == "") alert("Inserire Ragione Sociale");
	//else if (TIPO_UTENTE == "Business" && document.FrmPrenotazione.PIVA.value == "") alert("Inserire P.IVA");
	//else if (TIPO_UTENTE == "Business" && document.FrmPrenotazione.PIVA.value.length != 11) alert("Inserire P.IVA valida");
	//else if (TIPO_UTENTE == "Business" && isNaN(document.FrmPrenotazione.PIVA.value)) alert("Inserire P.IVA valida");
	else if (document.FrmPrenotazione.Nome.value == "") alert("Inserire Nome");
	else if (document.FrmPrenotazione.Cognome.value == "") alert("Inserire Cognome");
	//else if (document.FrmPrenotazione.Indirizzo.value == "") alert("Inserire Indirizzo");
	//else if (document.FrmPrenotazione.Citta.value == "") alert("Inserire Citta");
	//else if (document.FrmPrenotazione.Cap.value == "") alert("Inserire Cap");
	//else if (document.FrmPrenotazione.Stato.value == "") alert("Inserire Stato");
	else if (document.FrmPrenotazione.Email.value == "") alert("Inserire Email");	
	else if (document.FrmPrenotazione.Email.value.indexOf("@") == -1 || document.FrmPrenotazione.Email.value.indexOf(".") == -1) alert("Inserire Email valido");	
	//else if (document.FrmPrenotazione.Telefono.value == "") alert("Inserire Telefono");
	else if (document.FrmPrenotazione.CB_Privacy.checked == false) alert("Prendere visione della legge sui dati personali.");
	else{
		ID_Da_Escludere = ""; 
		re = /\//gi;
		Data_Controllare = new String(document.FrmPrenotazione.DT_data.value);
		Data_Controllare = Data_Controllare.replace(re, "-");
		TotPostiDaRiservareAdulti = document.FrmPrenotazione.num_adulti.value;
		TotPostiDaRiservareBambini = document.FrmPrenotazione.num_bambini.value;
		TotPostiDaRiservareGratis = document.FrmPrenotazione.num_bambini_gratis.value;
		TotPostiDaRiservare = parseInt(TotPostiDaRiservareAdulti) + parseInt(TotPostiDaRiservareBambini) + parseInt(TotPostiDaRiservareGratis);
		eval(loadXMLDoc("../_manage/JS_CheckPostiLiberi.cfm","Data_Controllare=" + Data_Controllare + "&TotPostiDaRiservare=" + TotPostiDaRiservare + "&ID_Da_Escludere=" + ID_Da_Escludere));
		if (Posti_Liberi == "si") document.FrmPrenotazione.submit();
		else alert("Attenzione non sono disponibili sufficenti posti a sedere per la data richiesta");
	}
}

function ApriZoom(){
	window.open("../finestra/finestra.cfm","Privacy","menubar=yes,scrollbars=yes,resizable=yes,width=680,height=350,left=50,top=50")
}

function PrenotaOnLine(){
	if (document.FrmLogin.username.value == "") alert("Inserire username");
	else if (document.FrmLogin.password.value == "") alert("Inserire password");
	else document.FrmLogin.submit();
}


function ShowDiv(NumLivello){
	document.getElementById(NumLivello).style.visibility="visible";
}

function HideDiv(NumLivello){
	document.getElementById(NumLivello).style.visibility="hidden";
}

function ForgetPsw(){
	if (document.FrmLogin.Email.value == "") alert("Inserire Email");
	else {
		document.FrmLogin.RecuperaDati.value = "si";
		document.FrmLogin.submit();
	}
}