/*-----------------------------------------------------*/
/*         Fonctions des pages de recherche            */
/*         Gestion du lieu                             */
/*-----------------------------------------------------*/
 
	function ChargeLieu(ListeDepTxt,ListeDepValue,ListeRegTxt,ListeRegValue)
	{//charge la bonne liste par rapport au bouton clique
	ChargeRegions(ListeRegTxt,ListeRegValue);
	if (document.getElementById('RparReg').checked){ChargeRegions(ListeRegTxt,ListeRegValue);document.getElementById('DivLieu').style.display = 'none';document.getElementById('DdlLieu').style.display ='block';}
	if (document.getElementById('RparDept').checked){ChargeDepartements(ListeDepTxt,ListeDepValue);document.getElementById('DivLieu').style.display = 'none';document.getElementById('DdlLieu').style.display ='block';}
	if (document.getElementById('RparVille').checked)
	  {
	  document.getElementById('DivLieu').style.display = 'block';
	  document.getElementById("DdlLieu").options.length = 0;
	  document.getElementById('DdlLieu').style.display ='none';
	  }
	}
	function RemplitLieu()
	{//remplit juste apres le clic le champs lieu
	 l =document.getElementById("DdlLieu");
	 //alert("DdlLieu=" + l.selectedIndex);
	 if (l.selectedIndex!=-1)
	 {
	 //alert("Copie");
	 document.getElementById("Lieu").value= l.options[l.selectedIndex].value;
	 }
	 
	 
	}

	function ChargeDepartements(ListeDepTxt,ListeDepValue)
	{
		resultsDepTxt=ListeDepTxt.split(",");
				
		resultsDepValue=ListeDepValue.split(";");
		
		s=document.getElementById("DdlLieu");
		s.options.length = 0;

		for(i=0;i<resultsDepTxt.length;i++)
		{
			s.options[s.options.length]=new Option(resultsDepTxt[i]);
			s.options[s.options.length - 1].value=resultsDepValue[i];
		}
	}

	function ChargeRegions(ListeRegTxt,ListeRegValue)
	{
		resultsRegTxt=ListeRegTxt.split(",");
		
		resultsRegValue=ListeRegValue.split(",");
		
		s=document.getElementById("DdlLieu");
		s.options.length = 0;

		for(i=0;i<resultsRegTxt.length;i++)
		{
			s.options[s.options.length]=new Option(resultsRegTxt[i]);
			s.options[s.options.length - 1].value=resultsRegValue[i];
		}
		return 1;
	}


/*
	function ChargeDepartements()
	{
		ListeDepTxt='<%=ListeDepTxt%>';
		resultsDepTxt=ListeDepTxt.split(",");
		
		ListeDepValue='<%=ListeDepValue%>';
		resultsDepValue=ListeDepValue.split(";");
		
		s=document.getElementById("DdlLieu");
		s.options.length = 0;

		for(i=0;i<resultsDepTxt.length;i++)
		{
			s.options[s.options.length]=new Option(resultsDepTxt[i]);
			s.options[s.options.length - 1].value=resultsDepValue[i];
		}
	}

	function ChargeRegions()
	{
		ListeRegTxt='<%=ListeRegTxt%>';
		resultsRegTxt=ListeRegTxt.split(",");
		
		ListeRegValue='<%=ListeRegValue%>';
		resultsRegValue=ListeRegValue.split(",");
		
		s=document.getElementById("DdlLieu");
		s.options.length = 0;

		for(i=0;i<resultsRegTxt.length;i++)
		{
			s.options[s.options.length]=new Option(resultsRegTxt[i]);
			s.options[s.options.length - 1].value=resultsRegValue[i];
		}
		return 1;
	}
	*/
