function postFormPrestation(){
	var ret = _calculatrice.checkFormulairePrestation(false);
	if (ret){
		openMsg("S&eacute;curisation du formulaire", '<p class="pCenter">'+_calculatrice.loader+'</p>');
		setTimeout('submitFormPrestation()', 2000);
	}
}
function submitFormPrestation() {$("#formPrestation").submit();}

function openModalLimousine(){
	openModal('Information', '<p>En nous indiquant votre limousine pr&eacute;f&eacute;r&eacute;e, nous ferons notre maximum pour vous satisfaire.<br />La limousine qui vous sera attribu&eacute;e sera indiquée dans votre email de confirmation.</p>');
}
function openModalPassenger(){
	openModal('Information', '<p>Le nombre de passagers ne modifie pas le tarif. Cela nous permet de mieux vous acceuillir à bord.</p>');
}

function ChangeHourHappyLimo(value){
	switch (value){
		case '21H' 		: 	$("#prestation_start_hour option[value='21']").attr("selected", "selected");
							$("#prestation_start_minut option[value='00']").attr("selected", "selected");
							break;
		case '22H30' 	: 	$("#prestation_start_hour option[value='22']").attr("selected", "selected");
							$("#prestation_start_minut option[value='30']").attr("selected", "selected");
							break;
		case '00H' 		: 	$("#prestation_start_hour option[value='00']").attr("selected", "selected");
							$("#prestation_start_minut option[value='00']").attr("selected", "selected");
							break;
		default			:	$("#prestation_start_hour option[value='HH']").attr("selected", "selected");
							$("#prestation_start_minut option[value='MM']").attr("selected", "selected");
							break;
							
	}
}
function showLimoPicture(value){
	switch (value) {
		case 'lincoln' 	: 	img = '<img src="images/plateforme_reservations/limo/lincoln.gif" alt="Lincoln">';
				 			break;
		case 'cadillac' : 	img = '<img src="images/plateforme_reservations/limo/cadillac.gif" alt="Cadillac">';
							break;
		case 'chrysler' : 	img = '<img src="images/plateforme_reservations/limo/chrysler.gif" alt="Chrysler">';
							break;
		default			:	img = '';
							break;

	}
	$('#photolimo').html(img);
}

function prestationInit(name){
	var disabledStart;
	var disabledStartCity = false;
	var disabledEnd;
	var disabledEndCity = false;
	var startTypeChoix;
	var endTypeChoix;
	
	$('#tarifHidden').val('');
	
	$("#prestation_start_hour").removeClass();
	$('#prestation_start_hour').addClass("inputBorder");
	$("#prestation_start_minut").removeClass();
	$('#prestation_start_minut').addClass("inputBorder");
	$("#errorHour").html('');
	
	$("#datepicker").removeClass();
	$('#datepicker').addClass("inputBorder input100");
	$("#errorDate").html('');

	$("#prestation_start_adress").removeClass();
	$('#prestation_start_adress').addClass("inputBorder input100");
	$('#prestation_start_adress').attr('onKeyPress', 'javascript:return true;');
	$("#errorStartAdress").html('');
	
	$("#prestation_start_zipcode").removeClass();
	$('#prestation_start_zipcode').addClass("inputBorder input100");
	$('#prestation_start_zipcode').attr('onKeyPress', 'javascript:return true;');
	$("#errorStartZipcode").html('');
	
	$("#prestation_start_city").removeClass();
	$('#prestation_start_city').addClass("inputBorder input100");
	$('#prestation_start_city').attr('onKeyPress', 'javascript:return true;');
	$("#errorStartCity").html('');
	
	$("#prestation_end_adress").removeClass();
	$('#prestation_end_adress').addClass("inputBorder input100");
	$('#prestation_end_adress').attr('onKeyPress', 'javascript:return true;');	
	$("#errorEndAdress").html('');
	
	$("#prestation_end_zipcode").removeClass();
	$('#prestation_end_zipcode').addClass("inputBorder input100");
	$('#prestation_end_zipcode').attr('onKeyPress', 'javascript:return true;');	
	$("#errorEndZipcode").html('');

	$("#prestation_end_city").removeClass();
	$('#prestation_end_city').addClass("inputBorder input100");
	$('#prestation_end_city').attr('onKeyPress', 'javascript:return true;');	
	$("#errorEndCity").html('');
	
	$("#prestation_passenger_number").removeClass();
	$('#prestation_passenger_number').addClass("inputBorder input100");
	$("#errorPassager").html('');
	
	$("#divServicesOtherLib").html('');
	$("#divServicesOtherText").html('');
	$('#prestation_start_hour').attr('style', 'display:inline;width:90px;');
	$('#prestation_start_minut').attr('style', 'display:inline;width:90px;');
	$('#sepHour').html(':');
	$('#lbStartHour').html('Heure de d&eacute;part');
	
	if (name == 'restaurant'){
		$('#trRestaurantHeader').attr('style', 'display:table-row');
		$('#trRestaurantName').attr('style', 'display:table-row');
		$('#trRestaurantAdress').attr('style', 'display:table-row');
		$('#trRestaurantZipcode').attr('style', 'display:table-row');
		$('#trRestaurantSep').attr('style', 'display:table-row');
	}
	else {
		$('#trRestaurantHeader').attr('style', 'display:none');
		$('#trRestaurantName').attr('style', 'display:none');
		$('#trRestaurantAdress').attr('style', 'display:none');
		$('#trRestaurantZipcode').attr('style', 'display:none');
		$('#trRestaurantSep').attr('style', 'display:none');
	}
	
	
	if (name == 'pinky_girly'){
		$("#divServicesOtherLib").html('Autres : ');
		$("#divServicesOtherText").html('8 Chapeaux CowGirls sont fournis');
	}
	else if (name == 'mariage'){
		$("#divServicesOtherLib").html('Autres : ');
		$("#divServicesOtherText").html('La d&eacute;coration florale est fournie');
	}
	
	if (name == 'pinky_girly' || name== "happy_limo" || name == "restaurant" || name == "casino" || name == "mariage"){
		$("#lbBouteilleSup").html('Bouteille(s) supl&eacute;mentaire(s) : ');
		$("#divBouteilleIncluse").html('<select class="inputBorder input100" id="bouteilleIncluse" name="bouteilleIncluse" >'
										+ 		'<option value="champagne">Champagne</option>'
										+ 		'<option value="champagneCacher">Champagne Cacher</option>'
										+ 		'<option value="nightorient">Night Orient</option>'
										+ 		'<option value="champomy">Champomy</option>'
										+ '</select>'
									  );
	}
	else {
		$("#lbBouteilleSup").html('Bouteille(s) en option : ');
		$("#divBouteilleIncluse").html('Bar sans alcool uniquement');
	}
	
	if (name == 'intramuros' || name == 'paris_banlieue' || name == 'banlieue_banlieue' || name == 'banlieue_paris' || name == 'bynight1h' || name == 'bynight1h30' || name == 'pinky_girly'){
		showHideFieldName('start', 'adress');
		showHideFieldName('end', 'adress');
		$('#prestation_start_adress').val('');
		$('#prestation_start_zipcode').val('');
		if (name == 'intramuros' || name == 'bynight1h' || name == 'bynight1h30' || name == 'paris_banlieue' || name == 'pinky_girly'){
			$('#prestation_start_city').val('Paris');
			disabledStartCity = true;
		}
		else {
			$('#prestation_start_city').val('');
		}
			
		$('#prestation_end_adress').val('');
		$('#prestation_end_zipcode').val('');
		
		if (name == 'intramuros' || name == 'bynight1h' || name == 'bynight1h30' || name == 'banlieue_paris' || name == 'pinky_girly'){
			$('#prestation_end_city').val('Paris');
			disabledEndCity = true;
		}
		else {
			$('#prestation_end_city').val('');
		}
					
		startTypeChoix = '<input type="radio" name="prestation_start_type" value="adress" id="prestation_start_adress_type" checked="checked" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_adress_type">Adresse</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="hotel" id="prestation_start_hotel" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_hotel">H&ocirc;tel</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="restaurant" id="prestation_start_restaurant"  onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_restaurant">Restaurant</label>';
						
		endTypeChoix = '<input type="radio" name="prestation_end_type" value="adress" id="prestation_end_adress_type" checked="checked" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
							+ '&nbsp;<label for="prestation_end_adress_type">Adresse</label>'
							+ '&nbsp;<input type="radio" name="prestation_end_type" value="hotel" id="prestation_end_hotel" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
							+ '&nbsp;<label for="prestation_end_hotel">H&ocirc;tel</label>'
							+ '&nbsp;<input type="radio" name="prestation_end_type" value="restaurant" id="prestation_end_restaurant"  onclick="javascript:showHideFieldName(\'end\', this.value);" />'
							+ '&nbsp;<label for="prestation_end_restaurant">Restaurant</label>';
							
		disabledStart = false;
		disabledEnd = false;
	}
	else if (name == 'paris_aeroport'){
		showHideFieldName('start', 'adress');
		showHideFieldName('end', 'airport');
		$('#prestation_start_adress').val('');
		$('#prestation_start_zipcode').val('');
		$('#prestation_start_city').val('Paris');
		disabledStartCity = true;
							
		$('#prestation_end_adress').val('');
		$('#prestation_end_zipcode').val('');
		$('#prestation_end_city').val('');
					
		startTypeChoix = '<input type="radio" name="prestation_start_type" value="adress" id="prestation_start_adress_type" checked="checked" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_adress_type">Adresse</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="hotel" id="prestation_start_hotel" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_hotel">H&ocirc;tel</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="restaurant" id="prestation_start_restaurant"  onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_restaurant">Restaurant</label>';
						
		endTypeChoix = '<input type="radio" name="prestation_end_type" value="airport" id="prestation_end_airport" checked="checked" />'
							+ '&nbsp;<label for="prestation_end_airport">A&eacute;roport</label>';
							
		disabledStart = false;
		disabledEnd = false;
		
	}
	else if (name == 'aeroport_paris'){
		showHideFieldName('start', 'airport');
		showHideFieldName('end', 'adress');
		$('#prestation_start_adress').val('');
		$('#prestation_start_zipcode').val('');
		$('#prestation_start_city').val('');
							
		$('#prestation_end_adress').val('');
		$('#prestation_end_zipcode').val('');
		$('#prestation_end_city').val('Paris');
		disabledEndCity = true;
											
		startTypeChoix = '<input type="radio" name="prestation_start_type" value="airport" id="prestation_start_airport" checked="checked" />'
							+ '&nbsp;<label for="prestation_start_airport">A&eacute;roport</label>';
		
		endTypeChoix = '<input type="radio" name="prestation_end_type" value="adress" id="prestation_end_adress_type" checked="checked" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
			+ '&nbsp;<label for="prestation_end_adress_type">Adresse</label>'
			+ '&nbsp;<input type="radio" name="prestation_end_type" value="hotel" id="prestation_end_hotel" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
			+ '&nbsp;<label for="prestation_end_hotel">H&ocirc;tel</label>'
			+ '&nbsp;<input type="radio" name="prestation_end_type" value="restaurant" id="prestation_end_restaurant"  onclick="javascript:showHideFieldName(\'end\', this.value);" />'
			+ '&nbsp;<label for="prestation_end_restaurant">Restaurant</label>';
							
		disabledStart = false;
		disabledEnd = false;
	}
	else if	(name == 'happy_limo'){
		showHideFieldName('start', 'adress');
		showHideFieldName('end', 'adress');
		$('#prestation_start_adress').val('Place de la concorde');
		$('#prestation_start_zipcode').val('75008');
		$('#prestation_start_city').val('Paris');
							
		$('#prestation_end_adress').val('Place de la concorde');
		$('#prestation_end_zipcode').val('75008');
		$('#prestation_end_city').val('Paris');
		
		$('#prestation_start_hour').attr('style', 'display:none');
		$('#prestation_start_minut').attr('style', 'display:none');
		$('#sepHour').html('<select id="hourHappyLimo" class="inputBorder input100" onchange="ChangeHourHappyLimo(this.value);">'
							+ '<option value="sel">S&eacute;lectionnez...</option>'
							+ '<option value="21H">De 21H00 &agrave; 22H00</option>'
							+ '<option value="22H30">De 22H30 &agrave; 23H30</option>'
							+ '<option value="00H">De 24H00 &agrave; 01H00</option>'
							+ '</select>'
							);
		$('#lbStartHour').html('Horaire');
									
		startTypeChoix = '<input type="radio" name="prestation_start_type" value="adress" id="prestation_start_adress_type" checked="checked" />'
							+ '&nbsp;<label for="prestation_start_adress_type">Adresse</label>';
		
		endTypeChoix = '<input type="radio" name="prestation_end_type" value="adress" id="prestation_end_adress_type" checked="checked" />'
						+ '&nbsp;<label for="prestation_end_adress_type">Adresse</label>';
							
		disabledStart = true;
		disabledStartCity = true;
		disabledEnd = true;
		disabledEndCity = true;
	}
	else if	(name == 'paris_disney'){
		showHideFieldName('start', 'adress');
		showHideFieldName('end', 'adress');
		$('#prestation_start_adress').val('');
		$('#prestation_start_zipcode').val('');
		$('#prestation_start_city').val('Paris');
		disabledStartCity = true;
							
		$("#divServicesOtherLib").html('Autres : ');
		$("#divServicesOtherText").html('8 FastPass offerts');
		
		$('#prestation_end_adress').val('Disneyland Paris');
		$('#prestation_end_zipcode').val('77700');
		$('#prestation_end_city').val('Marne la vallée');
		disabledEndCity = true;
							
		startTypeChoix = '<input type="radio" name="prestation_start_type" value="adress" id="prestation_start_adress_type" checked="checked" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_adress_type">Adresse</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="hotel" id="prestation_start_hotel" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_hotel">H&ocirc;tel</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="restaurant" id="prestation_start_restaurant"  onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_restaurant">Restaurant</label>';
		
		endTypeChoix = '<input type="radio" name="prestation_end_type" value="disney_parc" id="prestation_end_disney_parc_type" checked="checked" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
						+ '&nbsp;<label for="prestation_end_disney_parc_type">Parc</label>'
						+ '&nbsp;<input type="radio" name="prestation_end_type" value="disney_village" id="prestation_end_disney_village_type"  onclick="javascript:showHideFieldName(\'end\', this.value);"/>'
						+ '&nbsp;<label for="prestation_end_disney_village_type">Disney Village</label>'
						+ '&nbsp;<input type="radio" name="prestation_end_type" value="disney_hotel" id="prestation_end_disney_hotel_type" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
						+ '&nbsp;<label for="prestation_end_disney_hotel_type">H&ocirc;tel</label>';
							
		disabledStart = false;
		disabledEnd = true;
	}
	else if	(name == 'disney_paris'){
		showHideFieldName('start', 'adress');
		showHideFieldName('end', 'adress');
							
		$('#prestation_start_adress').val('Disneyland Paris');
		$('#prestation_start_zipcode').val('77700');
		$('#prestation_start_city').val('Marne la vallée');
		disabledStartCity = true;
		
		$('#prestation_end_adress').val('');
		$('#prestation_end_zipcode').val('');
		$('#prestation_end_city').val('Paris');
		disabledEndCity = true;
			
		startTypeChoix = '<input type="radio" name="prestation_start_type" value="disney_parc" id="prestation_start_disney_parc_type" checked="checked" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_disney_parc_type">Parc</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="disney_village" id="prestation_start_disney_village_type" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_disney_village_type">Disney Village</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="disney_hotel" id="prestation_start_disney_hotel_type" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_disney_hotel_type">H&ocirc;tel</label>';

	
		endTypeChoix = '<input type="radio" name="prestation_end_type" value="adress" id="prestation_end_adress_type" checked="checked" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
			+ '&nbsp;<label for="prestation_end_adress_type">Adresse</label>'
			+ '&nbsp;<input type="radio" name="prestation_end_type" value="hotel" id="prestation_end_hotel" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
			+ '&nbsp;<label for="prestation_end_hotel">H&ocirc;tel</label>'
			+ '&nbsp;<input type="radio" name="prestation_end_type" value="restaurant" id="prestation_end_restaurant"  onclick="javascript:showHideFieldName(\'end\', this.value);" />'
			+ '&nbsp;<label for="prestation_end_restaurant">Restaurant</label>';
							
		disabledStart = true;
		disabledEnd = false;
	}
	else if	(name == 'disney_aeroport'){
		showHideFieldName('start', 'adress');
		showHideFieldName('end', 'airport');
									
		$('#prestation_start_adress').val('Disneyland Paris');
		$('#prestation_start_zipcode').val('77700');
		$('#prestation_start_city').val('Marne la vallée');
		
		$('#prestation_end_adress').val('');
		$('#prestation_end_zipcode').val('');
		$('#prestation_end_city').val('');
		
		startTypeChoix = '<input type="radio" name="prestation_start_type" value="disney_parc" id="prestation_start_disney_parc_type" checked="checked" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
			+ '&nbsp;<label for="prestation_start_disney_parc_type">Parc</label>'
			+ '&nbsp;<input type="radio" name="prestation_start_type" value="disney_village" id="prestation_start_disney_village_type" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
			+ '&nbsp;<label for="prestation_start_disney_village_type">Disney Village</label>'
			+ '&nbsp;<input type="radio" name="prestation_start_type" value="disney_hotel" id="prestation_start_disney_hotel_type" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
			+ '&nbsp;<label for="prestation_start_disney_hotel_type">H&ocirc;tel</label>';

		endTypeChoix = '<input type="radio" name="prestation_end_type" value="airpot" id="prestation_end_airport" checked="checked" />'
						+ '&nbsp;<label for="prestation_end_airport_type">A&eacute;roport</label>';
							
		disabledStart = true;
		disabledStartCity = true;
		disabledEnd = false;
		disabledEndCity = false;
	}
	else if	(name == 'aeroport_disney'){
		showHideFieldName('start', 'airport');
		showHideFieldName('end', 'adress');
		
		$('#prestation_start_adress').val('');
		$('#prestation_start_zipcode').val('');
		$('#prestation_start_city').val('');
		
		$('#prestation_end_adress').val('Disneyland Paris');
		$('#prestation_end_zipcode').val('77700');
		$('#prestation_end_city').val('Marne la vallée');
		
		$("#divServicesOtherLib").html('Autres : ');
		$("#divServicesOtherText").html('8 FastPass offerts');
		
		startTypeChoix = '<input type="radio" name="prestation_start_type" value="airpot" id="prestation_start_airport" checked="checked" />'
						+ '&nbsp;<label for="prestation_start_airport_type">A&eacute;roport</label>';
		
		endTypeChoix = '<input type="radio" name="prestation_end_type" value="disney_parc" id="prestation_end_disney_parc_type" checked="checked" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
			+ '&nbsp;<label for="prestation_end_disney_parc_type">Parc</label>'
			+ '&nbsp;<input type="radio" name="prestation_end_type" value="disney_village" id="prestation_end_disney_village_type" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
			+ '&nbsp;<label for="prestation_end_disney_village_type">Disney Village</label>'
			+ '&nbsp;<input type="radio" name="prestation_end_type" value="disney_hotel" id="prestation_end_disney_hotel_type" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
			+ '&nbsp;<label for="prestation_end_disney_hotel_type">H&ocirc;tel</label>';

							
		disabledStart = false;
		disabledStartCity = false;
		disabledEnd = true;
		disabledEndCity = true;
	}
	else if (name == 'restaurant') {
		showHideFieldName('start', 'adress');
		showHideFieldName('end', 'adress');
		$('#prestation_start_adress').val('');
		$('#prestation_start_zipcode').val('');
		$('#prestation_start_city').val('');
				
		$('#prestation_end_adress').val('');
		$('#prestation_end_zipcode').val('');
		$('#prestation_end_city').val('');
							
		startTypeChoix = '<input type="radio" name="prestation_start_type" value="adress" id="prestation_start_adress_type" checked="checked" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_adress_type">Adresse</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="hotel" id="prestation_start_hotel" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_hotel">H&ocirc;tel</label>';
							
		endTypeChoix = '<input type="radio" name="prestation_end_type" value="adress" id="prestation_end_adress_type" checked="checked" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
							+ '&nbsp;<label for="prestation_end_adress_type">Adresse</label>'
							+ '&nbsp;<input type="radio" name="prestation_end_type" value="hotel" id="prestation_end_hotel" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
							+ '&nbsp;<label for="prestation_end_hotel">H&ocirc;tel</label>';							
							
		disabledStart = false;
		disabledEnd = false;
	}
	else if (name == 'casino' || name == 'dispo2heures' || name == 'mariage'){
		showHideFieldName('start', 'adress');
		showHideFieldName('end', 'adress');
		$('#prestation_start_adress').val('');
		$('#prestation_start_zipcode').val('');
		$('#prestation_start_city').val('');
				
		$('#prestation_end_adress').val('');
		$('#prestation_end_zipcode').val('');
		$('#prestation_end_city').val('');
							
		startTypeChoix = '<input type="radio" name="prestation_start_type" value="adress" id="prestation_start_adress_type" checked="checked" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_adress_type">Adresse</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="hotel" id="prestation_start_hotel" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_hotel">H&ocirc;tel</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="restaurant" id="prestation_start_restaurant"  onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_restaurant">Restaurant</label>';
						
		endTypeChoix = '<input type="radio" name="prestation_end_type" value="adress" id="prestation_end_adress_type" checked="checked" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
							+ '&nbsp;<label for="prestation_end_adress_type">Adresse</label>'
							+ '&nbsp;<input type="radio" name="prestation_end_type" value="hotel" id="prestation_end_hotel" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
							+ '&nbsp;<label for="prestation_end_hotel">H&ocirc;tel</label>'
							+ '&nbsp;<input type="radio" name="prestation_end_type" value="restaurant" id="prestation_end_restaurant"  onclick="javascript:showHideFieldName(\'end\', this.value);" />'
							+ '&nbsp;<label for="prestation_end_restaurant">Restaurant</label>';
							
		disabledStart = false;
		disabledEnd = false;
	}
	else {
		showHideFieldName('start', 'adress');
		showHideFieldName('end', 'adress');
		$('#prestation_start_adress').val('');
		$('#prestation_start_zipcode').val('');
		$('#prestation_start_city').val('');
				
		$('#prestation_end_adress').val('');
		$('#prestation_end_zipcode').val('');
		$('#prestation_end_city').val('');
							
		startTypeChoix = '<input type="radio" name="prestation_start_type" value="adress" id="prestation_start_adress_type" checked="checked" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_adress_type">Adresse</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="hotel" id="prestation_start_hotel" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_hotel">H&ocirc;tel</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="airport" id="prestation_start_airport" onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_airport">A&eacute;roport</label>'
							+ '&nbsp;<input type="radio" name="prestation_start_type" value="restaurant" id="prestation_start_restaurant"  onclick="javascript:showHideFieldName(\'start\', this.value);" />'
							+ '&nbsp;<label for="prestation_start_restaurant">Restaurant</label>';
						
		endTypeChoix = '<input type="radio" name="prestation_end_type" value="adress" id="prestation_end_adress_type" checked="checked" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
							+ '&nbsp;<label for="prestation_end_adress_type">Adresse</label>'
							+ '&nbsp;<input type="radio" name="prestation_end_type" value="hotel" id="prestation_end_hotel" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
							+ '&nbsp;<label for="prestation_end_hotel">H&ocirc;tel</label>'
							+ '&nbsp;<input type="radio" name="prestation_end_type" value="airport" id="prestation_end_airport" onclick="javascript:showHideFieldName(\'end\', this.value);" />'
							+ '&nbsp;<label for="prestation_end_airport">A&eacute;roport</label>'
							+ '&nbsp;<input type="radio" name="prestation_end_type" value="restaurant" id="prestation_end_restaurant"  onclick="javascript:showHideFieldName(\'end\', this.value);" />'
							+ '&nbsp;<label for="prestation_end_restaurant">Restaurant</label>';
							
		disabledStart = false;
		disabledEnd = false;
	}
	$('#dStartTypeChoix').html(startTypeChoix);
	$('#dEndTypeChoix').html(endTypeChoix);
		
	if (disabledStart){
		$('#prestation_start_adress').attr('onKeyPress', 'javascript:return false;');
		$('#prestation_start_adress').addClass("disable");
		$('#prestation_start_zipcode').attr('onKeyPress', 'javascript:return false;');
		$('#prestation_start_zipcode').addClass("disable");
		$('#prestation_start_city').attr('onKeyPress', 'javascript:return false;');
		$('#prestation_start_city').addClass("disable");
	}
	else {
		$('#prestation_start_adress').attr('onKeyPress', 'javascript:return true;');
		$("#prestation_start_adress").removeClass("disable");
		$('#prestation_start_zipcode').attr('onKeyPress', 'javascript:return true;');
		$("#prestation_start_zipcode").removeClass("disable");
		$('#prestation_start_city').attr('onKeyPress', 'javascript:return true;');
		$("#prestation_start_city").removeClass("disable");
	}
	
	if (disabledEnd){
		$('#prestation_end_adress').attr('onKeyPress', 'javascript:return false;');
		$('#prestation_end_adress').addClass("disable");
		$('#prestation_end_zipcode').attr('onKeyPress', 'javascript:return false;');
		$('#prestation_end_zipcode').addClass("disable");
		$('#prestation_end_city').attr('onKeyPress', 'javascript:return false;');
		$('#prestation_end_city').addClass("disable");
		
	}
	else {
		$('#prestation_end_adress').attr('onKeyPress', 'javascript:return true;');
		$("#prestation_end_adress").removeClass("disable");
		$('#prestation_end_zipcode').attr('onKeyPress', 'javascript:return true;');
		$("#prestation_end_zipcode").removeClass("disable");
		$('#prestation_end_city').attr('onKeyPress', 'javascript:return true;');
		$("#prestation_end_city").removeClass("disable");
	}
	
	if (disabledStartCity == false){
		$('#prestation_start_city').attr('onKeyPress', 'javascript:return true;');
		$("#prestation_start_city").removeClass("disable");
	}
	else {
		$('#prestation_start_city').attr('onKeyPress', 'javascript:return false;');
		$('#prestation_start_city').addClass("disable");
	}
	
	if (disabledEndCity == false){
		$('#prestation_end_city').attr('onKeyPress', "javascript:return true;");
		$("#prestation_end_city").removeClass("disable");
	}
	else {
		$('#prestation_end_city').attr('onKeyPress', "javascript:return false;");
		$('#prestation_end_city').addClass("disable");
	}
}

function showHideFieldName(lieu, type){
	var lib = '';
	var field = '';
	var displayOtherFieldStart = '';
	var displayOtherFieldEnd = '';
	if (type == 'airport'){
		var decollage;
		var provOrDest; 
		if (lieu == 'end'){
			decollage = 'de d&eacute;collage';
			provOrDest = 'Destination';
		}
		else {
			decollage = 'd\'atterrissage';
			provOrDest = 'Provenance';
		}
		lib = '<p>Nom de l\'a&eacute;roport<span class="redStar">*</span> :</p>'
				+ '<p style="padding-top:10px;">Compagnie a&eacute;rienne<span class="redStar">*</span> :</p>'
				+ '<p style="padding-top:10px;">Num&eacute;ro de vol<span class="redStar">*</span> :</p>'
				+ '<p style="padding-top:10px;">'+provOrDest+'<span class="redStar">*</span> :</p>'
				+ '<p style="padding-top:10px;">Heure '+decollage+'<span class="redStar">*</span> :</p>';
		
		field = '<p><select name="prestation_airport_'+lieu+'_name" id="prestation_airport_'+lieu+'_name" class="inputBorder input100"><br />';
		field += 	'<option value="sel">S&eacute;lectionnez...</option>';
		field += 	'<option value="degaulle">Charles de Gaulle - CDG</option>';
		field += 	'<option value="orly">Orly - ORY</option>';
		field += 	'<option value="bourget">Le Bourget - LBG</option>';
		field += 	'<option value="toussus">Toussus-le-Noble - TNF</option>';
		field += '</select></p>';
		field += '<p style="margin-top:5px;"><input type="text" name="prestation_airport_'+lieu+'_company" id="prestation_airport_'+lieu+'_company" class="inputBorder" style="width:195px;" /></p>';
		field += '<p style="margin-top:5px;"><input type="text" name="prestation_airport_'+lieu+'_numvol" id="prestation_airport_'+lieu+'_numvol" class="inputBorder" style="width:195px;" maxlength="6" /></p>';
		field += '<p style="margin-top:5px;"><input type="text" name="prestation_airport_'+lieu+'_provdest" id="prestation_airport_'+lieu+'_provdest" class="inputBorder" style="width:195px;" /></p>';
		field += '<p style="margin-top:5px;">'
					+ '<select name="prestation_airport_'+lieu+'_heure" id="prestation_airport_'+lieu+'_heure" class="inputBorder" style="width:92px;">'
					+ 	'<option value="HH">HH</option>';
					for (var i = 0 ; i < 24 ; i++){
						if (i < 10){
		field +=			'<option value="0'+i+'">0'+i+'</option>';
						}
						else {
		field +=			'<option value="'+i+'">'+i+'</option>';
						}
					}
		field +=	 '</select> : '
		field +=	 '<select name="prestation_airport_'+lieu+'_minute" id="prestation_airport_'+lieu+'_minute" class="inputBorder" style="width:92px;">'
						+ 	'<option value="MM">MM</option>';
						for (var i = 0 ; i < 60 ; i++){
							if (i < 10){
		field +=				'<option value="0'+i+'">0'+i+'</option>';
							}
							else {
		field +=				'<option value="'+i+'">'+i+'</option>';
							}
						}
		field +=	 '</select>'
					+ '</p>';
	}
	else if (type == 'hotel'){
		lib = 'Nom de l\'h&ocirc;tel<span class="redStar">*</span> : ';
		field = '<input type="text" name="prestation_hotel_'+lieu+'_name" id="prestation_hotel_'+lieu+'_name" class="inputBorder input100" />';
	}
	else if (type == 'restaurant'){
		lib = 'Nom du restaurant<span class="redStar">*</span> : ';
		field = '<input type="text" name="prestation_restaurant_'+lieu+'_name" id="prestation_restaurant_'+lieu+'_name" class="inputBorder input100" />';
	}
	else if (type == 'disney_hotel'){
		lib = 'Nom de l\'h&ocirc;tel<span class="redStar">*</span> : ';
		field = '<select name="prestation_disney_hotel_'+lieu+'_name" id="prestation_disney_hotel_'+lieu+'_name" class="inputBorder input100">'
				+ '<option value="sel">S&eacute;lectionnez...</option>'
				+ '<option value="Sequoia Lodge">Sequoia Lodge</option>'
				+ '<option value="Newport Bay Club">Newport Bay Club</option>'
				+ '<option value="Cheyenne">Cheyenne</option>'
				+ '<option value="New York">New York</option>'
				+ '<option value="Santa Fe">Santa Fe</option>'
				+ '<option value="Davy Crockett Ranch">Davy Crockett Ranch</option>'
				+ '<option value="Disneyland Hotel">Disneyland Hotel</option>'
				+ '<option value="Explorers">Explorers</option>'
				+ '<option value="Dream Castle Hotel">Dream Castle Hotel</option>'
				+ '<option value="Marriott s Village">Marriott\'s Village</option>'
				+ '<option value="L Elysee Val d Europe">L\'Elys&eacute;e Val d\'Europe</option>'	
				+ '</select>';
	}		
		
		
	if (lieu == 'start'){
		
		$("#errorStartField").html('');
		$("#errorStartField").html('');
		
		if (type == 'adress') {
			$('#dStartLabel').css('display' , 'none');
			$('#dStartField').css('display' , 'none');
			$('#dStartLabel').html('');
			$('#dStartField').html('');
			
			displayOtherFieldStart = 'block';
		}
		else if (type == 'airport') {
			$('#dStartLabel').css('display' , 'block');
			$('#dStartField').css('display' , 'block');
			$('#dStartLabel').html(lib);
			$('#dStartField').html(field);
			
			displayOtherFieldStart = 'none';
		}
		else{
			$('#dStartLabel').css('display' , 'block');
			$('#dStartField').css('display' , 'block');
			$('#dStartLabel').html(lib);
			$('#dStartField').html(field);
			
			displayOtherFieldStart = 'block';
		}
		
		$('#dStartLabelAdress').css('display' , displayOtherFieldStart);
		$('#dStartInputAdress').css('display' , displayOtherFieldStart);
		$('#dStartLabelZipcode').css('display' , displayOtherFieldStart);
		$('#dStartInputZipcode').css('display' , displayOtherFieldStart);
		$('#dStartLabelCity').css('display' , displayOtherFieldStart);
		$('#dStartInputCity').css('display' , displayOtherFieldStart);
		
	}
	else {
		
		$("#errorEndField").html('');
		
		if (type == 'adress') {
			$('#dEndLabel').css('display' , 'none');
			$('#dEndField').css('display' , 'none');
			$('#dEndLabel').html('');
			$('#dEndField').html('');
			
			displayOtherFieldEnd = 'block';
		}
		else if (type == 'airport') {
			$('#dEndLabel').css('display' , 'block');
			$('#dEndField').css('display' , 'block');
			$('#dEndLabel').html(lib);
			$('#dEndField').html(field);
			
			displayOtherFieldEnd = 'none';
		}
		else{
			$('#dEndLabel').css('display' , 'block');
			$('#dEndField').css('display' , 'block');
			$('#dEndLabel').html(lib);
			$('#dEndField').html(field);
			
			displayOtherFieldEnd = 'block';
		}
		
		$('#dEndLabelAdress').css('display' , displayOtherFieldEnd);
		$('#dEndInputAdress').css('display' , displayOtherFieldEnd);
		$('#dEndLabelZipcode').css('display' , displayOtherFieldEnd);
		$('#dEndInputZipcode').css('display' , displayOtherFieldEnd);
		$('#dEndLabelCity').css('display' , displayOtherFieldEnd);
		$('#dEndInputCity').css('display' , displayOtherFieldEnd);
	}
}