
function onKeyDown(form, event){
	if(event.keyCode == 13 && !document.getElementById('as_searchField')
			&& verifValid()) {
		form.submit();	
	} 
	else{
		document.getElementById('typeObj').value = '';
		document.getElementById('numObj').value  = '';
	} 
}

function verifValid(){
	var champ = document.getElementById('searchField');
	var resPropre = champ.value.replace(/(?:^\s+|\s+$)/g, "");
	if(resPropre == ''){
		champ.value = '';
		return false;
	}
	else return true;
}

function getColorFromClass(maClass){
	if (!document.styleSheets) return -1;
	var regles=new Array();
	if (document.styleSheets[0].cssRules) regles = document.styleSheets[0].cssRules;
	else if (document.styleSheets[0].rules) regles = document.styleSheets[0].rules;
	else return -1;
	
	for (var i=0; i<regles.length; i++){
        if(regles[i].selectorText == maClass){ 
            return RGB2HTML(regles[i].style.color); 
        } 
    } 
    return -1;
}
function RGB2HTML(rgb)
{
	tab = rgb.substr(4, (rgb.length-5));
	tablo = tab.split(',');
	
    return String(str_pad(dec2hex(tablo[0]),2,"0",0)) 
		   + String(str_pad(dec2hex(tablo[1]),2,"0",0)) 
		   + String(str_pad(dec2hex(tablo[2]),2,"0",0));
}

function dec2hex(dec) {
  var hexa="0123456789ABCDEF";
  var hex="";
  while (dec>15) {
    tmp=dec-(Math.floor(dec/16))*16;
    hex=hexa.charAt(tmp)+hex;
    dec=Math.floor(dec/16);
  }
  hex=hexa.charAt(dec)+hex;
  return(hex);
}

function str_pad(chaine, taille, elem, sens) { // 0 = left , 1 = right, 2 = center
var orientation = 0;
while(chaine.length < taille) {
 if( (sens == 0 || sens == 2) && orientation == 0) {
    chaine = elem + chaine;
  }
  if( (sens == 1 || sens == 2) && orientation == 1) {
    chaine = chaine + elem;
  }
  orientation = 1 - orientation;
}
return chaine.substr(0,taille);
}

function checkEmail() 
{ 	
        var email = document.form_newsletter.form_email.value; 
        if (email.search(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/) == -1)
        { 
            alert ('entrez une adresse Email valide'); 
            document.form_newsletter.form_email.value="";
            document.form_newsletter.form_email.focus(); 
            return false; 
        } 
       	
else {return true;}
}

// ouvre menu de Gauche : Regions / stations
function openSearchMoteur(checker){
			var selectRegion = document.getElementById('selectRegion');
			
			var selectStation = document.getElementById('selectStation');
			var selectPrix = document.getElementById('selectPrix');
				if(checker == 1){
					if(!selectRegion){ return }
					else{
					
							var toOpen = document.getElementById('listeRegion2');
							if(toOpen.style.display == 'none'){
								
								toOpen.style.display = 'block';
							}
							else{
								toOpen.style.display = 'none';
							}
					}
				}
				if(checker == 2){
					if(!selectStation){ return }
					else{
							var toOpen2 = document.getElementById('listeStation');
							if(toOpen2.style.display == 'none'){
							
								//console.log("1");
								toOpen2.style.display = 'block';
								document.getElementById('listeStationsChar').style.display = 'none';
								document.onkeydown=function(e){
									var charactere = convertKeyCode((e||window.event).keyCode);
									
									getStations(charactere);
								}
							}
							else{
							
								//	console.log("2");
								toOpen2.style.display = 'none';
								document.onkeydown='';
							}
						}
				}
				if(checker == 3){
					if(!selectPrix){ return }
					else{
							var toOpen = document.getElementById('listePrix');
							if(toOpen.style.display == 'none'){
								toOpen.style.display = 'block';
							}
							else{
								toOpen.style.display = 'none';
							}
					}
				}
		}

function openFastSaerch(checker){
	var filtreRegionFS 	= document.getElementById('filtreRegionFS');
	var filtreStationFS	= document.getElementById('filtreStationFS');
	var filtreBudgetFS 	= document.getElementById('filtreBudgetFS');
	
	
	if(checker == 1){
		if(!filtreRegionFS){ return }
			else{
				
					var toOpen = document.getElementById('listeFiltreRegionFS');
					if(toOpen.style.display == 'none'){
						
						toOpen.style.display = 'block';
						
						jQuery('#listeFiltreStationFS').hide();
						jQuery('#listeFiltreBudgetFS').hide();
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
						
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreDuree').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
			
						}
						else{
						toOpen.style.display = 'none';
					}
			}
		}
		if(checker == 2){
		if(!filtreStationFS){ return }
			else{
					var toOpen = document.getElementById('listeFiltreStationFS');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						//document.getElementById('listeStationsChar').style.display = 'none';
								document.onkeydown=function(e){
									var charactere = convertKeyCode((e||window.event).keyCode);
									getStations(charactere);
								}
						jQuery('#listeFiltreRegionFS').hide();						
						jQuery('#listeFiltreBudgetFS').hide();
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
						
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreDuree').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
			
						}
						else{
						toOpen.style.display = 'none';
					}
			}
		}
		if(checker == 3){
		if(!filtreBudgetFS){ return }
			else{
					var toOpen = document.getElementById('listeFiltreBudgetFS');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeFiltreRegionFS').hide();
						jQuery('#listeFiltreStationFS').hide();
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
						
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreDuree').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
			
						}
						else{
						toOpen.style.display = 'none';
					}
			}
		}
	
	
	}
function openSearch(checker){
	//alert ("here");
	var selectRegion 	= document.getElementById('selectRegion');
	var selectStation 	= document.getElementById('selectStation');
	var selectCure 		= document.getElementById('selectCure');
	var selectPrix 		= document.getElementById('selectPrix');
	var selectDuree 	= document.getElementById('selectDuree');
	var selectDate 		= document.getElementById('selectDate');
	var selectEcartDate = document.getElementById('selectEcartDate');
	var selectBudget 	= document.getElementById('selectBudget');
	
	var filtreRegion 	= document.getElementById('filtreRegion');
	var filtreStation 	= document.getElementById('filtreStation');
	var filtreBudget 	= document.getElementById('filtreBudget');
	var filtreDuree 	= document.getElementById('filtreDuree');
	var filtreCure 		= document.getElementById('filtreCure');
	var filtreHotel 	= document.getElementById('filtreHotel');
	
	var selectDateDep 	= document.getElementById('selectdateDep');
	var selectnbAdults 	= document.getElementById('selectnbAdults');
	var selectnbBabies 	= document.getElementById('selectnbBabies');
	var selectnbChildren 	= document.getElementById('selectnbChildren');
	var selectageChild1 = document.getElementById('selectageChild1');
	var selectageChild2 = document.getElementById('selectageChild2');
	var selectageChild3 = document.getElementById('selectageChild3');
	var selectageChild4 = document.getElementById('selectageChild4');
	
		if(checker == 0){
			jQuery('#listeRegion').hide();
			jQuery('#listeCure').hide();
			jQuery('#listeBudget').hide();
			jQuery('#listeDuree').hide();
			jQuery('#listeDate').hide();
			jQuery('#listeEcartDate').hide();
			jQuery('#listeStationsChar').hide();
			jQuery('#listeStationsChar2').hide();
			
			jQuery('#listeFiltreRegion').hide();
			jQuery('#listeFiltreStation').hide();
			jQuery('#listeFiltreBudget').hide();
			jQuery('#listeFiltreDuree').hide();
			
			jQuery('#listedateDep').hide();
			jQuery('#listenbAdults').hide();
			jQuery('#listenbBabies').hide();
			jQuery('#listenbChildren').hide();
			jQuery('#listeageChild1').hide();
			jQuery('#listeageChild2').hide();
			jQuery('#listeageChild3').hide();
			jQuery('#listeageChild4').hide();
			
		//document.getElementById('listeRegion').style.display == 'none';
		}
		
		if(checker == 1){
			if(!selectRegion){ return }
			else{
					var toOpen = document.getElementById('listeRegion');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
			
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreDuree').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		if(checker == 2){
			if(!selectCure){ return }
			else{
					var toOpen = document.getElementById('listeCure');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
					
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreDuree').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		if(checker == 3){
		if(!selectBudget){ return }
			else{
					var toOpen = document.getElementById('listeBudget');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreDuree').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		if(checker == 4){
		if(!selectDuree){ return }
			else{
					var toOpen = document.getElementById('listeDuree');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
						
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreDuree').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		
		if(checker == 5){
			
		if(!filtreCure){ return }
			else{
					var toOpen = document.getElementById('listeFiltreCure');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
						
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreDuree').hide();
												
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		
		
		if(checker == 6){
			//alert("here");
		if(!selectEcartDate){ return }
			else{
					var toOpen = document.getElementById('listeEcartDate');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
					
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreDuree').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		if(checker == 7){
		if(!filtreRegion){ return }
			else{
					var toOpen = document.getElementById('listeFiltreRegion');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
					
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreDuree').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		if(checker == 8){
		if(!filtreStation){ return }
			else{
					var toOpen = document.getElementById('listeFiltreStation');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						//document.getElementById('listeStationsChar').style.display = 'none';
								document.onkeydown=function(e){
									var charactere = convertKeyCode((e||window.event).keyCode);
									getStations2(charactere);
								}
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
					
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreDuree').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		if(checker == 9){
		if(!filtreBudget){ return }
			else{
					var toOpen = document.getElementById('listeFiltreBudget');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
					
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreDuree').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		if(checker == 10){
		if(!filtreDuree){ return }
			else{
					var toOpen = document.getElementById('listeFiltreDuree');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
					
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		
		if(checker == 11){
		//	alert("here");
		if(!selectDateDep){ return }
			else{//alert(document.getElementById('listedateDep'));
					var toOpen = document.getElementById('listedateDep');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
					
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
						
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		
		if(checker == 12){
		//	alert("here");
		if(!selectnbAdults){ return }
			else{//alert(document.getElementById('listedateDep'));
					var toOpen = document.getElementById('listenbAdults');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
					
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
						
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		
		if(checker == 14){
		//	alert("here");
		if(!selectnbBabies){ return }
			else{//alert(document.getElementById('listedateDep'));
					var toOpen = document.getElementById('listenbBabies');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
					
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
						
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		
		if(checker == 13){
		//	alert("here");
		if(!selectnbChildren){ return }
			else{//alert(document.getElementById('listedateDep'));
					var toOpen = document.getElementById('listenbChildren');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
					
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
						
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		if(checker == 15){
		//	alert("here");
		if(!selectageChild1){ return }
			else{//alert(document.getElementById('listedateDep'));
					var toOpen = document.getElementById('listeageChild1');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
					
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
						
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		if(checker == 16){
		//	alert("here");
		if(!selectageChild2){ return }
			else{//alert(document.getElementById('listedateDep'));
					var toOpen = document.getElementById('listeageChild2');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
					
						
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();

						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
						
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		
		if(checker == 17){
		//	alert("here");
		if(!selectageChild3){ return }
			else{//alert(document.getElementById('listedateDep'));
					var toOpen = document.getElementById('listeageChild3');
					if(toOpen.style.display == 'none'){
						toOpen.style.display = 'block';
						jQuery('#listeRegion').hide();
						jQuery('#listeCure').hide();
						jQuery('#listeBudget').hide();
						jQuery('#listeDuree').hide();
						jQuery('#listeDate').hide();
						jQuery('#listeEcartDate').hide();
						
						jQuery('#listeStationsChar').hide();
						jQuery('#listeStationsChar2').hide();
					
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild4').hide();
						
					}
					else{
						toOpen.style.display = 'none';
					}
			}
		}
		if(checker == 18){
			//alert("here");
			if(!filtreHotel){ return }
			else{
				//alert("here");
					var toOpen = document.getElementById('listeFiltreHotel');
					if(toOpen.style.display == 'none'){
						
						toOpen.style.display = 'block';
						
						jQuery('#listeFiltreRegionFS').hide();
						jQuery('#listeFiltreStationFS').hide();
						jQuery('#listeFiltreBudgetFS').hide();
						
						jQuery('#listeFiltreRegion').hide();
						jQuery('#listeFiltreStation').hide();
						jQuery('#listeFiltreBudget').hide();
						jQuery('#listeFiltreDuree').hide();
						jQuery('#listeFiltreCure').hide();
						
						jQuery('#listedateDep').hide();
						jQuery('#listenbAdults').hide();
						jQuery('#listenbBabies').hide();
						jQuery('#listenbChildren').hide();
						jQuery('#listeageChild1').hide();
						jQuery('#listeageChild2').hide();
						jQuery('#listeageChild3').hide();
						jQuery('#listeageChild4').hide();
						jQuery('#listedateDep2').hide();
			
						}
						else{
						toOpen.style.display = 'none';
					}
			}
		}
}

function applySelect(nom,titre,valeur){
	
	//alert('toto');
	if(nom == 'nbChildren' && titre==0 && valeur==0)
		document.getElementById('selectsForChilds').style.display = 'none';
	document.getElementById(nom).value = valeur;
	document.getElementById('titre'+nom).innerHTML = titre;
	document.getElementById('liste'+nom).style.display = 'none';
	
	var xhr_object = null; 
			     
   if(window.XMLHttpRequest) // Firefox 
      xhr_object = new XMLHttpRequest(); 
   else if(window.ActiveXObject) // Internet Explorer 
      xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 
   else { // XMLHttpRequest non supportÃƒÆ’Ã‚Â© par le navigateur 
      alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
      return; 
   } 
 
   xhr_object.open("POST", "/html/ajax_titre_select.php", true);
     
   xhr_object.onreadystatechange = function() { 
      if(xhr_object.readyState == 4) {
		// alert(xhr_object.responseText); // DEBUG MODE
		 // --- ICI le retour (c'est ÃƒÆ’Ã‚Â  dire tout ce qui est ÃƒÆ’Ã‚Â©crit dans le fichier de traitement)
		 // --- est interprÃƒÆ’Ã‚Â©tÃƒÆ’Ã‚Â©, donc il suffi d'ÃƒÆ’Ã‚Â©crire du code JS dans traitement.php pour
		 // --- qu'il soit interprÃƒÆ’Ã‚Â©tÃƒÆ’Ã‚Â© au retour.
         //eval(xhr_object.responseText);
	  }
   } 
 
   xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
   // --- ICI TU PASSE TES ARGUMENTS AU SCRIPT :
   var data = "titre="+titre+"&nom="+nom+"&val="+valeur;
  //var data = "tri="+tri;
   xhr_object.send(data);
	
}
function applySelect2(nom,titre,valeur){
	
	document.getElementById('hidden'+nom).value = valeur;
	
	var mynode = document.getElementById('titre'+nom);
	
 	var parent = mynode.parentNode;
	parent.removeChild(mynode);
	alert(parent.id);
	var nouveauDiv = document.createElement('div');
	var nouveauLabel = document.createElement('label');
	nouveauDiv.className = "selectTitre";
	nouveauDiv.id = "titre"+nom;
	nouveauDiv.innerHtml = titre;
	nouveauLabel.appendChild(document.createTextNode("Mon nouveau label :"));
	parent.appendChild(nouveauDiv);
	nouveauDiv.appendChild(nouveauLabel);
	
	document.getElementById('liste'+nom).style.display = 'none';
}
function saveOfferNum(offre_id)
{
	//alert(offre_id);
	//var div = document.getElementById('div_saveOfferNum');

	
	
	$.ajax({  // ajax
		url: "html/ajax_save_offer_num.php",		 // url de la page a charger
		type: "POST",
		data: "id="+offre_id,
		
		cache: false, // pas de mise en cache
		success:function(html){ // si la requÃƒÆ’Ã‚ÂªtÃƒÆ’Ã‚Â© est un succÃƒÆ’Ã‚Â¨s
			//$(div).empty(); 			// on vide le div
			//$(div).append(html); 		// on met dans le div le resultat de la requete ajax
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){ // erreur durant la requete
		}
	});	
}

function unsetSessionComp()
{
	//alert(offre_id);
	//var div = document.getElementById('div_saveOfferNum');

	
	
	$.ajax({  // ajax
		url: "html/ajax_unset_session_comp.php",		 // url de la page a charger
		type: "POST",
		data: "",
		
		cache: false, // pas de mise en cache
		success:function(html){ // si la requÃƒÆ’Ã‚ÂªtÃƒÆ’Ã‚Â© est un succÃƒÆ’Ã‚Â¨s
			//$(div).empty(); 			// on vide le div
			//$(div).append(html); 		// on met dans le div le resultat de la requete ajax
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){ // erreur durant la requete
		}
	});	
}
function onlaodSelectionTri(tri)
{
	//alert(tri);
	//alert(offre_id);
	var div = document.getElementById('ResultatHotelTri');

	
	
	$.ajax({  // ajax
		url: "../html/ajax_onload_hotel_tri.php",		 // url de la page a charger
		type: "POST",
		data: "param="+tri,
		cache: false, // pas de mise en cache
		success:function(html){ // si la requÃƒÆ’Ã‚ÂªtÃƒÆ’Ã‚Â© est un succÃƒÆ’Ã‚Â¨s
			$(div).empty(); 			// on vide le div
			$(div).append(html); 		// on met dans le div le resultat de la requete ajax
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){ // erreur durant la requete
		}
	});	
}



function showLinesChildsAge(nb){
	if(nb != 0){
		document.getElementById('ageChild1').value = null;
		document.getElementById('ageChild2').value = null;
		document.getElementById('ageChild3').value = null;
		document.getElementById('ageChild4').value = null;
		
		
		document.getElementById('selectsForChilds').style.display = 'block';
		var insideSelects = '<br>';
		var nbEnfants = '';
		//var a = 1;
		for(var i=1; i<=nb; i++){
			if(i == 1){
				nbEnfants = 'Age du 1<sup>er</sup> enfan';
			}
			else{
				nbEnfants = 'Age du '+i+'<sup>ÃƒÂ¨me</sup> enfant';
			}
			
			insideSelects +=''+
			'<div class="note_e_store">Age <br />enf '+i+'</div>'+
			'<div class="select_e_store">'+
				'<span class="selectStyleNbr" id="selectageChild'+i+'" onclick="clicPasSurBody=1;openSearch('+(14+i)+');">'+
					'<div class="selectTitre" id="titreageChild'+i+'"></div>'+
					
'				</span>'+
				'<span class="listeSelect" id="listeageChild'+i+'" style="display: none;">';
				for(var i_age=3; i_age<=11; i_age++){
	insideSelects +='<div class="listeSelectValue" onclick="applySelect(\'ageChild'+i+'\',\''+i_age+'\',\''+i_age+'\')">'+i_age+'</div>';
				}
	insideSelects +=''+
				'</span>'+					
			'</div>';
			
		}
		//document.getElementById('selectsForChildsLeft').innerHTML = nbEnfants;
		//document.getElementById('selectsForChildsRight').innerHTML = insideSelects;
		document.getElementById('selectsForChilds').innerHTML = insideSelects;
	}
}

function changePics(objet){
	
	if(objet == 'prec'){
		for(var i = 0 ; i<4 ;i++)
		{
			if( document.getElementById("img_large").src == document.getElementById("img_tmb"+i).src)
				{
					
					if(i==0)changePics(document.getElementById("img_tmb3"));
					else {
						y=i-1;
						changePics(document.getElementById("img_tmb"+y));
					}
					return true;
				}
		}
	}	
		
	else if(objet == 'suiv'){
		for(var i = 0 ; i<4 ;i++)
		{
			if( document.getElementById("img_large").src == document.getElementById("img_tmb"+i).src)
				{
					if(i==3)changePics(document.getElementById("img_tmb0"));
					else {
						y=i+1;
						changePics(document.getElementById("img_tmb"+y));
					}
					return true;
				}
		}
		
		
	}
	else{
		if(document.getElementById("photo").style.display == "none"){
			document.getElementById("photo").style.display = "block";
			document.getElementById("video").style.display = "none";
		}
		document.getElementById("img_large").src = objet.src;
	}
}

function viewVideo(){
	if(document.getElementById("video").style.display == "none"){
		document.getElementById("video").style.display = "block";
		document.getElementById("photo").style.display = "none";
	}
}

function changeOnglet(numOnglet)
{
	for(var i=1;i<6;i++)
	{
		if(i==numOnglet)
		{
			document.getElementById('onglet'+i).className = "active";
			document.getElementById('tab'+i).className = "lorsirs_area open";
		}
		else
		{
			document.getElementById('onglet'+i).className = "";
			if(document.getElementById('tab'+i) != null)
				document.getElementById('tab'+i).className = "lorsirs_area closed";
		}
	}
}


//diapo hotel

function changePicsSmall_hotel(index){
	document.getElementById('img_diapo_petit_hotel').src = tabImg_hotel[index];
	colorNbPic_hotel(index);
	current_hotel = index;
}
function movePicsSmall_hotel(dir){
	if(dir == "next"){
		if(current_hotel<(tabImg_hotel.length-1)){
			current_hotel += 1;
		}
		else{
			current_hotel = 0;
		}
	}
	else if(dir == "prev"){
		if(current_hotel>0){
			current_hotel -= 1;
		}
		else{
			current_hotel = tabImg_hotel.length-1;
		}
	}
	document.getElementById('img_diapo_petit_hotel').src = tabImg_hotel[current_hotel];
	colorNbPic_hotel(current_hotel);
}
function timedDiapo_hotel()
{//alert(tabImg);
	t_hotel=setTimeout("timedDiapo_hotel()",3000);
	movePicsSmall_hotel("next");
}
function colorNbPic_hotel(index){
	//alert(index);
	for(var idx_num=0; idx_num<(tabImg_hotel.length); idx_num++){
		//alert(idx_num);
		if(index == idx_num){
			document.getElementById('nbPic_hotel_'+idx_num).style.color = "#3FBFE4";
		}
		else{
			document.getElementById('nbPic_hotel_'+idx_num).style.color = "#711C61";
		}
	}
}

//diapo centre
function changePicsSmall_centre(index){
	document.getElementById('img_diapo_petit_centre').src = tabImg_centre[index];
	colorNbPic_centre(index);
	current_centre = index;
}
function movePicsSmall_centre(dir){
	if(dir == "next"){
		if(current_centre<(tabImg_centre.length-1)){
			current_centre += 1;
		}
		else{
			current_centre = 0;
		}
	}
	else if(dir == "prev"){
		if(current_centre>0){
			current_centre -= 1;
		}
		else{
			current_centre = tabImg_centre.length-1;
		}
	}
	document.getElementById('img_diapo_petit_centre').src = tabImg_centre[current_centre];
	colorNbPic_centre(current_centre);
}
function timedDiapo_centre()
{//alert(tabImg);
	t_centre=setTimeout("timedDiapo_centre()",3000);
	movePicsSmall_centre("next");
}
function colorNbPic_centre(index){
	//alert(index);
	for(var idx_num=0; idx_num<(tabImg_centre.length); idx_num++){
		//alert(idx_num);
		if(index == idx_num){
			document.getElementById('nbPic_centre_'+idx_num).style.color = "#3FBFE4";
		}
		else{
			document.getElementById('nbPic_centre_'+idx_num).style.color = "#711C61";
		}
	}
}

//diapo resto

function changePicsSmall_resto(index){
	document.getElementById('img_diapo_petit_resto').src = tabImg_resto[index];
	colorNbPic_resto(index);
	current_resto = index;
}
function movePicsSmall_resto(dir){
	if(dir == "next"){
		if(current_resto<(tabImg_resto.length-1)){
			current_resto += 1;
		}
		else{
			current_resto = 0;
		}
	}
	else if(dir == "prev"){
		if(current_resto>0){
			current_resto -= 1;
		}
		else{
			current_resto = tabImg_resto.length-1;
		}
	}
	document.getElementById('img_diapo_petit_resto').src = tabImg_resto[current_resto];
	colorNbPic_resto(current_resto);
}
function timedDiapo_resto()
{//alert(tabImg);
	t_resto=setTimeout("timedDiapo_resto()",3000);
	movePicsSmall_resto("next");
}
function colorNbPic_resto(index){
	//alert(index);
	for(var idx_num=0; idx_num<(tabImg_resto.length); idx_num++){
		//alert(idx_num);
		if(index == idx_num){
			document.getElementById('nbPic_resto_'+idx_num).style.color = "#3FBFE4";
		}
		else{
			document.getElementById('nbPic_resto_'+idx_num).style.color = "#711C61";
		}
	}
}


function displayEstore(){
	//document.getElementById("div_boutique").style.display = "block";
	//document.getElementById("div_form").style.display = "none";
	$('#div_form').hide(2000);
	$('#div_boutique').show("slow");

}
function displayForm(){
	//document.getElementById("div_boutique").style.display = "none";
	//document.getElementById("div_form").style.display = "block";
	$('#div_boutique').hide(2000);
	$('#div_form').show("slow");
}

function convertKeyCode(charCode){
			var charactere = "";
			 if (charCode == 8) charactere = "backspace"; //  backspace
			 if (charCode == 9) charactere = "tab"; //  tab
			 if (charCode == 13) charactere = "enter"; //  enter
			 if (charCode == 16) charactere = "shift"; //  shift
			 if (charCode == 17) charactere = "ctrl"; //  ctrl
			 if (charCode == 18) charactere = "alt"; //  alt
			 if (charCode == 19) charactere = "pause/break"; //  pause/break
			 if (charCode == 20) charactere = "caps lock"; //  caps lock
			 if (charCode == 27) charactere = "escape"; //  escape
			 if (charCode == 33) charactere = "page up"; // page up, to avoid displaying alternate character and confusing people	         
			 if (charCode == 34) charactere = "page down"; // page down
			 if (charCode == 35) charactere = "end"; // end
			 if (charCode == 36) charactere = "home"; // home
			 if (charCode == 37) charactere = "left arrow"; // left arrow
			 if (charCode == 38) charactere = "up arrow"; // up arrow
			 if (charCode == 39) charactere = "right arrow"; // right arrow
			 if (charCode == 40) charactere = "down arrow"; // down arrow
			 if (charCode == 45) charactere = "insert"; // insert
			 if (charCode == 46) charactere = "delete"; // delete
			 if (charCode == 91) charactere = "left window"; // left window
			 if (charCode == 92) charactere = "right window"; // right window
			 if (charCode == 93) charactere = "select key"; // select key
			 if (charCode == 96) charactere = "numpad 0"; // numpad 0
			 if (charCode == 97) charactere = "numpad 1"; // numpad 1
			 if (charCode == 98) charactere = "numpad 2"; // numpad 2
			 if (charCode == 99) charactere = "numpad 3"; // numpad 3
			 if (charCode == 100) charactere = "numpad 4"; // numpad 4
			 if (charCode == 101) charactere = "numpad 5"; // numpad 5
			 if (charCode == 102) charactere = "numpad 6"; // numpad 6
			 if (charCode == 103) charactere = "numpad 7"; // numpad 7
			 if (charCode == 104) charactere = "numpad 8"; // numpad 8
			 if (charCode == 105) charactere = "numpad 9"; // numpad 9
			 if (charCode == 106) charactere = "multiply"; // multiply
			 if (charCode == 107) charactere = "add"; // add
			 if (charCode == 109) charactere = "subtract"; // subtract
			 if (charCode == 110) charactere = "decimal point"; // decimal point
			 if (charCode == 111) charactere = "divide"; // divide
			 if (charCode == 112) charactere = "F1"; // F1
			 if (charCode == 113) charactere = "F2"; // F2
			 if (charCode == 114) charactere = "F3"; // F3
			 if (charCode == 115) charactere = "F4"; // F4
			 if (charCode == 116) charactere = "F5"; // F5
			 if (charCode == 117) charactere = "F6"; // F6
			 if (charCode == 118) charactere = "F7"; // F7
			 if (charCode == 119) charactere = "F8"; // F8
			 if (charCode == 120) charactere = "F9"; // F9
			 if (charCode == 121) charactere = "F10"; // F10
			 if (charCode == 122) charactere = "F11"; // F11
			 if (charCode == 123) charactere = "F12"; // F12
			 if (charCode == 144) charactere = "num lock"; // num lock
			 if (charCode == 145) charactere = "scroll lock"; // scroll lock
			 if (charCode == 186) charactere = ";"; // semi-colon
			 if (charCode == 187) charactere = "="; // equal-sign
			 if (charCode == 188) charactere = ","; // comma
			 if (charCode == 189) charactere = "-"; // dash
			 if (charCode == 190) charactere = "."; // period
			 if (charCode == 191) charactere = "/"; // forward slash
			 if (charCode == 192) charactere = "`"; // grave accent
			 if (charCode == 219) charactere = "["; // open bracket
			 if (charCode == 220) charactere = "\\"; // back slash
			 if (charCode == 221) charactere = "]"; // close bracket
			 if (charCode == 222) charactere = "'"; // single quote
			 if (charCode == 65) charactere = "a";
			 if (charCode == 66) charactere = "b";
			 if (charCode == 67) charactere = "c";
			 if (charCode == 68) charactere = "d";
			 if (charCode == 69) charactere = "e";
			 if (charCode == 70) charactere = "f";
			 if (charCode == 71) charactere = "g";
			 if (charCode == 72) charactere = "h";
			 if (charCode == 73) charactere = "i";
			 if (charCode == 74) charactere = "j";
			 if (charCode == 75) charactere = "k";
			 if (charCode == 76) charactere = "l";
			 if (charCode == 77) charactere = "m";
			 if (charCode == 78) charactere = "n";
			 if (charCode == 79) charactere = "o";
			 if (charCode == 80) charactere = "p";
			 if (charCode == 81) charactere = "q";
			 if (charCode == 82) charactere = "r";
			 if (charCode == 83) charactere = "s";
			 if (charCode == 84) charactere = "t";
			 if (charCode == 85) charactere = "u";
			 if (charCode == 86) charactere = "v";
			 if (charCode == 87) charactere = "w";
			 if (charCode == 88) charactere = "x";
			 if (charCode == 89) charactere = "y";
			 if (charCode == 90) charactere = "z";
		return charactere;
		}
		/*
		function getStations(charPush){
			document.getElementById('listeStationsChar').innerHTML = '';	// initialise
			var arrayChar 	= new Array();
			var a 			= 0;											// compteur
			var stations 	= document.getElementById('listeFiltreStationFS');    // span de ALL liste Statiom
			var regions 	= document.getElementById('listeFiltreRegionFS');
			var prix 		= document.getElementById('listeFiltreBudgetFS');
			var inStations 	= stations.innerHTML;						// ALL liste Statiom: HTML
			
			
			// yossef: bug de Ie: un truc de fou ! A cause de la casse l'ecriture de span !!!
			if(navigator.appName == "Microsoft Internet Explorer"){
				var arraySpans 	= inStations.split("</SPAN>"); // tous les <span >Nom de stations {sans le tags </span>}
			}
			else{
				var arraySpans 	= inStations.split("</span>"); // tous les <span >Nom de stations {sans le tags </span>}
			}
			
			
			var spans 		= stations.getElementsByTagName('span');
			for(var i=0; i<spans.length; i++){
				var smallChaine = spans[i].innerHTML.toLowerCase();
				if(charPush == smallChaine.charAt(0)){
					arrayChar[a] = spans[i];
				a++;
				}
			}
		
		
			for(i=0; i<arrayChar.length; i++){
				for(r=0; r<arraySpans.length; r++){
					if(arraySpans[r].match(arrayChar[i].innerHTML)){
						var loc = arraySpans[r]+"</span>";
					}
					else{
					}
				}
				document.getElementById('listeStationsChar').innerHTML += loc;
			}
			stations.style.display = 'none';
			regions.style.display = 'none';
			prix.style.display = 'none';
			document.getElementById('listeStationsChar').style.display = 'block';
		
		}
		
		*/
		function getStations(charPush){
			document.getElementById('listeStationsChar').innerHTML = '';	// div des resultats a  affiche apres le click d'une lettre : initialise
			var arrayChar 	= new Array();
			var a 			= 0;											// compteur
	
			var stations 	= document.getElementById('listeFiltreStationFS');    // span de ALL liste Statiom
			var regions 	= document.getElementById('listeFiltreRegionFS');
			var prix 		= document.getElementById('listeFiltreBudgetFS');    // span de ALL liste Stations (chacun mis dans des span)
			var inStations 	= stations.innerHTML;						// ALL liste Statiom: HTML
			
			// yossef: bug de Ie: un truc de fou ! A cause de la casse l'ecriture de span !!!
			if(navigator.appName == "Microsoft Internet Explorer"){
				var arraySpans 	= inStations.split("</SPAN>"); // tous les <span >Nom de stations {sans le tags </span>}
			}
			else{
				var arraySpans 	= inStations.split("</span>"); // tous les <span >Nom de stations {sans le tags </span>}
			}
			
			var spans 		= stations.getElementsByTagName('span');
			
		
			for(var i=0; i<spans.length; i++){
				var smallChaine = spans[i].innerHTML.toLowerCase();
				if(charPush == smallChaine.charAt(0)){
					arrayChar[a] = spans[i];     // array de Span + onclick , mais sans le Nom et ssans la fermeture dyu span !!!
					a++;
				}
			}
			// jusqu'a la , tout est  OK !
		
			for(i=0; i<arrayChar.length; i++){
				for(r=0; r<arraySpans.length; r++){
						
					$TEMPOS = 	arraySpans[r].split('>');
					if($TEMPOS[1] == arrayChar[i].innerHTML){
						//console.info(arraySpans[r] + " MATCH " + arrayChar[i].innerHTML);	
						var loc = arraySpans[r]+"</span>";
					}
					else{
					}
				}
				
				document.getElementById('listeStationsChar').innerHTML += loc;
				
			}
			stations.style.display = 'none';
			regions.style.display = 'none';
			prix.style.display = 'none';
			document.getElementById('listeStationsChar').style.display = 'block';
			//alert(document.getElementById('listeStationsChar').innerHTML);
		}
		
		function getStations2(charPush){
			
			document.getElementById('listeStationsChar2').innerHTML = '';	// div des resultats a  affiche apres le click d'une lettre : initialise
			var arrayChar 	= new Array();
			var a 			= 0;											// compteur
	
			var stations 	= document.getElementById('listeFiltreStation');    // span de ALL liste Statiom
			var regions 	= document.getElementById('listeFiltreRegion');
			var prix 		= document.getElementById('listeFiltreBudget');    // span de ALL liste Stations (chacun mis dans des span)
			var inStations 	= stations.innerHTML;						// ALL liste Statiom: HTML
			
			// yossef: bug de Ie: un truc de fou ! A cause de la casse l'ecriture de span !!!
			if(navigator.appName == "Microsoft Internet Explorer"){
				var arraySpans 	= inStations.split("</SPAN>"); // tous les <span >Nom de stations {sans le tags </span>}
			}
			else{
				var arraySpans 	= inStations.split("</span>"); // tous les <span >Nom de stations {sans le tags </span>}
			}
			
			var spans 		= stations.getElementsByTagName('span');
			
		
			for(var i=0; i<spans.length; i++){
				var smallChaine = spans[i].innerHTML.toLowerCase();
				if(charPush == smallChaine.charAt(0)){
					arrayChar[a] = spans[i];     // array de Span + onclick , mais sans le Nom et ssans la fermeture dyu span !!!
					a++;
				}
			}
			// jusqu'a la , tout est  OK !

			for(i=0; i<arrayChar.length; i++){
				for(r=0; r<arraySpans.length; r++){
						
					$TEMPOS = 	arraySpans[r].split('>');
					if($TEMPOS[1] == arrayChar[i].innerHTML){
						//console.info(arraySpans[r] + " MATCH " + arrayChar[i].innerHTML);	
						var loc = arraySpans[r]+"</span>";
					}
					else{
					}
				}
				
				document.getElementById('listeStationsChar2').innerHTML += loc;
				
			}
			stations.style.display = 'none';
			regions.style.display = 'none';
			prix.style.display = 'none';
			document.getElementById('listeStationsChar2').style.display = 'block';
			//alert(document.getElementById('listeStationsChar').innerHTML);
		}
		
function trim (myString)
{
	return myString.replace(/^\s+/g,'').replace(/\s+$/g,'');
} 
		
function verifChamps(id, type){
	
//alert(id+type);
			var expTel = /^0[1-68]([-. ]?[0-9]{2}){4}$/;
			var expMail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
			
			if(type =='nom') {
				var a = document.getElementById(id);
				if(a.value == ''){
						alert('Le champs n\'est pas rempli.');
						return false;
					}else {
						document.getElementById('etape1').style.display = 'none';
						document.getElementById('etape2').style.display = 'block';
						$('#spaceused1').progressBar(15);
					}
				}
			if(type == 'tel') 
			{
				var c = document.getElementById(id);
				
				if(c.value.length <10){
						alert('NumÃ©ro de tÃ©lÃ©phone invalide');
						return false;
				}else  {
						document.getElementById('etape2').style.display = 'none';
						document.getElementById('etape3').style.display = 'block';
						$('#spaceused1').progressBar(30);
					}
			}
			
			
			if(type == 'mail')
			{
				 var d = document.getElementById(id);	
				 if(expMail.test(d.value) == false){
						alert('mail invalide');
						return false;
					}
					else{
						document.getElementById('etape3').style.display = 'none';
						document.getElementById('etape4').style.display = 'block';
						$('#spaceused1').progressBar(60);
						return true;
					}
			}
			if(type == 'dest') 
			{
				var e = document.getElementById(id).innerHTML;
				//alert(e);
				if(e == '' || e == "Choisir"){
						alert('Le champs destination n\'est pas rempli.');
						return false;
				}
				else
				{	document.getElementById('etape4').style.display = 'none';
					document.getElementById('formulaireDevis').style.display = 'none';
					document.getElementById('etape5').style.display = 'block';
					$('#spaceused1').progressBar(100);
					return true;
				}
			}
		/*	if(type == 'date') 
			{
				var f = document.getElementById(id).innerHTML;
				
				if(f == '' || f == "Choisir"){
						alert('Le champs date n\'est pas rempli.');
						return false;
				}
				else
					return true;
			}
			if(type == 'duree') 
			{
				//alert(type);
				var g = document.getElementById(id).innerHTML;
				
				if(g == '' || g == "Choisir"){
						alert('Le champs duree n\'est pas rempli.');
						return false;
				}
					else{
						$(document).ready(function() {
						$('#spaceused1').hide();
						$("#spaceused1").progressBar({showText:false});
						$('#spaceused1').progressBar(60);
						$('#spaceused1').show();
						$('#spaceused1').progressBar(100);
						$('#spaceused1').show();
						document.getElementById('etape4').style.display = 'none';
						document.getElementById('formulaireDevis').style.display = 'none';
						document.getElementById('etape5').style.display = 'block';
						$('#spaceused1').progressBar(100);
					});
						return true;
					}
			}*/
		}
		
function ModifValueSelect(selectId,value,valueNum){
	var select = document.getElementById(selectId);
	var hidden = document.getElementById("hidden_"+selectId);
	
	hidden.value = value;
	if(valueNum)
	{
		document.getElementById("numStation").value = valueNum;
	}
/*	if( value.length >18 ){
		value = value.substring(0,17) + "...";
	}*/
	
	select.innerHTML = value;
	document.getElementById('listeDevisDest1').style.display = 'none';
	document.getElementById('listeDevisDest2').style.display = 'none';
	document.getElementById('listeDevisDuree').style.display = 'none';
	document.getElementById('listeDevisDate').style.display = 'none';
} 	

function openSearchDevis(checker){
	var selectDest1 	= document.getElementById('selectDevisDest1');
	var selectDest2 	= document.getElementById('selectDevisDest1');
	var selectDate     = document.getElementById('selectDevisDate');
	var selectDuree     = document.getElementById('selectDevisDuree');

	if(checker == 0){
		jQuery('#listeDevisDest1').hide();
		jQuery('#listeDevisDest2').hide();
		jQuery('#listeDevisDate').hide();
		jQuery('#listeDevisDuree').hide();
	}
	if(checker == 1){
		if(!selectDest1){ return }
		else{
			var toOpen = document.getElementById('listeDevisDest1');
			if(toOpen.style.display == 'none'){
				toOpen.style.display = 'block';
				jQuery('#listeDevisDest2').hide();
				jQuery('#listeDevisDate').hide();
				jQuery('#listeDevisDuree').hide();
			}
			else{
				jQuery('#listeDevisDest1').hide();
			}
		}
	}
	if(checker == 2){
		if(!selectDest2){ return }
		else{
			var toOpen = document.getElementById('listeDevisDest2');
			if(toOpen.style.display == 'none' ){
				toOpen.style.display = 'block';
				jQuery('#listeDevisDest1').hide();
				jQuery('#listeDevisDate').hide();
				jQuery('#listeDevisDuree').hide();
			}
			else{
				jQuery('#listeDevisDest2').hide();
			}
		}
	}
	if(checker == 3){
		if(!selectDate){ return }
		else{
			var toOpen = document.getElementById('listeDevisDate');
			if(toOpen.style.display == 'none'){
				toOpen.style.display = 'block';
				jQuery('#listeDevisDest1').hide();
				jQuery('#listeDevisDest2').hide();
				jQuery('#listeDevisDuree').hide();
			}
			else{
				jQuery('#listeDevisDate').hide();
			}
		}
	}
	if(checker == 4){
		if(!selectDate){ return }
		else{
			var toOpen = document.getElementById('listeDevisDuree');
			if(toOpen.style.display == 'none'){
				toOpen.style.display = 'block';
				jQuery('#listeDevisDest1').hide();
				jQuery('#listeDevisDest2').hide();
				jQuery('#listeDevisDate').hide();
			}
			else{
				jQuery('#listeDevisDuree').hide();
			}
		}
	}
}	
		
function Next_picto(i)
{
	
	if(i==-1)
	{
		val = document.getElementById('derPicto').value;
	
		debut=val-3;
		fin=debut+4;
		document.getElementById('p'+debut).style.display='none';
		document.getElementById('p'+fin).style.display='block';
		if(fin == document.getElementById('maxPicto').value)document.getElementById('fleche2').style.display='none'; 
	
	document.getElementById('fleche1').style.display='block';
	document.getElementById('derPicto').value = fin;
		
	}
	else
	{
		val = document.getElementById(i+'derPicto').value;
	
		debut=val-3;
		fin=debut+4;
		
		document.getElementById(i+'p'+debut).style.display='none';
		document.getElementById(i+'p'+fin).style.display='block';
		if(fin == document.getElementById(i+'maxPicto').value)document.getElementById(i+'fleche2').style.display='none'; 
	
	document.getElementById(i+'fleche1').style.display='block';
	document.getElementById(i+'derPicto').value = fin;
		
		
	}
	
	
}

function Prev_picto(i)
{
	
	
	if(i==-1)
	{
		val = document.getElementById('derPicto').value;
	
		picto1=val-4;
		picto2=val-3;
		picto3=val-2;
		picto4=val-1;
		
		
		document.getElementById('p'+picto1).style.display='block';
		document.getElementById('p'+picto2).style.display='block';
		document.getElementById('p'+picto3).style.display='block';
		document.getElementById('p'+picto4).style.display='block';
		
		document.getElementById('p'+val).style.display='none';
		if(picto1 == 1 )document.getElementById('fleche1').style.display='none';
	else document.getElementById('fleche1').style.display='block';
	
	document.getElementById('fleche2').style.display='block';
	fin = val - 1;
	document.getElementById('derPicto').value = fin;
		
		
	}
	else	
	{
		val = document.getElementById(i+'derPicto').value;
	
		picto1=val-4;
		picto2=val-3;
		picto3=val-2;
		picto4=val-1;
		
		document.getElementById(i+'p'+picto1).style.display='block';
		document.getElementById(i+'p'+picto2).style.display='block';
		document.getElementById(i+'p'+picto3).style.display='block';
		document.getElementById(i+'p'+picto4).style.display='block';
		
		document.getElementById(i+'p'+val).style.display='none';
		
		if(picto1 == 1 )document.getElementById(i+'fleche1').style.display='none';
	else document.getElementById(i+'fleche1').style.display='block';
	
	document.getElementById(i+'fleche2').style.display='block';
	fin = val - 1;
	document.getElementById(i+'derPicto').value = fin;
	}
	
	
}	






function changeOngletCures(numProduit)
{
	if(document.getElementById('boutonCureSpa')) document.getElementById('boutonCureSpa').className = "ongletCure";
	for(var i=81 ; i<=88 ; i++)
	{
		if(document.getElementById('boutonCure'+i)) document.getElementById('boutonCure'+i).className = "ongletCure";		
	}
	document.getElementById('boutonCure'+numProduit).className = "ongletCureSelected";
	
	
		
	
  var div = document.getElementById('blockCures');
    $.ajax({  // ajax
        url: "../html/ajaxCures.php",         // url de la page a charger
        type: "GET",
        data: "parametre="+numProduit,
        
        cache: false, // pas de mise en cache
        success:function(html){ 
        	 $(div).empty();            	 // on vide le div
            $(div).append(html);   			 // on met dans le div le resultat de la requete ajax
        },
        error:function(XMLHttpRequest, textStatus, errorThrows){ // erreur durant la requete
        }
    });    
	
}	

function changeOngletCuresSpa( numCure, numProduit)
{
	
	for(var i=81 ; i<=88 ; i++)
	{
		if(document.getElementById('boutonCure'+i)) document.getElementById('boutonCure'+i).className = "ongletCure";		
	}
	document.getElementById('boutonCureSpa').className = "ongletCureSelected";
	
	

	
  var div = document.getElementById('blockCures');
    $.ajax({  // ajax
        url: "../html/ajaxCures.php",         // url de la page a charger
        type: "GET",
        data: "parametre="+numCure+"&produit="+numProduit,
        
        cache: false, // pas de mise en cache
        success:function(html){ 
        	 $(div).empty();            	 // on vide le div
            $(div).append(html);   			 // on met dans le div le resultat de la requete ajax
        },
        error:function(XMLHttpRequest, textStatus, errorThrows){ // erreur durant la requete
        }
    });    
	
}		

function changeOngletJour(id)
{
	for(var i=1 ; i<=3 ; i++)
	{
		 if(document.getElementById('ongletJour'+i))document.getElementById('ongletJour'+i).className = "BoutonJour";
		if(document.getElementById('minPrice'+i))document.getElementById('minPrice'+i).style.display = "none";
	}
	document.getElementById('ongletJour'+id).className = "BoutonJourSelected";
	document.getElementById('minPrice'+id).style.display = "block";
	
		
}

function selectedCureSejour(value,id)
{
	document.getElementById('nbjoursSelected').value = value;
	document.getElementById('numFicheCure').value = id;
	
	//ya 3 formulaires 
	if(document.getElementById('nbjoursSelected_2'))document.getElementById('nbjoursSelected_2').value = value;
	if(document.getElementById('nbjoursSelected_3'))document.getElementById('nbjoursSelected_3').value = value;
	
	if(document.getElementById('CureSelected').value ==0)document.getElementById('CureSelected').value = document.getElementById('defaultCure').value ;
}

function selectedCure(value)
{
	document.getElementById('CureSelected').value = value;
	//ya 3 formulaires 
	if(document.getElementById('CureSelected_2'))document.getElementById('CureSelected_2').value = value;
	if(document.getElementById('CureSelected_3'))document.getElementById('CureSelected_3').value = value;
	
}


	
function checkEmailnews(){ 
				
				var email = document.formNewsletter.email.value; 
				if (email.search(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/) == -1)
				{ 
					document.getElementById('alert_newsletter').innerHTML = 'Mail invalide';
					document.getElementById('alert_newsletter').style.display = 'block';
					document.formNewsletter.email.focus(); 
					return false; 
				} 
				else {
					document.getElementById('alert_newsletter').style.display = 'none';
					
					return true;
					}
		}	
	// Fonction de creation de l'objet XMLHttpRequest qui resservira pour chaques fonctions AJAX
function getXhr2()
 {
  if(window.XMLHttpRequest) xhr = new XMLHttpRequest(); 
  else if(window.ActiveXObject)
   {  
    try
     {
      xhr = new ActiveXObject("Msxml2.XMLHTTP");
     }
    catch (e)
     {
      xhr = new ActiveXObject("Microsoft.XMLHTTP");
     }
   }
  else 
   { 
    alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest, veuillez le mettre Ã  jour"); 
    xhr = false; 
   } 
 }


function lister_champs(theform)//icic la fonction qui va gÃ©nÃ©rer les Ã©lÃ©ments a envoyer
{
   var url='';
   for (i=0; i<theform.elements.length; i++)
   {
       if(((theform.elements[i].type=='radio' ||theform.elements[i].type=='checkbox') && theform.elements[i].checked==true) || (theform.elements[i].type!='radio' &&theform.elements[i].type!='checkbox'))//control si c'est des radio ou check box et incrÃ©mente le rÃ©sultat QUE si c'est cochÃ© (sans Ã§a il prendrais les deux)
           {
   if(theform.elements[i].type=='select-multiple' || theform.elements[i].type=='select' )//si c'est un select multiple 
   {
    for(j = theform.elements[i].length-1; j >= 0; j-=1)//on parcours les element du select multiple
       {
          if(theform.elements[i].options[j].selected)//si selectionnÃ© on incremente
             {
                             if(url){url+='&';}
           url+=theform.elements[i].name+'='+theform.elements[i].options[j].value;
             }
     }
   }
   if(url){url+='&';}
   if(theform.elements[i].type!='select-multiple'){  url+=theform.elements[i].name+'='+theform.elements[i].value;}
           }
        }
return url;//onretourne le resultat vers la fonction appelÃ©e
}


function envoi_theformPrivilege(theform)
 {
 
  getXhr2();
  
  xhr.onreadystatechange = function()
   {
    if(xhr.readyState == 4 && xhr.status == 200)
     {
      // Nous remplacons le contenu du div mondiv par le retour de "ajax.php"
      document.getElementById('alert_newsletter').innerHTML = xhr.responseText;
     }
   }
 
  xhr.open("POST",'html/envoiPrivilegeForm.php',true);
   
  xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
  xhr.send(lister_champs(document.formNewsletter));
  document.getElementById('alert_newsletter').style.display ='block';
  //$('#spaceused1').progressBar(100);
  return false; // /!\il est important d'ajouter Ã§a afin que la page ne soit pas rappelÃ©e par le post!!/!\
 }		
		

		
function afficheTousProd(page,region,station)
{
	
	document.getElementById('affichebouton2').style.display = 'none';
	document.getElementById('masquebouton2').style.display = 'block';
	
  var div = document.getElementById('blockafficheTousProd');
    $.ajax({  // ajax
        url: "../html/ajaxafficheTousProd.php",         // url de la page a charger
        type: "GET",
        data: "page="+page+"&region="+region+"&station="+station,
        
        cache: false, // pas de mise en cache
        success:function(html){ 
        	 $(div).empty();            	 // on vide le div
            $(div).append(html);   			 // on met dans le div le resultat de la requete ajax
        },
        error:function(XMLHttpRequest, textStatus, errorThrows){ // erreur durant la requete
        }
    });    
	
}		


	function masqueTousProd(max)
	{
		document.getElementById('blockafficheTousProd').innerHTML ="";
		document.getElementById('masquebouton2').style.display = 'none';
		document.getElementById('affichebouton2').style.display = 'block';
		
	}		
	
	function displayForm(){	
	//$('#formulaire_uid').hide();
	//$('#form_new_uid2').show();
	document.getElementById('formulaire_uid').style.display="none";
	document.getElementById('formulaire_new').style.display="block";
	
	}
	
function displayForm2(){	
	//$('#formulaire_uid').hide();
	//$('#form_new_uid2').show();
	document.getElementById('formulaire_uid2').style.display="none";
	document.getElementById('formulaire_new2').style.display="block";
	
	}
	
function displayForm3(){	
	//$('#formulaire_uid').hide();
	//$('#form_new_uid2').show();
	document.getElementById('formulaire_uid3').style.display="none";
	document.getElementById('formulaire_new3').style.display="block";
	
	}
	
	
function displayForm_KDO(){	
	document.getElementById('form_uid_KDO').style.display="none";
	document.getElementById('form_all_KDO').style.display="block";
	
	}
	
function displayForm_Group(){	
	document.getElementById('form_uid_Group').style.display="none";
	document.getElementById('form_all_Group').style.display="block";
	
	}	
	
//devis express en 2 temps
// Fonction de creation de l'objet XMLHttpRequest qui resservira pour chaques fonctions AJAX
function getXhr()
{
	if(window.XMLHttpRequest) 
		xhr = new XMLHttpRequest(); 
	else if(window.ActiveXObject)
	{  
		try
		{
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xhr = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	else 
	{ 
		alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest, veuillez le mettre à jour"); 
		xhr = false; 
	} 
}

function lister_champs(theform)//icic la fonction qui va générer les éléments a envoyer
{
	var url='';
	for (i=0; i<theform.elements.length; i++)
	{
		if(	 (		(theform.elements[i].type=='radio' ||theform.elements[i].type=='checkbox') 
				&& 	theform.elements[i].checked==true ) 
			|| (theform.elements[i].type!='radio' && theform.elements[i].type!='checkbox'))//control si c'est des radio ou check box et incrémente le résultat QUE si c'est coché (sans ça il prendrait les deux)
		{
			if(theform.elements[i].type=='select-multiple' || theform.elements[i].type=='select' )//si c'est un select multiple 
			{
				for(j = theform.elements[i].length-1; j >= 0; j-=1)//on parcours les element du select multiple
				{
					if(theform.elements[i].options[j].selected)//si selectionné on incremente
					{
						if(url){url+='&';}
							url+=theform.elements[i].name+'='+theform.elements[i].options[j].value;
					}
				}
			}
			if(url)
			{
				url+='&';
			}
			if(theform.elements[i].type!='select-multiple')
			{  
				url+=theform.elements[i].name+'='+theform.elements[i].value;
			}
		}
	}
	return url;	//onretourne le resultat vers la fonction appelée
}

function envoi_theform(theform)
{
  	getXhr();
	//alert('la');
	xhr.onreadystatechange = function()
	{
		if(xhr.readyState == 4 && xhr.status == 200)
		{
			// Nous remplacons le contenu du div mondiv par le retour de "ajax.php"
			document.getElementById('result').innerHTML = xhr.responseText;
		}
	}
	xhr.open("POST",'save_form_devis.php',true);
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xhr.send(lister_champs(document.formDevis));
	//$('#spaceused1').progressBar(100);
	return false; // /!\il est important d'ajouter ça afin que la page ne soit pas rappelée par le post!!/!\
}
