/* dernière modification : 09/12/2004 */
function debut()
{	var qd = 0;
	var strqd = GetCookie(unNom);
	if( strqd != null )
	{	qd = parseInt(strqd);
	}
	if( (qd==0) || (qd <tour) )
	{	SetCookie(unNom,tour);
		cetour = tour;
	}
	else
	{	cetour = qd;
	}
	vucookie = true; 
} 

function imprime(quoi)
{
	if( quoi == 0 ) debut();
	var str = '<a href="javascript:pre(';
	str += quoi;
	str += ')">';
	if(tour > 1) {	
		str += '<img src="fl.gif" width=15 height=12> Le tour pr&eacute;c&eacute;dent';	}
	else {
		str += "Le classement final de la partie pr&eacute;c&eacute;dente";	}
	str += "</a> ";
	if(tour < cetour)
	{	
		str += '<a href="javascript:sui(';
		str += quoi;
		str += ')">Le tour suivant <img src="fr.gif" width=15 height=12></a>';	
	}
	document.write(str);
}

function aller(form)
{ 	if (form.letour.value > cetour)
	{	alert("ce tour n'a pas eu lieu encore");
	}
	else if(form.letour.value.length<=0)
	{	alert("vous n'avez pas rentré le tour désiré");	
	}
	else if(form.letour.value == cetour)
	{	window.location="TOP.htm";
	} else
	{	var fic = form.letour.value +"mTOP.htm";
		window.location=fic;
	}
}

function pre(quoi)
{	var nombre = tour - 1;
	var fic = nombre  +"mTOP.htm";
	if( quoi == 1 )
		fic += "#fin";
	window.location=fic;
}

function sui(quoi)
{	
	var nombre = tour + 1;
	var fic = "";
	if(nombre == cetour)
	{	fic +="TOP.htm";
	}
	else
	{	fic += nombre  +"mTOP.htm";
	}
	if(quoi == 1) 
	{	fic += "#fin";
	}
	window.location=fic;
}
function contournecache()
{
DeleteCookie(unNom);
window.location='TOP.htm?toto='+ Math.round(1000*Math.random());
}
