// Fonction permettant de tester si une valeur est un chiffre
// Retourne 1 lorsque c'est un chiffre
function Test_Chiffre(Val)
{
	Res = 0;
	if(Val != '' && !isNaN(Val))
		Res = 1;
		
	return Res;
}
// Retourne 1 si le nombre est pair
function pair(nombre)
{
	if(nombre/2 == Math.round(nombre/2))
		return 1;
	else
		return 0;
}
// Afficher une div
function Afficher_Div(Id)
{
	document.getElementById(Id).style.display = 'block';
}
// Cacher une div
function Cacher_Div(Id)
{
	document.getElementById(Id).style.display = 'none';
}
// Afficher la liste des genS qui ont répondu
function Ecrire_Liste(Donnee)
{
	var Div = 'Liste_Repondu';
	var Html = '';
	Tableau = Donnee.split('#');
	// Mise en forme de la liste en HTML
	if(Tableau.length > 0)
	{
		Html += '<table width="100%">';
		for(i=0;i<Tableau.length;i++)
		{
			if(Tableau[i] != '')
			{
				if(pair(i))
					Html += '<tr class="pair">';
				else
					Html += '<tr class="impair">';
				Html += '<td>';
				Html += Tableau[i];
				Html += '</td>';
				Html += '</tr>';
			}
		}
		Html += '</table>';
	}
	else
		Html += '<strong>Aucun !</strong>';
		
	document.getElementById('La_Liste').innerHTML = Html;
	
	scrolltop();
	Afficher_Div(Div);
}
var timer;
function scrolltop()
{
	document.getElementById('Liste_Repondu').style.top = document.body.scrollTop+10+'px';
	timer=setTimeout("scrolltop()",1);
}
function stoptimer()
{
	clearTimeout(timer);
}
function Bt_Afficher_Cacher_Div(Bt,Div)
{
	if(Bt.value == "Afficher")
	{
		Afficher_Div(Div);
		Bt.value = "Cacher";
	}
	else
	{
		Cacher_Div(Div);
		Bt.value = "Afficher";
	}
}