/***********************************************
* 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
***********************************************/


//configure the below five variables to change the style of the scroller
var scrollerdelay2='30000000' //delay between msg scrolls. 3000=3 seconds.
var scrollerwidth2='210px'
var scrollerheight2='210px'
var scrollerbgcolor2='transparent'
//set below to '' if you don't wish to use a background image
var scrollerbackground2=''

//configure the below variable to change the contents of the scroller

///////Do not edit pass this line///////////////////////

var ie2=document.all
var dom2=document.getElementById

if (messages2.length>2)
i_move_3=2
else
i_move_3=0

function move3(whichdiv){

tdiv3=eval(whichdiv)
if (parseInt(tdiv3.style.top)>0&&parseInt(tdiv3.style.top)<=5){
tdiv3.style.top=0+"px"
setTimeout("move3(tdiv3)",scrollerdelay2)
setTimeout("move4(second3_obj)",scrollerdelay2)
return
}
if (parseInt(tdiv3.style.top)>=tdiv3.offsetHeight*-1){
tdiv3.style.top=parseInt(tdiv3.style.top)-5+"px"
setTimeout("move3(tdiv3)",50)
}
else{
tdiv3.style.top=parseInt(scrollerheight2)+"px"
tdiv3.innerHTML=messages2[i_move_3]
if (i_move_3==messages2.length-1)
i_move_3=0
else
i_move_3++
}
}

function move4(whichdiv){
tdiv4=eval(whichdiv)
if (parseInt(tdiv4.style.top)>0&&parseInt(tdiv4.style.top)<=5){
tdiv4.style.top=0+"px"
setTimeout("move4(tdiv4)",scrollerdelay2)
setTimeout("move3(first3_obj)",scrollerdelay2)
return
}
if (parseInt(tdiv4.style.top)>=tdiv4.offsetHeight*-1){
tdiv4.style.top=parseInt(tdiv4.style.top)-5+"px"
setTimeout("move4(second3_obj)",50)
}
else{
tdiv4.style.top=parseInt(scrollerheight2)+"px"
tdiv4.innerHTML=messages2[i_move_3]
if (i_move_3==messages2.length-1)
i_move_3=0
else
i_move_3++
}
}

function startscroll2(){
first3_obj=ie2? first3 : document.getElementById("first3")
second3_obj=ie2? second3 : document.getElementById("second3")
move3(first3_obj)
second3_obj.style.top=scrollerheight2
second3_obj.style.visibility='visible'
}

if (ie2||dom2){
document.writeln('<div id="main3" style="position:relative;width:'+scrollerwidth2+';height:'+scrollerheight2+';overflow:hidden;background-color:'+scrollerbgcolor2+' ;background-image:url('+scrollerbackground2+')">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth2+';height:'+scrollerheight2+';clip:rect(0 '+scrollerwidth2+' '+scrollerheight2+' 0);left:0px;top:0px">')
document.writeln('<div id="first3" style="position:absolute;width:'+scrollerwidth2+';left:0px;top:1px;">')

for (var i=0; i < messages2.length;i++)
{
document.write(messages2[i] + '<br><img border="0" src="http://www.trt3.jus.br/images/linha_noticias_2.gif"><br>')
}
document.writeln('</div>')
document.writeln('<div id="second3" style="position:absolute;width:'+scrollerwidth2+';left:0px;top:0px;visibility:hidden">')
document.write(messages2[dyndetermine=(messages2.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}

if (window.addEventListener)
window.addEventListener("load", startscroll2, false)
else if (window.attachEvent)
window.attachEvent("onload", startscroll2)
else if (ie2||dom2)
window.onload=startscroll2


