var delayOnStart = 0;
var tickerSpeed = 1;
var pauseOnMouseOver = true;

/** TICKER CODE STARTS HERE **/

var copyspeed = [];
copyspeed[0] = tickerSpeed;
copyspeed[1] = tickerSpeed;
var pausespeed = (pauseOnMouseOver==0) ? copyspeed : 0;
var actualheight = [];
var cross_marquee=[];
var marqueeheight=[];

function scrollTicker(){
	for (var nr=0;nr<cross_marquee.length;nr++) {
	if (parseInt(cross_marquee[nr].style.top)>(actualheight[nr]*(-1)+8)/2) 
		cross_marquee[nr].style.top=parseInt(cross_marquee[nr].style.top)-copyspeed[nr]+"px"
		
	else {
		//cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
		cross_marquee[nr].style.top=0+"px"
	}
	}
}

function initializemarquee(ns){

	for (var nr=0;nr<ns;nr++) {
	cross_marquee[nr]=document.getElementById("tickerID"+nr)
	//cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
	//marqueeheight[nr]=document.getElementById("tickerContent"+nr).offsetHeight
	marqueeheight[nr]=0;
	
	cross_marquee[nr].style.top=parseInt(marqueeheight[nr])+8+"px"
	
	actualheight[nr]=cross_marquee[nr].offsetHeight
	
	if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
		cross_marquee[nr].style.height=marqueeheight[nr]+"px"
		cross_marquee[nr].style.overflow="scroll"
		return
	}
	}
	setTimeout('lefttime=setInterval("scrollTicker()",75)', delayOnStart)
}



//if (window.addEventListener)
//	window.addEventListener("load", initializemarquee, false)
//else if (window.attachEvent)
//	window.attachEvent("onload", initializemarquee)
//else if (document.getElementById)
//	window.onload=initializemarquee

