/*
Scroll text on the right side when page is loaded
	onmouseover: stop scrolling
	onmouseout: start scrolling
*/
var topPosition = 200;
var interval;
var bottomPosition = 0;
var timerIsOn = 0;

function doTimer()
{
	if (timerIsOn == 0)
	{
		timerIsOn = 1;
		scrollText();
	}
}

function scrollText()
{
	if (bottomPosition >= 200)
	{
		topPosition = 200;
		bottomPosition = -document.getElementById("display").offsetHeight;
	}
	
	document.getElementById("display").style.top = topPosition + "px";
	topPosition = topPosition - 1;
	bottomPosition = bottomPosition + 1;
	interval = setTimeout(scrollText,50);
}

function stopScrolling()
{
	clearTimeout(interval);
	//clearInterval(interval);
	timerIsOn = 0;
}

function startScrolling()
{
	doTimer();	
}

