TICKER_CONTENT = document.getElementById("TICKER_DIV").innerHTML;
TICKER_RIGHTTOLEFT = false;
TICKER_SPEED = 2;
TICKER_STYLE = '';
TICKER_PAUSED = false;
TICKER_GIF = '/pasold/images/blank_1x1.gif';

ticker_start();

function ticker_start() {
	var tickerSupported = false;
	TICKER_WIDTH = document.getElementById("TICKER_DIV").style.width;
	var img = "<img src="+TICKER_GIF+" width="+TICKER_WIDTH+" height=0>";

	// Firefox
	if (navigator.userAgent.indexOf("Firefox")!=-1 || navigator.userAgent.indexOf("Safari")!=-1 || navigator.userAgent.indexOf("MSIE 8")!=-1) {
		document.getElementById("TICKER_DIV").innerHTML = "<TABLE  cellspacing='0' cellpadding='0' width='100%'><TR><TD nowrap='nowrap'>"+img+"<SPAN style='"+TICKER_STYLE+"' ID='TICKER_BODY' width='100%'>&nbsp;</SPAN>"+img+"</TD></TR></TABLE>";
		tickerSupported = true;
	}
	// IE
	else if (navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1) {
		document.getElementById("TICKER_DIV").innerHTML = "<DIV nowrap='nowrap' style='width:100%;'>"+img+"<SPAN style='"+TICKER_STYLE+"' ID='TICKER_BODY' width='100%'></SPAN>"+img+"</DIV>";
		tickerSupported = true;
	}
	if(!tickerSupported) document.getElementById("TICKER_DIV").outerHTML = ""; else {
		document.getElementById("TICKER_DIV").scrollLeft = TICKER_RIGHTTOLEFT ? document.getElementById("TICKER_DIV").scrollWidth - document.getElementById("TICKER_DIV").offsetWidth : 0;
		document.getElementById("TICKER_BODY").innerHTML = TICKER_CONTENT;
		document.getElementById("TICKER_DIV").style.display="inline-block";
		TICKER_tick();
	}
}

function TICKER_tick() {
	if(!TICKER_PAUSED) document.getElementById("TICKER_DIV").scrollLeft += TICKER_SPEED * (TICKER_RIGHTTOLEFT ? -1 : 1);
	if(TICKER_RIGHTTOLEFT && document.getElementById("TICKER_DIV").scrollLeft <= 0) document.getElementById("TICKER_DIV").scrollLeft = document.getElementById("TICKER_DIV").scrollWidth - document.getElementById("TICKER_DIV").offsetWidth;
	if(!TICKER_RIGHTTOLEFT && document.getElementById("TICKER_DIV").scrollLeft >= document.getElementById("TICKER_DIV").scrollWidth - document.getElementById("TICKER_DIV").offsetWidth) document.getElementById("TICKER_DIV").scrollLeft = 0;
	window.setTimeout("TICKER_tick()", 30);
}

