//***************************************************************
//* Fonctions de remplissage d'une combo à partir d'un tableau  *
//***************************************************************
function AppelCombo(Element, Tableau, DefaultText, NoRecordText)
{
if (Element.options.length != 0)
		Element.options.length = 0;

	//RequeteSQL = Requete;
	//co = RSExecute('../REMOTE/Remote_Scripting.asp','remplircombo', Requete);
	//ChaineRetour = String(co.return_value);

	ChaineRetour = Tableau;
	
	Position = ChaineRetour.indexOf('¤', 0);
	NbreChamps = ChaineRetour.substr(0, Position);
	ChaineRetour = ChaineRetour.substr(Position+1, ChaineRetour.length-Position);

	Position = ChaineRetour.indexOf('¤', 0);
	NbreRecords = ChaineRetour.substr(0, Position);
	ChaineRetour = ChaineRetour.substr(Position+1, ChaineRetour.length-Position);
		
	Infos = new Array(NbreChamps);
	
	if (NbreRecords > 0)
	{
		if (DefaultText != "")
		{
			var MyOption = new Option();
			MyOption.value = -1;
			MyOption.text = DefaultText;
			Element.options[Element.options.length] = MyOption;
		}
	}
	else
	{
		if (NoRecordText != "")
		{
			var MyOption = new Option();
			MyOption.value = -1;
			MyOption.text = NoRecordText;
			Element.options[Element.options.length] = MyOption;
		}
	}
	for (i=0 ; i<NbreRecords ; i++)
	{
		var MyOption = new Option();
		for (j=0 ; j<NbreChamps ; j++)
		{
			Position = ChaineRetour.indexOf('¤', 0);
			if (j == 0)
				Infos[j] = parseInt(ChaineRetour.substr(0, Position));
			else 
				Infos[j] = ChaineRetour.substr(0, Position);
			ChaineRetour = ChaineRetour.substr(Position+1, ChaineRetour.length-Position);
		}
		MyOption.value = Infos[0];
		for (j=1 ; j<NbreChamps ; j++)
			MyOption.text += (Infos[j]);
		Element.options[Element.options.length] = MyOption;
	}
}