var newsfeed_ie=document.all
var newsfeed_dom=document.getElementById

var nf_scrollerwidth = 266
var nf_scrollerheight = 32
var nf_scrollerbgcolor = "#FFFFFF"
var nf_scrollerbackground = "" // '' if you don't wish to use a background image
var nf_speed = 1 // original=5, slower=4 etc (n pixels per move)
var nf_pause = 5000 // milliseconds between each scroll

if (messages.length>2)
nf_i=2
else
nf_i=0

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=nf_speed){
tlayer.top=0
setTimeout("move1(tlayer)",nf_pause)
setTimeout("move2(document.nf_main.document.nf_second)",nf_pause)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=nf_speed
setTimeout("move1(tlayer)",50)
}
else{
tlayer.top=parseInt(nf_scrollerheight)
tlayer.document.write(messages[nf_i])
tlayer.document.close()
if (nf_i==messages.length-1)
nf_i=0
else
nf_i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=nf_speed){
tlayer2.top=0
setTimeout("move2(tlayer2)",nf_pause)
setTimeout("move1(document.nf_main.document.nf_first)",nf_pause)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=nf_speed
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.top=parseInt(nf_scrollerheight)
tlayer2.document.write(messages[nf_i])
tlayer2.document.close()
if (nf_i==messages.length-1)
nf_i=0
else
nf_i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=nf_speed){
tdiv.style.top=0+"px"
setTimeout("move3(tdiv)",nf_pause)
setTimeout("move4(nf_second2_obj)",nf_pause)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-nf_speed+"px"
setTimeout("move3(tdiv)",50)
}
else{
tdiv.style.top=parseInt(nf_scrollerheight)
tdiv.innerHTML=messages[nf_i]
if (nf_i==messages.length-1)
nf_i=0
else
nf_i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=nf_speed){
tdiv2.style.top=0+"px"
setTimeout("move4(tdiv2)",nf_pause)
setTimeout("move3(nf_first2_obj)",nf_pause)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-nf_speed+"px"
setTimeout("move4(nf_second2_obj)",50)
}
else{
tdiv2.style.top=parseInt(nf_scrollerheight)
tdiv2.innerHTML=messages[nf_i]
if (nf_i==messages.length-1)
nf_i=0
else
nf_i++
}
}

function startscroll(){
if (newsfeed_ie||newsfeed_dom){
nf_first2_obj=newsfeed_ie? nf_first2 : document.getElementById("nf_first2")
nf_second2_obj=newsfeed_ie? nf_second2 : document.getElementById("nf_second2")
move3(nf_first2_obj)
nf_second2_obj.style.top=nf_scrollerheight
nf_second2_obj.style.visibility='visible'
}
else if (document.layers){
document.nf_main.visibility='show'
move1(document.nf_main.document.nf_first)
document.nf_main.document.nf_second.top=parseInt(nf_scrollerheight)+nf_speed
document.nf_main.document.nf_second.visibility='show'
}
}

document.writeln('<ilayer id=\"nf_main\" width='+nf_scrollerwidth+' height='+nf_scrollerheight+' bgColor='+nf_scrollerbgcolor+' background=\"'+nf_scrollerbackground+'\" visibility=hide>')
document.writeln('<layer id=\"nf_first\" left=0 top=1 width='+nf_scrollerwidth+'>')
if (document.layers)
document.write(messages[0])
document.writeln('</layer>')

document.writeln('<layer id=\"nf_second\" left=0 top=0 width='+nf_scrollerwidth+' visibility=hide>')
if (document.layers)
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
document.writeln('</layer>')
document.writeln('</ilayer>')

if (newsfeed_ie||newsfeed_dom){
document.writeln('<div id="nf_main2" style="position:relative;width:'+nf_scrollerwidth+';height:'+nf_scrollerheight+';overflow:hidden;background-color:'+nf_scrollerbgcolor+' ;background-image:url('+nf_scrollerbackground+')">')
document.writeln('<div style="position:absolute;width:'+nf_scrollerwidth+';height:'+nf_scrollerheight+';clip:rect(0 '+nf_scrollerwidth+' '+nf_scrollerheight+' 0);left:0px;top:0px">')
document.writeln('<div id="nf_first2" style="position:absolute;width:'+nf_scrollerwidth+';left:0px;top:1px;">')
document.write(messages[0])
document.writeln('</div>')
document.writeln('<div id="nf_second2" style="position:absolute;width:'+nf_scrollerwidth+';left:0px;top:0px;visibility:hidden">')
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}