
/***********************************************
* Modified to be able to use multiple marquees - StaffIT/DJO.
*
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
var delayb4scroll = 2500;

function scroller (outterContainerId,innerContainerId,scrollAmt,pauseit) {
	this.outterContainerId = outterContainerId;
	this.innerContainerId = innerContainerId;
	this.marqueespeed = scrollAmt;
	this.copyspeed=scrollAmt;
	this.pausespeed=(pauseit==0)? copyspeed: 0;
	this.actualheight='';
	this.cross_marquee = null;
	this.actualHeight = 0;
	this.marqueeheight = 0;
}

function scrollmarquee(o){
	if (parseInt(o.cross_marquee.style.top)>(o.actualheight*(-1)+8))
		o.cross_marquee.style.top=parseInt(o.cross_marquee.style.top)-o.copyspeed+"px";
	else
		o.cross_marquee.style.top=parseInt(o.marqueeheight)+8+"px";
}

function initializemarquee(o){
	o.cross_marquee = document.getElementById(o.innerContainerId);
	o.cross_marquee.style.top=0;
	o.marqueeheight=document.getElementById(o.outterContainerId).offsetHeight;
	o.actualheight=o.cross_marquee.offsetHeight;
	if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
		o.cross_marquee.style.height=o.marqueeheight+"px";
		o.cross_marquee.style.overflow="scroll";
	return;
	}
}

function scrollmarquees() {
	scrollmarquee(newsScroller);
	scrollmarquee(aeScroller);
	scrollmarquee(projScroller);
}

var newsScroller;
var aeScroller;
function initializemarquees() {
	newsScroller = new scroller("newsMarquee","newsInner",2,1);
	initializemarquee(newsScroller);
	aeScroller = new scroller("aeOutter","aeInner",3,1);
	initializemarquee(aeScroller);
	projScroller = new scroller("projOutter","projInner",1,1);
	initializemarquee(projScroller);

	setTimeout('lefttime=setInterval("scrollmarquees()",100)', delayb4scroll);
}


if (window.addEventListener)
window.addEventListener("load", initializemarquees, false);
else if (window.attachEvent)
window.attachEvent("onload", initializemarquees);
else if (document.getElementById)
window.onload=initializemarquees;
