
//configure the below three variables to change the style of the scroller
var scrollerwidth=127
var scrollerheight=106
var scrollerbgcolor='white'


if (messages.length>1)
	i=2
else
	i=0


function move3(whichdiv){
	tdiv=eval(whichdiv)
	topPnt = (scrollerheight - tdiv.offsetHeight)/2;
	if (tdiv.style.pixelTop>topPnt&&tdiv.style.pixelTop<= (topPnt+5)){
		tdiv.style.pixelTop=topPnt
		setTimeout("move3(tdiv)",3000)
		setTimeout("move4(second2)",4500)
		return
	}
	if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){
		tdiv.style.pixelTop-=5
		setTimeout("move3(tdiv)",100)
	}
	else{
		tdiv.style.pixelTop=scrollerheight
		tdiv.innerHTML=messages[i]
		if (i==messages.length-1)
			i=0
		else
			i++
	}
}

function move4(whichdiv){
	tdiv2=eval(whichdiv)
	topPnt2 = (scrollerheight - tdiv2.offsetHeight)/2;
	if (tdiv2.style.pixelTop>topPnt2 && tdiv2.style.pixelTop<=(topPnt2+5)){
		//if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){
		tdiv2.style.pixelTop=topPnt2
		setTimeout("move4(tdiv2)",3000)
		setTimeout("move3(first2)",4500)
		return
	}
	if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){
		tdiv2.style.pixelTop-=5
		setTimeout("move4(second2)",100)
	}else{
		tdiv2.style.pixelTop=scrollerheight
		tdiv2.innerHTML=messages[i]
		if (i==messages.length-1)
			i=0
		else
			i++
	}
}

function startscroll(){
	if(document.all){
		move3(first2)
		second2.style.top=scrollerheight*1.5;
	}
}

window.onload=startscroll

if (document.all && navigator.userAgent.indexOf("Opera") == -1){
	document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+'">')
	document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">')
	document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0;top:' + scrollerheight/2 + ';">')
	document.write(messages[0])
	document.writeln('</div>')
	document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0;top:' +scrollerheight/2 + '">')
	document.write(messages[1])
	document.writeln('</div>')
	document.writeln('</div>')
	document.writeln('</span>')
}

