var tickerIndex = 0; var tickers = new Array(); 
function AllTickers(fn) {numTickers = tickers.length; for (i=0;i<numTickers;i++) { eval('tickers[i].'+fn+'()');} }
function Ticker(e,fn) {id = e.id; numTickers=tickers.length; for (i=0;i<numTickers;i++) { if (tickers[i].name==id) { eval('tickers[i].'+fn+'()'); break;}}}
function ticker(name,index) {this.name=name;this.content=null;this.currentMsg=0;this.scrolling=true;this.persist=true;this.delay=3500;this.elem=null;this.duration=0;this.timer=null;this.setContent=tickerSetContent;this.start=tickerStart;this.update=tickerUpdate;this.pause=tickerPause;this.resume=tickerResume;this.save=tickerSaveMsg;this.loadLastMsg=tickerLoadLastMsg;this.index=tickerIndex++;tickers[this.index]=this;}
function tickerSetContent(a) {this.content=a;}
function tickerStart() {this.elem = document.getElementById ? document.getElementById(this.name): eval('document.all.'+this.name);if (GetCookie("lastmsgnum"+this.index) != "") this.loadLastMsg(); this.timer=setTimeout('tickers['+this.index+'].update()',100);}
function setDelay(d) {this.delay = d;} 
function tickerUpdate() {if (this.elem.filters && this.elem.filters.length > 0) this.elem.filters[0].Apply();this.elem.innerHTML=this.content[this.currentMsg]; if (this.elem.filters && this.elem.filters.length > 0) this.elem.filters[0].Play();this.currentMsg=(this.currentMsg == this.content.length-1) ? this.currentMsg=0 : this.currentMsg+1; this.duration = this.delay; this.duration += (this.elem.filters && this.elem.filters.length > 0) ? this.elem.filters[0].duration * 1000 : 0; this.timer = setTimeout( 'tickers[' + this.index + '].update();', this.duration );}
function tickerPause() {clearTimeout(this.timer);}
function tickerResume() {this.timer=setTimeout('tickers['+this.index+'].update()',this.duration/2);}
function tickerSaveMsg() {document.cookie="lastmsgnum"+this.index+"="+this.currentMsg;}
function tickerLoadLastMsg() {this.currentMsg=parseInt(GetCookie("lastmsgnum"+this.index));this.currentMsg=(this.currentMsg==0) ? this.content.length-1:this.currentMsg-1;}
function GetCookie(Name) {var search = Name + "="; var returnvalue = ""; if (document.cookie.length > 0) {offset=document.cookie.indexOf(search);if(offset!=-1){offset+=search.length;end=document.cookie.indexOf(";",offset); if(end==-1) end=document.cookie.length; returnvalue=unescape(document.cookie.substring(offset,end));}} return returnvalue;}
