var posx=0;
var finalx=0;
var step=50;
var moving=false;
var sens=1;

function fptroll(num,titre)
{
	document.getElementById("titrefpt").innerHTML='&nbsp;'+titre;
	document.getElementById("rollfpt0"+num+"on").style.visibility='visible';
	for(var j=1;j<7;j++){if(j!=num)document.getElementById("rollfpt0"+j+"on").style.visibility='hidden';}
	finalx=-330*(num-1);
	step=50;
	sens=1;
	if(finalx-posx<0)sens=-1;
	if(moving==false)movefpt();
}

function movefpt()
{

	newx=Math.round(posx+(step*sens));
	deltax=(finalx-newx)*sens;
	
	if(deltax<=0)
		{
		posx=finalx;
		document.getElementById("zonefpt").style.marginLeft=finalx;
		moving=false;
		pausing=false;
		return;
		}
		
	pausing=true;
	moving=true;
	posx=newx;
	document.getElementById("zonefpt").style.marginLeft=posx;
	if(deltax<320)step=step-4;
	if(step<2)step=2;
	setTimeout('movefpt()',10);
}


var xzone=0;
var step2=-1;
var pausing=false;

function illumove()
{
	if(pausing==true)
		{
		timerefresh=1000;
		}
	else
		{
		xzone+=step2;
		if(xzone<=-1408)xzone=0;
		document.getElementById("zillu").style.marginLeft=xzone;
		timerefresh=20;
		}
	setTimeout('illumove()',timerefresh);
}

function illuroll(num,illutheme,illutitre)
{
	chaine='';
	//position de la fleche...
	xfleche=(num*176)+64+xzone;
	if(illutitre)chaine='<span class=titrerose12>'+illutitre+'</span>';
	if(illutheme)chaine='<span class=titre12>'+illutheme+' - </span>'+chaine;
	if(xfleche>0 && xfleche<658)
		{
		document.getElementById("illufleche").style.marginLeft=xfleche;
		document.getElementById("illufleche").style.visibility='visible';
		}
	document.getElementById("backillu").innerHTML=chaine;
}

function illuout()
{
document.getElementById("illufleche").style.visibility='hidden';
document.getElementById("backillu").innerHTML='';
}

function flashpub(numpub,ypub)
{
document.getElementById("zonepub").innerHTML='<EMBED src="/upload/id'+numpub+'-doc.swf" quality=high width="728" height="'+ypub+'" bgcolor="FFFFFF" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></EMBED>';
}
