
// Testen, ob "ticker-text" geladen.
// Falls ja, dann Ticker aktivieren
if ( document.getElementById ) {
	var tickerTestTimeout = null;
	//tickerTest();
}



function tickerTest() {
	if ( document.getElementById("ticker-text") ) {
		window.clearTimeout( tickerTestTimeout );
		var TickerIntervall = window.setInterval("ticker()", 60);
	} else {
		tickerTestTimeout = window.setTimeout( tickerTest, 1000 );
	}
}


function ticker() {
	var ttp = document.getElementById("ticker-text");
	var x = null;
	var Unit = ( navigator.userAgent.indexOf("MSIE") != -1 ) ? "" : "px";
	if ( ttp.style.left ) {
		x = parseInt( ttp.style.left ) - 2;
		if ( x < -900 ) x = 800;
	} else {
		x = 0;
	}
	ttp.style.left = x + Unit;
}



/*
if ( document.getElementById ) {
	var intervall = window.setInterval("anim()",15);
	var ttp = document.getElementById('ticker-text');
	var x = 0;
	ttp.style.left = x;
	var wait = 0;

	function anim() {
		if ( wait < 20 ) {
			wait = wait + 1;
		} else {
			x = x - 1
			if ( x < -900 ) x = 700;
			ttp.style.left = x;
		}
	}

}
*/