var selector = [["ALL HOTELS", "All", "", ""],
							["- HOTELS IN GUADELOUPE", "All", "Guadeloupe", ""],
							["-- Beach Resort Gosier", "All", "Guadeloupe", "Beach Resort Gosier"],
							["--- Hotel Salako - Beach Resort Gosier", "CARSalako", "Guadeloupe", "Beach Resort Gosier"],
							["--- Hotel Clipper - Beach Resort Gosier", "CARGRClipper", "Guadeloupe", "Beach Resort Gosier"],
							["--- Residence Prao - Beach Resort Gosier", "CARGRPrao", "Guadeloupe", "Beach Resort Gosier"],
							["- HOTELS IN MARTINIQUE", "All", "Martinique", ""],
							["-- Resort Sainte Luce", "All", "Martinique", "Resort Sainte Luce"],
							["--- Hotel Amandiers - Resort Sainte Luce", "CARAmandiers", "Martinique", "Resort Sainte Luce"],
							["--- Hotel Amyris - Resort Sainte Luce", "CARSLRAmyris", "Martinique", "Resort Sainte Luce"],
							["--- Residence Caribia - Resort Sainte Luce", "CARSLRCaribia", "Martinique", "Resort Sainte Luce"],
							["-- Baie du Galion Resort", "All", "Martinique", "Baie du Galion Resort"],
							["--- Hotel Galion - Baie du Galion Resort", "CARGalion", "Martinique", "Baie du Galion Resort"],
							["--- Residence Goelette - Baie du Galion Resort", "CARGARGoelette", "Martinique", "Baie du Galion Resort"],
							["-- Camelia Residence", "CARCamelia", "Martinique", "Camelia"],
							["-- Corail Residence", "CARCorail", "Martinique", "Corail"],
							["-- La Valmenière Hôtel", "CARValmeniere", "Martinique", "La Valmeniere"],
							["-- Squash Hôtel", "CARSquash", "Martinique", "Squash"]];
//Build the select			
function BuildHotelSelect() {

	// Empty the hotel select
	document.idForm.HotelList.options.length = 0;
	
	var ct = selector.length;
	for(i = 0; i < ct; i++)
		{
		elt = selector[i];
		
		a_option = new Option(elt[0], i, false, false);
		
		document.idForm.HotelList.options[i] = a_option;
		}
		
}
				
function SubmitBookingForm(theform) {
		
			var ar_index = parseInt(theform.HotelList.options[theform.HotelList.selectedIndex].value);
			if(ar_index >= 0 && ar_index < selector.length)
				{
				theform.HotelList.options[theform.HotelList.selectedIndex].value = selector[ar_index][1];
				theform.region.value = selector[ar_index][2];
				theform.critere1.value = selector[ar_index][3];
				}
			hhotelFormUpdateHotelnames(theform);
			hhotelDispoprice(theform);

        }
        
function SubmitCancel(theform) {
	// get index of selected element
	var ar_index = theform.HotelList.selectedIndex;
	if(ar_index >= 0 && ar_index < selector.length)
		{
		// get connectNAme associated with selected entry
		var cName = selector[ar_index][1];
		if(cName == null || cName == "" || cName == "All")
			{
			// If no connect name or "All" associated, then display error message and exit
			alert("Choose first a hotel please");
			return;
			}
		// call cancel function with connect name and empty language variable
		hhotelcancel(cName, "");
	}				
}

