// JavaScript Documentvar TICKER_PAUSED = false;

var xOffset = 0;
var tickerTimeOut;
var TICKER_PAUSED=false;

var ticker = document.getElementById('newsticker');
var tickerChild = ticker.getElementsByTagName('nobr')[0];

function stopTicker() {
	TICKER_PAUSED=true;
	clearTimeout(tickerTimeOut);
}

function restartTicker() {
	TICKER_PAUSED=false;
	move();	
}

function startTicker()
{
	move();
}

function move()
{
	breite = parseInt(ticker.style.width);
	
	if (!TICKER_PAUSED) {
		xOffset -= 2;
		if (xOffset < -tickerChild.offsetWidth) xOffset = parseInt(ticker.parentNode.style.width);
		ticker.style.left = xOffset+"px";
		
		// Erneuter Selbstaufruf
		tickerTimeOut = setTimeout('move()',50);
	}
}

startTicker();