//Configurer ici les aspects de la fentre defilante
var scrollerwidth=380 //largeur
var scrollerheight=150 //hauteur
var scrollerbgcolor='#FFFFFF' //couleur de fond
//laisser la variable suivante vide si vous n'utilisez pas d'image de fond
var scrollerbackground=''

var ie = document.all;
var moz = document.getElementById && !document.all;

///////Ne pas editer sous cette ligne///////////////////////
if (messages.length>1) {INC_news=2;} else {INC_news=0;}

function move3(whichdiv){
if(ie){
	tdiv=eval(whichdiv)
	if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){tdiv.style.pixelTop=0;setTimeout("move3(tdiv)",delai_defil);setTimeout("move4(second2)",delai_defil);return;}
	if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){tdiv.style.pixelTop-=1;setTimeout("move3(tdiv)",20);}
	else{tdiv.style.pixelTop=scrollerheight;tdiv.innerHTML=messages[INC_news];if (INC_news==messages.length-1){INC_news=0;}else{INC_news++;}}
}
if(moz){
	tdiv=eval(whichdiv)
	eee=tdiv.style.top.split('px')
	if (eee[0]>0 && eee[0]<=5){tdiv.style.top=0+'px';setTimeout("move3(tdiv)",delai_defil);setTimeout("move4(document.getElementById('second2'))",delai_defil);return;}
	if (eee[0]>=tdiv.offsetHeight*-1){tdiv.style.top=eee[0]-5+'px';setTimeout("move3(tdiv);",80);}
	else{
	tdiv.style.top=scrollerheight+'px';
	tdiv.innerHTML=messages[INC_news];
	if (INC_news==messages.length-1){INC_news=0;}else{INC_news++;}}
}

}

function move4(whichdiv){
if(ie){
	tdiv2=eval(whichdiv)
	if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){tdiv2.style.pixelTop=0;setTimeout("move4(tdiv2)",delai_defil);setTimeout("move3(first2)",delai_defil);return;}
	if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){tdiv2.style.pixelTop-=1;setTimeout("move4(second2)",20);}
	else{tdiv2.style.pixelTop=scrollerheight;tdiv2.innerHTML=messages[INC_news];if (INC_news==messages.length-1){INC_news=0;}else{INC_news++;}}
}
if(moz){
	tdiv2=eval(whichdiv)
	eee=tdiv2.style.top.split('px');
	if (eee[0]>0 && eee[0]<=5){tdiv2.style.top=0+'px';setTimeout("move4(tdiv2)",delai_defil);setTimeout("move3(document.getElementById('first2'))",delai_defil);return;}
	if (eee[0]>=tdiv2.offsetHeight*-1){tdiv2.style.top=eee[0]-5+'px';setTimeout("move4(document.getElementById('second2'))",80);}
	else{tdiv2.style.top=scrollerheight+'px';tdiv2.innerHTML=messages[INC_news];
	if (INC_news==messages.length-1){INC_news=0;}else{INC_news++;}}
}

}

function startscroll(){
if(ie){
move3(document.getElementById('first2'))
document.getElementById('second2').style.top=scrollerheight
document.getElementById('second2').style.visibility='visible'
}

if(moz){
	move3(document.getElementById('first2'))
	document.getElementById('second2').style.top=scrollerheight+'px'
	document.getElementById('second2').style.visibility='visible'
}

}

window.onload=startscroll