var nChrCount = 65;
var nSpeed = 0.1;
var nStart = 32;
var nLeft = nStart;

var nTxtWidth = null;
var nEnd = null;  
var timerTt = null;
var status = "play";
 
var btn_play = "/fernsehen/a_z/k/kika_live/_img/ticker_play.gif";
var btn_pause = "/fernsehen/a_z/k/kika_live/_img/ticker_stop.gif";

function TickerTape(){
	tck.style.left = nLeft + "em";
	tck.style.width = nTxtWidth + "em";
	nLeft = nLeft - nSpeed;
	if(nLeft < nEnd) {nLeft = nStart}
	timerTt = setTimeout('TickerTape()', 30);
}

function btn_Stop(){
	status = "stopp";
	btn.src = btn_play;
	clearTimeout(timerTt);
}

function btn_Play(){
	status = "play";
	btn.src = btn_pause;
	TickerTape();
}

function btn_PlayStop(){
	if (status == "play") btn_Stop();
	else btn_Play();
}

function TickerInit(){
	nTxtWidth = nChrCount/2;
	nEnd = -nTxtWidth; 
	tck = document.getElementById('b-logoticker');
	obj = document.getElementById('b-tickerbox');
	box = document.getElementById('b-logobox');
	btn = document.getElementById('b-logoplayimg');
	box.style.display = "block";
	box.style.height = "1.625em";
	obj.onmouseover=btn_Stop;
	obj.onmouseout=btn_Play;
	TickerTape();
}
