//<!--
//configure the below five variables to change the style of the scroller
var scrollerwidth=180
var scrollerheight=200
var scrollerbgcolor='white'
//set below to '' if you don't wish to use a background image
var scrollerbackground=''
//configure the below variable to change the contents of the scroller

d=document
var scrollUp1,scrollUp2,divUp1,divUp2,divUp3
delay = 10000
///////Do not edit pass this line///////////////////////
var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1
if (messages.length>2) {i=2} else {i=0;}

function scrollUp(wL)
{ 
	tL=eval(wL)
	if (tL.top>0&&tL.top<=5)
		{
		tL.top=0
		
		scrollUp1 = setTimeout("scrollUp(tL)",delay)
		scrollUp2 = setTimeout("scrollUp2(document.main.document.second)",delay)
		return
		}
	if (tL.top>=tL.document.height*-1)
		{
		tL.top-=5
		setTimeout("scrollUp(tL)",25)
		}
	else
	{
		tL.top=scrollerheight
		tL.document.write(messages[i])
		tL.document.close()
		if (i==messages.length-1)
			{ breakAll(1+' '+i) }
		else
			{ i++ }
	if (i>messages.length) return breakAll(1) 
	}
}
function scrollUp2(wL)
{
	if (i>messages.length) return breakAll(1) 
	tL2=eval(wL)
	if (tL2.top>0&&tL2.top<=5)
		{
		tL2.top=0
		setTimeout("scrollUp2(tL2)",delay)
		setTimeout("scrollUp(document.main.document.first)",delay)
		return
		}
	if (tL2.top>=tL2.document.height*-1)
		{
		tL2.top-=5
		setTimeout("scrollUp2(tL2)",50)
		}
	else
		{
			tL2.top=scrollerheight
			tL2.document.write(messages[i])
			tL2.document.close()
	
			if (i==messages.length-1)
				{ breakAll(2+' '+i) }
			else
				{ i++ }
		}
	if (i>messages.length) return breakAll(1) 
	}
function move3(whichdiv)
{ 
	tdiv=eval(whichdiv)
	if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5)
		{
		tdiv.style.top=0
		tdiv.style.visibility="visible"
		second2_obj.style.visibility="hidden"
		if (i==messages.length+1) {} else { divUp1 = setTimeout("move3(tdiv)",delay)
		divUp2 = setTimeout("move4(second2_obj)",delay)}
		return
		}
	if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1)
		{
		tdiv.style.top=parseInt(tdiv.style.top)-5
		divUp3 = setTimeout("move3(tdiv)",50)
		}
	else
		{
		tdiv.style.top=scrollerheight
		tdiv.innerHTML=messages[i]
		if (tdiv.innerHTML == "undefined") breakAll (3)
		//if (i==messages.length-1)
		//	{ breakAll(3+' '+i) }
		//else
		//	{ i++ }
		i++
		}
	}

function move4(whichdiv)
	{
	tdiv2=eval(whichdiv)
	if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5)
		{
		tdiv2.style.top=0
		tdiv2.style.visibility="visible"
		first2_obj.style.visibility="hidden"
	if (i==messages.length+1) {} else { //return false; //;return breakAll(4)
		divUp1 = setTimeout("move4(tdiv2)",delay)
		divUp2 = setTimeout("move3(first2_obj)",delay)}
		return
		}
	if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1)
		{
		tdiv2.style.top=parseInt(tdiv2.style.top)-5
		setTimeout("move4(second2_obj)",50)
		}
	else
		{
		tdiv2.style.top=scrollerheight
		tdiv2.innerHTML=messages[i]
		if (tdiv2.innerHTML == "undefined") 
			{
			//alert(i + ' ' + messages.length)
			//tdiv2.innerHTML = messages[messages.length-1]
			breakAll (4)
			}
		
		
		//if (i==messages.length-1)
		//	{ breakAll(3+' '+i) }
		//else
		//	{ i++ }
		i++
		}
	}

function moveNext(whichdiv,stopHere)
	{
		clearTimeout(scrollUp1);
		clearTimeout(scrollUp2);
		clearTimeout(divUp1);
		clearTimeout(divUp2);
		clearTimeout(divUp3);
		move3(tdiv);move4(second2_obj)
	}
	
function startscroll()
{
	if (ie||dom)
	{
		for (z = 1; z < ImgsA.length; z++) 
		{	if (ImgsA[z].src.indexOf('bject')==-1) {}
			{	ImgsW[z] = new Image(); ImgsW[z].src =ImgsA[z].src; 
			} 
		}
		first2_obj=ie? first2 : document.getElementById("first2")
		second2_obj=ie? second2 : document.getElementById("second2")
		move3(first2_obj)
		second2_obj.style.top=scrollerheight
		second2_obj.style.visibility='hidden'
	
	}
	else if (document.layers)
	{
		document.main.visibility='visible'
		scrollUp(document.main.document.first)
		document.main.document.second.top=scrollerheight+5
		document.main.document.second.visibility='hidden'
	}
}
//alert(dom)
function writeLayers1() {if (document.layers) document.write(messages[0]) }

function writeLayers2() {if (document.layers) document.write(messages[dyndetermine=(messages.length==1)? 0 : 1]) }

function writeDivs() 
{
	if (ie||dom)
	{ 
		writeDivs = ('') 
		writeDivs += ('<div id="main2" style="z-index:1;position:relative;width:'+scrollerwidth+'px;height:'+scrollerheight+'px;overflow:hidden;background-color:'+scrollerbgcolor+'">\n') // +' ;background-image:url('+scrollerbackground+')">\n')
		writeDivs += ('	<div style="z-index:2;position:absolute;width:'+scrollerwidth+'px;height:'+scrollerheight+'px;clip:rect(0px '+scrollerwidth+'px '+scrollerheight+'px 0px);left:0px;top:0px">\n')
		writeDivs += ('		<div id="first2" style="z-index:3 !important;position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">\n')
		writeDivs += (messages[0]+'\n')
		writeDivs += ('		</div>\n')
		writeDivs += ('		<div id="second2" style="visibility:hidden;z-index:4 !important;position:absolute;width:'+scrollerwidth+'px;left:0px;top:0px;visibility:hidden">\n')
		writeDivs += (messages[dyndetermine=(messages.length==1)? 0 : 1])
		writeDivs += ('		</div>\n')
		writeDivs += ('	</div>\n</div>\n')
		document.write(writeDivs)
	}
}

function breakAll(what)

{ 	
	clearTimeout(divUp1);
	clearTimeout(divUp2);
	clearTimeout(divUp3);
	return false
}
addLoadEvent (startscroll)
//-->


