
// WebTicker by Mioplanet
// www.mioplanet.com

TICKER_photos_CONTENT = document.getElementById("TICKER_photos").innerHTML;
 
TICKER_photos_RIGHTTOLEFT = false;
TICKER_photos_SPEED = 1;
TICKER_photos_STYLE = "font-family:Arial; font-size:12px; color:#444444";
TICKER_photos_PAUSED = false;

ticker_photos_start();

function ticker_photos_start() {
	var ticker_photosSupported = false;
	TICKER_photos_WIDTH = document.getElementById("TICKER_photos").style.width;
	var img = "<img src=ticker_space.gif width="+TICKER_photos_WIDTH+" height=0>";

	// Firefox
	if (navigator.userAgent.indexOf("Firefox")!=-1 || navigator.userAgent.indexOf("Safari")!=-1) {
		document.getElementById("TICKER_photos").innerHTML = "<TABLE  cellspacing='0' cellpadding='0' width='100%'><TR><TD nowrap='nowrap'>"+img+"<SPAN style='"+TICKER_photos_STYLE+"' ID='TICKER_photos_BODY' width='100%'>&nbsp;</SPAN>"+img+"</TD></TR></TABLE>";
		ticker_photosSupported = true;
	}
	// IE
	if (navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1) {
		document.getElementById("TICKER_photos").innerHTML = "<DIV nowrap='nowrap' style='width:100%;'>"+img+"<SPAN style='"+TICKER_photos_STYLE+"' ID='TICKER_photos_BODY' width='100%'></SPAN>"+img+"</DIV>";
		ticker_photosSupported = true;
	}
	if(!ticker_photosSupported) document.getElementById("TICKER_photos").outerHTML = ""; else {
		document.getElementById("TICKER_photos").scrollLeft = TICKER_photos_RIGHTTOLEFT ? document.getElementById("TICKER_photos").scrollWidth - document.getElementById("TICKER_photos").offsetWidth : 0;
		document.getElementById("TICKER_photos_BODY").innerHTML = TICKER_photos_CONTENT;
		document.getElementById("TICKER_photos").style.display="block";
		TICKER_photos_tick();
	}
}

function TICKER_photos_tick() {
	if(!TICKER_photos_PAUSED) document.getElementById("TICKER_photos").scrollLeft += TICKER_photos_SPEED * (TICKER_photos_RIGHTTOLEFT ? -1 : 1);
	if(TICKER_photos_RIGHTTOLEFT && document.getElementById("TICKER_photos").scrollLeft <= 0) document.getElementById("TICKER_photos").scrollLeft = document.getElementById("TICKER_photos").scrollWidth - document.getElementById("TICKER_photos").offsetWidth;
	if(!TICKER_photos_RIGHTTOLEFT && document.getElementById("TICKER_photos").scrollLeft >= document.getElementById("TICKER_photos").scrollWidth - document.getElementById("TICKER_photos").offsetWidth) document.getElementById("TICKER_photos").scrollLeft = 0;
	window.setTimeout("TICKER_photos_tick()", 1);
}

