

var speed=30;		
var divpause=4000;	
var divheight=25;	
var divname1='odd';	
var divname2='even';

var divincbt=1;
var divinc;
var stopposa;
var stopposb;
var scrollmsga;
var scrollmsgb;
var thediva;
var thedivb;
var posa;
var posb;
var i=msg.length;
var firsttime='y';
var divprop;
var whichdiv=divname1;

stopposa=0;
stopposb=divheight*-1;
divprop='top';
divinc=divincbt;

function Scrollboxa(obja)
	{
	savobja=obja;
	posa=posa-divinc;
	if(posa<=stopposa)
		{
		clearTimeout(scrollmsga);
		setTimeout('news_ticker()',divpause);
		}
	else
		{
		eval('elma.style.'+divprop+'=posa');
		elma.style.visibility='visible';
		scrollmsga=setTimeout('Scrollboxa(savobja)',speed);
		}
	}

function Scrollboxb(objb)
	{
	savobjb=objb;
	posb=posb-divinc;
	if(posb<=stopposb)
		{
		clearTimeout(scrollmsgb);
		}
	else
		{
		eval('elmb.style.'+divprop+'=posb');
		scrollmsgb=setTimeout('Scrollboxb(savobjb)',speed);
		}
	}

function news_ticker()
	{
	i++;
	if(i>=msg.length)
		{
		i=0;
		}
	posa=stopposb*-1;
	posb=0;
	if(firsttime=='y')
		{
		firsttime='n';
		elma=document.getElementById(divname1);
		elma.innerHTML=msg[i];
		Scrollboxa(thediva);
		}
	else
		{
		if(whichdiv==divname1)
			{
			elmb=document.getElementById(divname1);
			elma=document.getElementById(divname2);
			elma.innerHTML=msg[i];
			Scrollboxb(thedivb);
			whichdiv=divname2;
			Scrollboxa(thediva);
			}
		else
			{
			elmb=document.getElementById(divname2);
			elma=document.getElementById(divname1);
			elma.innerHTML=msg[i];
			Scrollboxb(thedivb);
			whichdiv=divname1;
			Scrollboxa(thediva);
			}
		}
	}