function Prenota_CityTour(TIPO_UTENTE){
	Posti_Liberi = "si";
	if (document.FrmPrenotazione.DT_data.value == "") alert("Select date");
	else if (document.FrmPrenotazione.num_adulti.value == "0" && document.FrmPrenotazione.num_bambini.value == "0") alert("Select adult/children number");
	else if (TIPO_UTENTE == "Business" && document.FrmPrenotazione.RagSoc.value == "") alert("Insert Company");
	//else if (TIPO_UTENTE == "Business" && document.FrmPrenotazione.PIVA.value == "") alert("Insert VAT number");
	//else if (TIPO_UTENTE == "Business" && document.FrmPrenotazione.PIVA.value.length != 11) alert("Insert valid VAT number");
	//else if (TIPO_UTENTE == "Business" && isNaN(document.FrmPrenotazione.PIVA.value)) alert("Insert valid VAT number");
	else if (document.FrmPrenotazione.Nome.value == "") alert("Insert Name");
	else if (document.FrmPrenotazione.Cognome.value == "") alert("Insert Surname");
	//else if (document.FrmPrenotazione.Indirizzo.value == "") alert("Insert address");
	//else if (document.FrmPrenotazione.Citta.value == "") alert("Insert city");
	//else if (document.FrmPrenotazione.Cap.value == "") alert("Insert Zip Code");
	//else if (document.FrmPrenotazione.Stato.value == "") alert("Insert State");
	else if (document.FrmPrenotazione.Email.value == "") alert("Insert Email");	
	else if (document.FrmPrenotazione.Email.value.indexOf("@") == -1 || document.FrmPrenotazione.Email.value.indexOf(".") == -1) alert("Insert valid Email");	
	//else if (document.FrmPrenotazione.Telefono.value == "") alert("Insert phone");
	else if (document.FrmPrenotazione.CB_Privacy.checked == false) alert("Show and accept the personal date law.");
	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("Attention, there are not available tickets for request date");
	}
}

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("Insert username");
	else if (document.FrmLogin.password.value == "") alert("Insert 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("Insert Email");
	else {
		document.FrmLogin.RecuperaDati.value = "si";
		document.FrmLogin.submit();
	}
}