/* auteur: varman7 */
/* Date de création: 08/02/2009 */

function effetbullet(bullet,i,eff)
{
	//alert(i);
	if ((i<10) && (eff==1) )
	{
	i=i+2;
	//alert(document.images[bullet].id);
	document.images[bullet].style.marginTop= -i+"px";
	if (i==10) eff=2;
	setTimeout("effetbullet('"+bullet+"',"+i+","+eff+")", 5);return;
	}
	if ((i>0) && (eff==2) )
	{
	i=i-2;
	document.images[bullet].style.marginTop= -i+"px";
	if (i==0) eff=3;
	setTimeout("effetbullet('"+bullet+"',"+i+","+eff+")", 5);return;
	}
	if ((i<8) && (eff==3) )
	{
	i=i+2;
	//alert(document.images[bullet].id);
	document.images[bullet].style.marginTop= -i+"px";
	if (i==8) eff=4;
	setTimeout("effetbullet('"+bullet+"',"+i+","+eff+")", 5);return;
	}
	if ((i>0) && (eff==4) )
	{
	i=i-2;
	document.images[bullet].style.marginTop= -i+"px";
	if (i==0) eff=5;
	setTimeout("effetbullet('"+bullet+"',"+i+","+eff+")", 5);return;
	}
	if ((i<6) && (eff==5) )
	{
	i=i+2;
	//alert(document.images[bullet].id);
	document.images[bullet].style.marginTop= -i+"px";
	if (i==6) eff=6;
	setTimeout("effetbullet('"+bullet+"',"+i+","+eff+")", 5);return;
	}
	if ((i>0) && (eff==6) )
	{
	i=i-2;
	document.images[bullet].style.marginTop= -i+"px";
	if (i==0) eff=7;
	setTimeout("effetbullet('"+bullet+"',"+i+","+eff+")", 5);return;
	}
	if ((i<4) && (eff==7) )
	{
	i=i+2;
	//alert(document.images[bullet].id);
	document.images[bullet].style.marginTop= -i+"px";
	if (i==4) eff=8;
	setTimeout("effetbullet('"+bullet+"',"+i+","+eff+")", 5);return;
	}
	if ((i>0) && (eff==8) )
	{
	i=i-2;
	document.images[bullet].style.marginTop= -i+"px";
	if (i==0) eff=9;
	setTimeout("effetbullet('"+bullet+"',"+i+","+eff+")", 5);return;
	}
}

function effetlibele(menu,couleur){document.getElementById(menu).style.fontStyle= "italic";document.getElementById(menu).style.color=couleur;}
function effetlibele2(menu){document.getElementById(menu).style.fontStyle= "normal";document.getElementById(menu).style.color="#414141";}


var max=0;
function textlist()
{
        max=textlist.arguments.length;
		
        for (i=0; i<max; i++)
        this[i]=textlist.arguments[i];
}

var pos=-3; debph=''; phcol1=''; phcol2=''; phcol3=''; phcol4=''; phcol5=''; finph=''; bdebph=''; bphcol1=''; bphcol2=''; bphcol3=''; bphcol4=''; bphcol5=''; bfinph='';
function textticker() 
{   
	
	debph=tl[0].substring(0,(pos-2));
	phcol1='<font color="#FFFFCC">'+tl[0].substring((pos-2),(pos-1))+'</font>'; 
	phcol2='<font color="#FFFF66">'+tl[0].substring((pos-1),(pos))+'</font>';
	phcol3='<font color="#FFFF00">'+tl[0].substring(pos,(pos+1))+'</font>'; 
	phcol4='<font color="#FFFF66">'+tl[0].substring((pos+1),(pos+2))+'</font>'; 
	phcol5='<font color="#FFFFCC">'+tl[0].substring((pos+2),(pos+3))+'</font>';
	finph=tl[0].substring((pos+3),tl[0].length+3);
	bdebph=tl[1].substring(0,(pos-2));
	bphcol1='<font color="#FFFFCC">'+tl[1].substring((pos-2),(pos-1))+'</font>'; 
	bphcol2='<font color="#FFFF66">'+tl[1].substring((pos-1),(pos))+'</font>';
	bphcol3='<font color="#FFFF00">'+tl[1].substring(pos,(pos+1))+'</font>'; 
	bphcol4='<font color="#FFFF66">'+tl[1].substring((pos+1),(pos+2))+'</font>'; 
	bphcol5='<font color="#FFFFCC">'+tl[1].substring((pos+2),(pos+3))+'</font>';
	bfinph=tl[1].substring((pos+3),tl[1].length+3);
	//alert(phcol5);
    document.getElementById("lien1").innerHTML=debph+phcol1+phcol2+phcol3+phcol4+phcol5+finph+'<br>'+bdebph+bphcol1+bphcol2+bphcol3+bphcol4+bphcol5+bfinph;
	
	if(pos++==31)
	{
		pos=-3;  debph=''; phcol1=''; phcol2=''; phcol3=''; phcol4=''; phcol5=''; finph='';
		bdebph=''; bphcol1=''; bphcol2=''; bphcol3=''; bphcol4=''; bphcol5=''; bfinph='';
		//alert('test');
		setTimeout("textticker()",8000);	
	}
	else
	{
		setTimeout("textticker()",10);
	}  
	      
}
