
/***********************************************
* Pausing updown message scroller- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
* Minor changes by Fayçal Baghli, 19/03/2006
***********************************************/

//configure the below five variables to change the style of the scroller
var scrollerdelay1='5000' //delay between msg scrolls. 3000=3 seconds.
var scrollerwidth1='185px'
var scrollerheight1='230px'
var scrollerbgcolor1=''
var stepdelay1 = '0';
var step1 = '1';
//set below to '' if you don't wish to use a background image
var scrollerbackground1=''

//configure the below variable to change the contents of the scroller




///////Do not edit pass this line///////////////////////

var ie1=document.all
var dom1=document.getElementById


if (messages_actualites.length>2)
i1=2
else
i1=0

function move1(whichdiv1){
tdiv1=eval(whichdiv1)
if (parseInt(tdiv1.style.top)>0&&parseInt(tdiv1.style.top)<=step1){
tdiv1.style.top=0+"px"
setTimeout("move1(tdiv1)",scrollerdelay1)
setTimeout("move21(second2_obj1)",scrollerdelay1)
return
}
if (parseInt(tdiv1.style.top)>=tdiv1.offsetHeight*-1){
tdiv1.style.top=parseInt(tdiv1.style.top)-step1+"px"
setTimeout("move1(tdiv1)",stepdelay1)
}
else{
tdiv1.style.top=parseInt(scrollerheight1)+"px"
tdiv1.innerHTML=messages_actualites[i1]
if (i1==messages_actualites.length-1)
i1=0
else
i1++
}
}

function move21(whichdiv1){
tdiv21=eval(whichdiv1)
if (parseInt(tdiv21.style.top)>0&&parseInt(tdiv21.style.top)<=step1){
tdiv21.style.top=0+"px"
setTimeout("move21(tdiv21)",scrollerdelay1)
setTimeout("move1(first2_obj1)",scrollerdelay1)
return
}
if (parseInt(tdiv21.style.top)>=tdiv21.offsetHeight*-1){
tdiv21.style.top=parseInt(tdiv21.style.top)-step1+"px"
setTimeout("move21(second2_obj1)",stepdelay1)
}
else{
tdiv21.style.top=parseInt(scrollerheight1)+"px"
tdiv21.innerHTML=messages_actualites[i1]
if (i1==messages_actualites.length-1)
i1=0
else
i1++
}
}

function startscroll1(){
first2_obj1=ie1? first21 : document.getElementById("first21")
second2_obj1=ie1? second21 : document.getElementById("second21")
move1(first2_obj1)
second2_obj1.style.top=scrollerheight1
second2_obj1.style.visibility='visible'
}

if (ie1||dom1){
document.writeln('<div id="main21" style="position:relative;width:'+scrollerwidth1+';height:'+scrollerheight1+';overflow:hidden;background-color:'+scrollerbgcolor1+' ;background-image:url('+scrollerbackground1+')">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth1+';height:'+scrollerheight1+';clip:rect(0 '+scrollerwidth1+' '+scrollerheight1+' 0);left:0px;top:0px">')
document.writeln('<div class=change id="first21" style="position:absolute;width:'+scrollerwidth1+';left:0px;top:1px;">')
document.write(messages_actualites[0])
document.writeln('</div>')
document.writeln('<div class=change id="second21" style="position:absolute;width:'+scrollerwidth1+';left:0px;top:0px;visibility:hidden">')
document.write(messages_actualites[dyndetermine1=(messages_actualites.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}

/*
if (window.addEventListener)
window.addEventListener("load", startscroll, false)
else if (window.attachEvent)
window.attachEvent("onload", startscroll)
else if (ie||dom)
window.onload=startscroll
*/

if (messages_actualites.length > 1)
{
	startscroll1();
}
