// JavaScript Document
<!-- listes déroulantes liées pour faire une recherche de voyage -->

	function Choix(form) { 
		//window.alert(form.destination.selectedIndex);
		//window.alert(form.tarif.selectedIndex);
		
		///////////////////////// SI LE VISITEUR N'A RIEN SELECTIONNE //////////////////////////////
		
		if ((form.destination.selectedIndex == 0) && (form.tarif.selectedIndex == 0)){
			window.alert("Vous n'avez rien selectionné!");
		}
		if ((form.destination.selectedIndex == 0) && (form.tarif.selectedIndex == 5)){
			window.alert("Vous n'avez rien selectionné!");
		}
		if ((form.destination.selectedIndex == 7) && (form.tarif.selectedIndex == 0)){
			window.alert("Vous n'avez rien selectionné!");
		}
		if ((form.destination.selectedIndex == 7) && (form.tarif.selectedIndex == 5)){
			window.alert("Vous n'avez rien selectionné!");
		}
		
		//////////////////////////////// RECHERCHE SUR LE BUDGET ///////////////////////////////////
		
		// 800 euros
		if ((form.destination.selectedIndex == 0) && (form.tarif.selectedIndex == 1)){
			document.location.href = "v2/golf/recherche/tarifs_tous_800.php";
		}
		if ((form.destination.selectedIndex == 7) && (form.tarif.selectedIndex == 1)){
			document.location.href = "v2/golf/recherche/tarifs_tous_800.php";
		}
		
		// 1000 euros
		if ((form.destination.selectedIndex == 0) && (form.tarif.selectedIndex == 2)){
			document.location.href = "v2/golf/recherche/tarifs_tous_1000.php";
		}
		if ((form.destination.selectedIndex == 7) && (form.tarif.selectedIndex == 2)){
			document.location.href = "v2/golf/recherche/tarifs_tous_1000.php";
		}
		
		// 1200 euros
		if ((form.destination.selectedIndex == 0) && (form.tarif.selectedIndex == 3)){
			document.location.href = "v2/golf/recherche/tarifs_tous_1200.php";
		}
		if ((form.destination.selectedIndex == 7) && (form.tarif.selectedIndex == 3)){
			document.location.href = "v2/golf/recherche/tarifs_tous_1200.php";
		}
		
		// 2200 euros
		if ((form.destination.selectedIndex == 0) && (form.tarif.selectedIndex == 4)){
			document.location.href = "v2/golf/recherche/tarifs_tous_2200.php";
		}
		if ((form.destination.selectedIndex == 7) && (form.tarif.selectedIndex == 4)){
			document.location.href = "v2/golf/recherche/tarifs_tous_2200.php";
		}
		
		////////////////////////////// RECHERCHE SUR LE VOYAGE ///////////////////////////////////
		
		
		// Maroc
		if ((form.destination.selectedIndex == 1) && (form.tarif.selectedIndex == 0)){
			document.location.href = "v2/golf/recherche/voyage_maroc.php";
		}
		if ((form.destination.selectedIndex == 1) && (form.tarif.selectedIndex == 5)){
			document.location.href = "v2/golf/recherche/voyage_maroc.php";
		}
		
		// Quebec
		if ((form.destination.selectedIndex == 2) && (form.tarif.selectedIndex == 0)){
			document.location.href = "v2/golf/recherche/voyage_quebec.php";
		}
		if ((form.destination.selectedIndex == 2) && (form.tarif.selectedIndex == 5)){
			document.location.href = "v2/golf/recherche/voyage_quebec.php";
		}
		
		// Thailande
		if ((form.destination.selectedIndex == 3) && (form.tarif.selectedIndex == 0)){
			document.location.href = "v2/golf/recherche/voyage_thailande.php";
		}
		if ((form.destination.selectedIndex == 3) && (form.tarif.selectedIndex == 5)){
			document.location.href = "v2/golf/recherche/voyage_thailande.php";
		}
		
		// Tunisie
		if ((form.destination.selectedIndex == 4) && (form.tarif.selectedIndex == 0)){
			document.location.href = "v2/golf/recherche/voyage_tunisie.php";
		}
		if ((form.destination.selectedIndex == 4) && (form.tarif.selectedIndex == 5)){
			document.location.href = "v2/golf/recherche/voyage_tunisie.php";
		}
		
		// Turquie
		if ((form.destination.selectedIndex == 5) && (form.tarif.selectedIndex == 0)){
			document.location.href = "v2/golf/recherche/voyage_turquie.php";
		}
		if ((form.destination.selectedIndex == 5) && (form.tarif.selectedIndex == 5)){
			document.location.href = "v2/golf/recherche/voyage_turquie.php";
		}
		
		//////////////////////////////// RECHERCHES COMBINEES ///////////////////////////////////
		
		
		// Maroc et 800 euros
		if ((form.destination.selectedIndex == 1) && (form.tarif.selectedIndex == 1)){
			document.location.href = "v2/golf/recherche/maroc_800.php";
		}
		// Maroc et 1000 euros
		if ((form.destination.selectedIndex == 1) && (form.tarif.selectedIndex == 2)){
			document.location.href = "v2/golf/recherche/maroc_1000.php";
		}
		// Maroc et 1200 euros
		if ((form.destination.selectedIndex == 1) && (form.tarif.selectedIndex == 3)){
			document.location.href = "v2/golf/recherche/maroc_1200.php";
		}
		// Maroc et 2200 euros
		if ((form.destination.selectedIndex == 1) && (form.tarif.selectedIndex == 4)){
			document.location.href = "v2/golf/recherche/maroc_2200.php";
		}
		
		
		// Quebec et 800 euros
		if ((form.destination.selectedIndex == 2) && (form.tarif.selectedIndex == 1)){
			document.location.href = "v2/golf/recherche/aucun-resultat.php";
		}
		// Quebec et 1000 euros
		if ((form.destination.selectedIndex == 2) && (form.tarif.selectedIndex == 2)){
			document.location.href = "v2/golf/recherche/aucun-resultat.php";
		}
		// Quebec et 1200 euros
		if ((form.destination.selectedIndex == 2) && (form.tarif.selectedIndex == 3)){
			document.location.href = "v2/golf/recherche/aucun-resultat.php";
		}
		// Quebec et 2200 euros
		if ((form.destination.selectedIndex == 2) && (form.tarif.selectedIndex == 4)){
			document.location.href = "v2/golf/recherche/quebec_2200.php";
		}
		
		
		// Thailande et 800 euros
		if ((form.destination.selectedIndex == 3) && (form.tarif.selectedIndex == 1)){
			document.location.href = "v2/golf/recherche/thailande_800.php";
		}
		// Thailande et 1000 euros
		if ((form.destination.selectedIndex == 3) && (form.tarif.selectedIndex == 2)){
			document.location.href = "v2/golf/recherche/thailande_1000.php";
		}
		// Thailande et 1200 euros
		if ((form.destination.selectedIndex == 3) && (form.tarif.selectedIndex == 3)){
			document.location.href = "v2/golf/recherche/thailande_1200.php";
		}
		// Thailande et 2200 euros
		if ((form.destination.selectedIndex == 3) && (form.tarif.selectedIndex == 4)){
			document.location.href = "v2/golf/recherche/thailande_2200.php";
		}
		
		
		// Tunisie et 800 euros
		if ((form.destination.selectedIndex == 4) && (form.tarif.selectedIndex == 1)){
			document.location.href = "v2/golf/recherche/tunisie_800.php";
		}
		// Tunisie et 1000 euros
		if ((form.destination.selectedIndex == 4) && (form.tarif.selectedIndex == 2)){
			document.location.href = "v2/golf/recherche/tunisie_1000.php";
		}
		// Tunisie et 1200 euros
		if ((form.destination.selectedIndex == 4) && (form.tarif.selectedIndex == 3)){
			document.location.href = "v2/golf/recherche/tunisie_1200.php";
		}
		// Tunisie et 2200 euros
		if ((form.destination.selectedIndex == 4) && (form.tarif.selectedIndex == 4)){
			document.location.href = "v2/golf/recherche/tunisie_2200.php";
		}
		
		
		// Turquie et 800 euros
		if ((form.destination.selectedIndex == 5) && (form.tarif.selectedIndex == 1)){
			document.location.href = "v2/golf/recherche/aucun-resultat.php";
		}
		// Turquie et 1000 euros
		if ((form.destination.selectedIndex == 5) && (form.tarif.selectedIndex == 2)){
			document.location.href = "v2/golf/recherche/turquie_1000.php";
		}
		// Turquie et 1200 euros
		if ((form.destination.selectedIndex == 5) && (form.tarif.selectedIndex == 3)){
			document.location.href = "v2/golf/recherche/turquie_1200.php";
		}
		// Turquie et 2200 euros
		if ((form.destination.selectedIndex == 5) && (form.tarif.selectedIndex == 4)){
			document.location.href = "v2/golf/recherche/turquie_2200.php";
		}
						
	}
	