function apri(str) {
   searchWin = window.open(str,'ipix','scrollbars=yes,resizable=yes,width=550,height=500,status=no,location=no,toolbar=no');
}

function openNewWindow(URLtoOpen, windowName, windowFeatures) { newWindow=window.open(URLtoOpen, windowName, windowFeatures); }


function verifica_pagina(form){
	
		//alert(form.cat.selectedIndex);
   		//LISTE OBBLIGATORIE
		//if (!checkSelect(form.tipologia, 0, 'Veuillez choisir au moins 1 Catégorie à partir de la liste: Catégorie')) return false;
		//if (!checkSelect(form.cat, 0, 'Please select at least 1 price from the list: PRICES')) return false;
	 	//if (!checkSelect(form.cod_citta, 0, 'Please choose a city')) return false;
		//if (!checkSelect(form.zona, 0, 'Veuillez choisir au moins 1 Position à partir de la liste: Position')) return false;



	//ALMENO 1 TIPO cittA
	 	if (form.cod_citta.value == "") {
	     alert("Please choose a city");
		return false;
	}



   		//ALMENO 1 TIPO DI CAMERE
		if ((!form.chk_sing.checked) && (!form.chk_dop.checked) && (!form.chk_trip.checked) && (!form.chk_quad.checked)){
			alert("Please choose at least 1 room type by the ROOMS checkboxes");
			return false;
		}

		//DATE OBBLIGATORIE
		if (!checkText(form.dal, 'Please insert a date (dd/mm/yyyy) into arrival area')) return false;
		if (!checkText(form.al, 'Please insert a date (dd/mm/yyyy) into departure area')) return false;

		//DATE VALIDE
		if (form.dal.value == form.al.value)
		{
			alert("Please select at least an interval of one night")
			return false;
		}
		if (!checkDateValid(form.dal, form.al, 'Please check if the period is a valid date')) return false;
		
		//SE TUTTO OK ACTION FORM
		GoToPage(form, "query.php")
		
	}
