// ------------------------------------------------------------------------------------------------------------------------
// POPUPS
// ------------------------------------------------------------------------------------------------------------------------

function Newsletter() {
window.open("../newsletter/popnews.asp?Lang=de","NewsPop","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizeable=0,width=400,height=320")
}

function IsMap() {
window.open("http://www.val-gardena.net/location.asp","POPMap","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizeable=0,width=700,height=450")
}

function pop_ski() {
window.open("http://www.val-gardena.net/skimap/skimap_de.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizeable=0,width=800,height=550")
}

function popAnfrage() {
window.open("http://www.val-gardena.net/taxi/deu/anfrage.asp","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=450,height=400")
}

function pop02() {
window.open("./pop_smap.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizeable=0,width=600,height=425")
}

function VirtualTour() {
window.open("http://www.val-gardena.net/360/val_gardena/deutsch/low/popup.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizeable=0,width=1100,height=600")
}

function skivalleaurina() {
window.open("http://www.klausberg.it/en/map.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skialtabadia() {
window.open("http://www.dolomitisuperski.com/altabadia/en-US/skimap-alta-badia-1833EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skianterselva() {
window.open("pop_anterselva.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=570,height=830")
}

function pop_arabba() {
window.open("pop_arabba.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=800,height=800")
}

function skiarabba() {
window.open("http://www.dolomitisuperski.com/arabba/en-US/skimap-arabba-1863EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skicortina() {
window.open("http://www.dolomitisuperski.com/cortina/en-US/skimap-cortina-d-ampezzo-1821EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skivalleisarco() {
window.open("http://www.dolomitisuperski.com/eisack/skimap.athx?ccode=de-DE","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skifassa() {
window.open("pop_fassa.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skivaldifassa() {
window.open("http://www.dolomitisuperski.com/valfassa/en-US/skimap-val-di-fassa-1851EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skivaldega() {
window.open("pop_valdega.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1050,height=600")
}

function skiobereggen() {
window.open("http://www.dolomitisuperski.com/obereggen/en-US/skimap-obereggen-1888EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skifiemme() {
window.open("http://www.dolomitisuperski.com/fiemme/skimap.athx?ccode=de-DE","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skigardena() {
window.open("www.dolomitisuperski.com/gardena/en-US/skimap-val-gardena-1839EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function paeseortisei() {
window.open("pop_ortisei.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function paesecristina() {
window.open("pop_cristina.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function paeseselva() {
window.open("pop_selva.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function wanderngardena() {
window.open("pop_gardenaestate.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skiplandecorones() {
window.open("pop_plandecorones.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skicasies() {
window.open("pop_plandecorones.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skicastelrotto() {
window.open("pop_castelrotto.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=755,height=552")
}

function skialpedisiusi() {
window.open("http://www.dolomitisuperski.com/seiseralm/en-US/skimap-alpe-di-siusi-1845EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function wanderncastelrotto() {
window.open("pop_castelrottoestate.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skisesto() {
window.open("images/altapusteria.pdf","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skisancandido() {
window.open("images/altapusteria.pdf","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skidobbiaco() {
window.open("images/altapusteria.pdf","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skivillabassa() {
window.open("images/altapusteria.pdf","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skibraies() {
window.open("images/altapusteria.pdf","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skialtapusteria() {
window.open("images/altapusteria.pdf","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skivaldaora() {
window.open("pop_plandecorones.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skirasun() {
window.open("pop_plandecorones.htm","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreiseahrntal() {
window.open("http://www.klausberg.it/en/index.php?main=4&sub=1&seite=skipass+klausberg","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=650")
}

function skipreisebadia() {
window.open("http://www.dolomitisuperski.com/altabadia/en-EN/1965EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreiseantholzertal() {
window.open("http://www.dolomitisuperski.com/hochpust/en-EN/2000EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreisearabba() {
window.open("http://www.dolomitisuperski.com/marmolada/en-EN/1109EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreisecortina() {
window.open("http://www.dolomitisuperski.com/cortina/en-EN/1957EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreiseeggental() {
window.open("http://www.dolomitisuperski.com/fiemme/en-EN/1998EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreiseeisacktal() {
window.open("http://www.dolomitisuperski.com/eisack/en-EN/1969EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreisefassa() {
window.open("http://www.dolomitisuperski.com/valfassa/en-EN/1960EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreisefleimstal() {
window.open("http://www.dolomitisuperski.com/fiemme/en-EN/1998EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreisegroeden() {
window.open("http://www.dolomitisuperski.com/gardena/en-EN/1966EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreisegsiesertal() {
window.open("http://www.dolomitisuperski.com/hochpust/en-EN/2000EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreisehochpustertal() {
window.open("http://www.dolomitisuperski.com/hochpust/en-EN/2000EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreisekronplatz() {
window.open("http://www.dolomitisuperski.com/kronplatz/en-US/495EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreiseschlerngebiet() {
window.open("http://www.dolomitisuperski.com/gardena/en-EN/1966EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}

function skipreisesexten() {
window.open("http://www.dolomitisuperski.com/hochpust/en-EN/2000EN.html","POPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width=1100,height=600")
}


// ------------------------------------------------------------------------------------------------------------------------
// EXPRESS ANFRAGE SMALL (GENERATE DATE)
// ------------------------------------------------------------------------------------------------------------------------

function SetRequestDate(){
	var calcoloarrivo = new Date()
		calcoloarrivo.setDate(calcoloarrivo.getDate()+ 7)
	var calcolopartenza = new Date()
		calcolopartenza.setDate(calcolopartenza.getDate()+ 14)

	var mesearrivo=new Array(11)
	mesearrivo[0]="01"
	mesearrivo[1]="02"
	mesearrivo[2]="03"
	mesearrivo[3]="04"
	mesearrivo[4]="05"
	mesearrivo[5]="06"
	mesearrivo[6]="07"
	mesearrivo[7]="08"
	mesearrivo[8]="09"
	mesearrivo[9]="10"
	mesearrivo[10]="11"
	mesearrivo[11]="12"

	var giornoarrivo=new Array(11)
	giornoarrivo[0]="00"
	giornoarrivo[1]="01"
	giornoarrivo[2]="02"
	giornoarrivo[3]="03"
	giornoarrivo[4]="04"
	giornoarrivo[5]="05"
	giornoarrivo[6]="06"
	giornoarrivo[7]="07"
	giornoarrivo[8]="08"
	giornoarrivo[9]="09"
	giornoarrivo[10]="10"
	giornoarrivo[11]="11"
	giornoarrivo[12]="12"
	giornoarrivo[13]="13"
	giornoarrivo[14]="14"
	giornoarrivo[15]="15"
	giornoarrivo[16]="16"
	giornoarrivo[17]="17"
	giornoarrivo[18]="18"
	giornoarrivo[19]="19"
	giornoarrivo[20]="20"
	giornoarrivo[21]="21"
	giornoarrivo[22]="22"
	giornoarrivo[23]="23"
	giornoarrivo[24]="24"
	giornoarrivo[25]="25"
	giornoarrivo[26]="26"
	giornoarrivo[27]="27"
	giornoarrivo[28]="28"
	giornoarrivo[29]="29"
	giornoarrivo[30]="30"
	giornoarrivo[31]="31"

	var mesepartenza=new Array(11)
	mesepartenza[0]="01"
	mesepartenza[1]="02"
	mesepartenza[2]="03"
	mesepartenza[3]="04"
	mesepartenza[4]="05"
	mesepartenza[5]="06"
	mesepartenza[6]="07"
	mesepartenza[7]="08"
	mesepartenza[8]="09"
	mesepartenza[9]="10"
	mesepartenza[10]="11"
	mesepartenza[11]="12"

	var giornopartenza=new Array(11)
	giornopartenza[0]="00"
	giornopartenza[1]="01"
	giornopartenza[2]="02"
	giornopartenza[3]="03"
	giornopartenza[4]="04"
	giornopartenza[5]="05"
	giornopartenza[6]="06"
	giornopartenza[7]="07"
	giornopartenza[8]="08"
	giornopartenza[9]="09"
	giornopartenza[10]="10"
	giornopartenza[11]="11"
	giornopartenza[12]="12"
	giornopartenza[13]="13"
	giornopartenza[14]="14"
	giornopartenza[15]="15"
	giornopartenza[16]="16"
	giornopartenza[17]="17"
	giornopartenza[18]="18"
	giornopartenza[19]="19"
	giornopartenza[20]="20"
	giornopartenza[21]="21"
	giornopartenza[22]="22"
	giornopartenza[23]="23"
	giornopartenza[24]="24"
	giornopartenza[25]="25"
	giornopartenza[26]="26"
	giornopartenza[27]="27"
	giornopartenza[28]="28"
	giornopartenza[29]="29"
	giornopartenza[30]="30"
	giornopartenza[31]="31"

	var dataarrivo = giornoarrivo[calcoloarrivo.getDate()] + "/" + mesearrivo[calcoloarrivo.getMonth()] + "/" + calcoloarrivo.getYear()
	var datapartenza = giornopartenza[calcolopartenza.getDate()] + "/" + mesepartenza[calcolopartenza.getMonth()] + "/" + calcolopartenza.getYear()
	document.FrmRightRequest.TxtArrivo.value = dataarrivo
	document.FrmRightRequest.TxtPartenza.value = datapartenza
}


// ------------------------------------------------------------------------------------------------------------------------
// EXPRESS ANFRAGE (FORM VALIDATION)
// ------------------------------------------------------------------------------------------------------------------------

function Children(){
	var selection = document.Form1.Bambini.value

	if (selection == "0")
	{
	}
	else
	{
		document.Form1.Altro.value = "Please enter here the age of the children!"
	}
}

function ValidLength(item, len) 
		{	return(item.length >=len);
		}

function ValidEmail(item)
	{	if(!ValidLength(item,5)) return false;
		if(item.indexOf('@',0) == -1) return false;
		if(item.indexOf('.',0) == -1) return false;
		if(item.indexOf(',',0) > 0) return false;
		return true;
	}

function sendit()
{

	if ((document.Form1.NrCamereHotel.value == "0") &&
		(document.Form1.NrCamereGarni.value  == "0") &&
		(document.Form1.NrAppartamenti.value  == "0") &&
		(document.Form1.TxtCamping.value  == "0") &&
		(document.Form1.TxtRifugio.value  == "0"))
	{
		alert("Please choose at least one accommodation type.");
		return false;
	}
	else if ((document.Form1["5Stelle"].checked == 0) &&
		(document.Form1["4Stelle"].checked  == 0) &&
		(document.Form1["3Stelle"].checked  == 0) &&
		(document.Form1["2Stelle"].checked  == 0) &&
		(document.Form1["1Stelle"].checked  == 0))
	{
		alert("Please choose at least one category.");
		return false;
	}
	else if ((document.Form1.SrcLuogo01.checked == 0) &&
		(document.Form1.SrcLuogo02.checked  == 0) &&
		(document.Form1.SrcLuogo03.checked  == 0) &&
		(document.Form1.SrcLuogo04.checked  == 0) &&
		(document.Form1.SrcLuogo05.checked  == 0) &&
		(document.Form1.SrcLuogo06.checked  == 0) &&
		(document.Form1.SrcLuogo07.checked  == 0) &&
		(document.Form1.SrcLuogo08.checked  == 0) &&
		(document.Form1.SrcLuogo09.checked  == 0) &&
		(document.Form1.SrcLuogo10.checked  == 0) &&
		(document.Form1.SrcLuogo11.checked  == 0) &&
		(document.Form1.SrcLuogo12.checked  == 0) &&
		(document.Form1.SrcLuogo13.checked  == 0) &&
		(document.Form1.SrcLuogo14.checked  == 0) &&
		(document.Form1.SrcLuogo15.checked  == 0))  
	{
		alert("Please choose at least one location.");
		return false;
	}
	else 
		Control2()
}

function Control2()
	{	errfound = false;

var CheckBambini = document.Form1.Bambini.value

			if (CheckBambini == "1") {
				if (!ValidLength(document.Form1.Bambino1.value,1)) error(document.Form1.Bambino1,"Please enter the age of the children.")}
			else if (CheckBambini == "2") {
				if (!ValidLength(document.Form1.Bambino1.value,1)) error(document.Form1.Bambino1,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino2.value,1)) error(document.Form1.Bambino2,"Please enter the age of the children.")}
			else if (CheckBambini == "3") {
				if (!ValidLength(document.Form1.Bambino1.value,1)) error(document.Form1.Bambino1,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino2.value,1)) error(document.Form1.Bambino2,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino3.value,1)) error(document.Form1.Bambino3,"Please enter the age of the children.")}
			else if (CheckBambini == "4") {
				if (!ValidLength(document.Form1.Bambino1.value,1)) error(document.Form1.Bambino1,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino2.value,1)) error(document.Form1.Bambino2,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino3.value,1)) error(document.Form1.Bambino3,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino4.value,1)) error(document.Form1.Bambino4,"Please enter the age of the children.")}
			else if (CheckBambini == "5") {
				if (!ValidLength(document.Form1.Bambino1.value,1)) error(document.Form1.Bambino1,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino2.value,1)) error(document.Form1.Bambino2,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino3.value,1)) error(document.Form1.Bambino3,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino4.value,1)) error(document.Form1.Bambino4,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino5.value,1)) error(document.Form1.Bambino5,"Please enter the age of the children.")}
			else if (CheckBambini == "6") {
				if (!ValidLength(document.Form1.Bambino1.value,1)) error(document.Form1.Bambino1,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino2.value,1)) error(document.Form1.Bambino2,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino3.value,1)) error(document.Form1.Bambino3,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino4.value,1)) error(document.Form1.Bambino4,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino5.value,1)) error(document.Form1.Bambino5,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino6.value,1)) error(document.Form1.Bambino6,"Please enter the age of the children.")}
			else if (CheckBambini == "7") {
				if (!ValidLength(document.Form1.Bambino1.value,1)) error(document.Form1.Bambino1,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino2.value,1)) error(document.Form1.Bambino2,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino3.value,1)) error(document.Form1.Bambino3,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino4.value,1)) error(document.Form1.Bambino4,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino5.value,1)) error(document.Form1.Bambino5,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino6.value,1)) error(document.Form1.Bambino6,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino7.value,1)) error(document.Form1.Bambino7,"Please enter the age of the children.")}
			else if (CheckBambini == "8") {
				if (!ValidLength(document.Form1.Bambino1.value,1)) error(document.Form1.Bambino1,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino2.value,1)) error(document.Form1.Bambino2,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino3.value,1)) error(document.Form1.Bambino3,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino4.value,1)) error(document.Form1.Bambino4,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino5.value,1)) error(document.Form1.Bambino5,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino6.value,1)) error(document.Form1.Bambino6,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino7.value,1)) error(document.Form1.Bambino7,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino8.value,1)) error(document.Form1.Bambino8,"Please enter the age of the children.")}
			else if (CheckBambini == "9") {
				if (!ValidLength(document.Form1.Bambino1.value,1)) error(document.Form1.Bambino1,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino2.value,1)) error(document.Form1.Bambino2,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino3.value,1)) error(document.Form1.Bambino3,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino4.value,1)) error(document.Form1.Bambino4,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino5.value,1)) error(document.Form1.Bambino5,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino6.value,1)) error(document.Form1.Bambino6,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino7.value,1)) error(document.Form1.Bambino7,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino8.value,1)) error(document.Form1.Bambino8,"Please enter the age of the children.")
				if (!ValidLength(document.Form1.Bambino9.value,1)) error(document.Form1.Bambino9,"Please enter the age of the children.")}

		if (!ValidLength(document.Form1.Nome.value,3))
			error(document.Form1.Nome,"Please enter your first name.");
		if (!ValidLength(document.Form1.Cognome.value,3))
			error(document.Form1.Cognome,"Please enter your last name.");
		if (!ValidLength(document.Form1.Indirizzo.value,3))
			error(document.Form1.Indirizzo,"Please enter your address.");
		if (!ValidLength(document.Form1.CAP.value,3))
			error(document.Form1.CAP,"Please enter your ZIP code.");
		if (!ValidLength(document.Form1.Citta.value,3))
			error(document.Form1.Citta,"Please enter the name of your city.");
		if (!ValidEmail(document.Form1.Email.value))
			error(document.Form1.Email, "Please enter your e-mail address.");
		if (document.Form1.TxtPrivacy.checked == 0)
			error(document.Form1.TxtPrivacy,"To continue you must agree the privacy statement.");
		if (errfound == false)
			{
			document.Form1.TxtCheck03.value = 'validato'
			document.Form1.BtnSend.disabled = true;
			document.Form1.BtnSend.value = 'Please wait...\nSending your request...';
			document.Form1.submit();
			}
			
}

function error(elem, text)
	{	if (errfound) return;
		window.alert(text)
		elem.select();
		elem.focus;
		errfound = true;
	}


// ------------------------------------------------------------------------------------------------------------------------
// HOTEL SUCHE (FORM VALIDATION)
// ------------------------------------------------------------------------------------------------------------------------

function ValidLength2(item, len) 
	{	return(item.length >=len);
	}

function validateForm1()
{
	formObj = document.FrmSearch;
	if ((formObj.TxtHotel.checked == 0) &&
		(formObj.TxtPension.checked  == 0) &&
		(formObj.TxtGarni.checked  == 0) &&
		(formObj.TxtResidence.checked  == 0) &&
		(formObj.TxtApartments.checked  == 0) &&
		(formObj.TxtRifugi.checked  == 0))
	{
		alert("1) Please choose at least one accommodation type.");
		return false;
	}
	else if ((formObj.Txt1s.checked == 0) &&
		(formObj.Txt2s.checked  == 0) &&
		(formObj.Txt3s.checked  == 0) &&
		(formObj.Txt4s.checked  == 0) &&
		(formObj.Txt5s.checked  == 0))
	{
		alert("2) Please choose at least one category.");
		return false;
	}
	else if ((formObj.TxtOrt1.checked == 0) &&
		(formObj.TxtOrt2.checked  == 0) &&
		(formObj.TxtOrt3.checked  == 0))  
	{
		alert("3) Please choose at least one location.");
		return false;
	}
	else 
		document.FrmSearch.submit();
}

function Control3()
{	errfound = false;
	if (!ValidLength2(document.FrmSKey.TxtKey.value,3))
		error(document.FrmSKey.TxtKey,"Please enter more than 3 characters.");
	if (errfound == false)
		document.FrmSKey.submit();
}

function error(elem, text)
{	if (errfound) return;
	window.alert(text)
	elem.select();
	elem.focus;
	errfound = true;
}


// ANFRAGE KINDER...

function ResetBambini()
{
		document.getElementById('TabBambino1').style.display = 'none'
		document.getElementById('TabBambino2').style.display = 'none'
		document.getElementById('TabBambino3').style.display = 'none'
		document.getElementById('TabBambino4').style.display = 'none'
		document.getElementById('TabBambino5').style.display = 'none'
		document.getElementById('TabBambino6').style.display = 'none'
		document.getElementById('TabBambino7').style.display = 'none'
		document.getElementById('TabBambino8').style.display = 'none'
		document.getElementById('TabBambino9').style.display = 'none'
}

function FBambini()
{
	var BambiniSelection = document.Form1.Bambini.value
	
	if (BambiniSelection == "1")
	{
		document.getElementById('TabBambino1').style.display = ''
		document.getElementById('TabBambino2').style.display = 'none'
		document.getElementById('TabBambino3').style.display = 'none'
		document.getElementById('TabBambino4').style.display = 'none'
		document.getElementById('TabBambino5').style.display = 'none'
		document.getElementById('TabBambino6').style.display = 'none'
		document.getElementById('TabBambino7').style.display = 'none'
		document.getElementById('TabBambino8').style.display = 'none'
		document.getElementById('TabBambino9').style.display = 'none'
		
	}
	else if (BambiniSelection == "2")
	{
		document.getElementById('TabBambino1').style.display = ''
		document.getElementById('TabBambino2').style.display = ''
		document.getElementById('TabBambino3').style.display = 'none'
		document.getElementById('TabBambino4').style.display = 'none'
		document.getElementById('TabBambino5').style.display = 'none'
		document.getElementById('TabBambino6').style.display = 'none'
		document.getElementById('TabBambino7').style.display = 'none'
		document.getElementById('TabBambino8').style.display = 'none'
		document.getElementById('TabBambino9').style.display = 'none'
	}
	else if (BambiniSelection == "3")
	{
		document.getElementById('TabBambino1').style.display = ''
		document.getElementById('TabBambino2').style.display = ''
		document.getElementById('TabBambino3').style.display = ''
		document.getElementById('TabBambino4').style.display = 'none'
		document.getElementById('TabBambino5').style.display = 'none'
		document.getElementById('TabBambino6').style.display = 'none'
		document.getElementById('TabBambino7').style.display = 'none'
		document.getElementById('TabBambino8').style.display = 'none'
		document.getElementById('TabBambino9').style.display = 'none'
	}
	else if (BambiniSelection == "4")
	{
		document.getElementById('TabBambino1').style.display = ''
		document.getElementById('TabBambino2').style.display = ''
		document.getElementById('TabBambino3').style.display = ''
		document.getElementById('TabBambino4').style.display = ''
		document.getElementById('TabBambino5').style.display = 'none'
		document.getElementById('TabBambino6').style.display = 'none'
		document.getElementById('TabBambino7').style.display = 'none'
		document.getElementById('TabBambino8').style.display = 'none'
		document.getElementById('TabBambino9').style.display = 'none'
	}
	else if (BambiniSelection == "5")
	{
		document.getElementById('TabBambino1').style.display = ''
		document.getElementById('TabBambino2').style.display = ''
		document.getElementById('TabBambino3').style.display = ''
		document.getElementById('TabBambino4').style.display = ''
		document.getElementById('TabBambino5').style.display = ''
		document.getElementById('TabBambino6').style.display = 'none'
		document.getElementById('TabBambino7').style.display = 'none'
		document.getElementById('TabBambino8').style.display = 'none'
		document.getElementById('TabBambino9').style.display = 'none'
	}
	else if (BambiniSelection == "6")
	{
		document.getElementById('TabBambino1').style.display = ''
		document.getElementById('TabBambino2').style.display = ''
		document.getElementById('TabBambino3').style.display = ''
		document.getElementById('TabBambino4').style.display = ''
		document.getElementById('TabBambino5').style.display = ''
		document.getElementById('TabBambino6').style.display = ''
		document.getElementById('TabBambino7').style.display = 'none'
		document.getElementById('TabBambino8').style.display = 'none'
		document.getElementById('TabBambino9').style.display = 'none'
	}
	else if (BambiniSelection == "7")
	{
		document.getElementById('TabBambino1').style.display = ''
		document.getElementById('TabBambino2').style.display = ''
		document.getElementById('TabBambino3').style.display = ''
		document.getElementById('TabBambino4').style.display = ''
		document.getElementById('TabBambino5').style.display = ''
		document.getElementById('TabBambino6').style.display = ''
		document.getElementById('TabBambino7').style.display = ''
		document.getElementById('TabBambino8').style.display = 'none'
		document.getElementById('TabBambino9').style.display = 'none'
	}
	else if (BambiniSelection == "8")
	{
		document.getElementById('TabBambino1').style.display = ''
		document.getElementById('TabBambino2').style.display = ''
		document.getElementById('TabBambino3').style.display = ''
		document.getElementById('TabBambino4').style.display = ''
		document.getElementById('TabBambino5').style.display = ''
		document.getElementById('TabBambino6').style.display = ''
		document.getElementById('TabBambino7').style.display = ''
		document.getElementById('TabBambino8').style.display = ''
		document.getElementById('TabBambino9').style.display = 'none'
	}
	else if (BambiniSelection == "9")
	{
		document.getElementById('TabBambino1').style.display = ''
		document.getElementById('TabBambino2').style.display = ''
		document.getElementById('TabBambino3').style.display = ''
		document.getElementById('TabBambino4').style.display = ''
		document.getElementById('TabBambino5').style.display = ''
		document.getElementById('TabBambino6').style.display = ''
		document.getElementById('TabBambino7').style.display = ''
		document.getElementById('TabBambino8').style.display = ''
		document.getElementById('TabBambino9').style.display = ''
	}
	else
	{
		document.getElementById('TabBambino1').style.display = 'none'
		document.getElementById('TabBambino2').style.display = 'none'
		document.getElementById('TabBambino3').style.display = 'none'
		document.getElementById('TabBambino4').style.display = 'none'
		document.getElementById('TabBambino5').style.display = 'none'
		document.getElementById('TabBambino6').style.display = 'none'
		document.getElementById('TabBambino7').style.display = 'none'
		document.getElementById('TabBambino8').style.display = 'none'
		document.getElementById('TabBambino9').style.display = 'none'
	}
}

