

/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
***********************************************/

var MAry=[];
//        id,  speed, start delay
MAry[0]=['tst',35,    1000];
MAry[1]=['vmarquee',80];

////NO NEED TO EDIT BELOW THIS LINE////////////


function initializemarquee(){
 for (var z0=0;z0<MAry.length;z0++){
  var cm=document.getElementById(MAry[z0][0]);
  if (cm) cm.parentNode.marquee=new marquee(cm,MAry[z0]);
 }
}

function marquee(cm,ary){
 this.to=null;
 this.spd=ary[1]||50;
 cm.style.top='0px';
 this.max=-cm.offsetHeight;
 this.objs=[[cm,0],[cm.cloneNode(true),-this.max]];
 cm.parentNode.appendChild(this.objs[1][0]);
 for (var z0=0;z0<this.objs.length;z0++){
  this.objs[z0][0].style.top=this.objs[z0][1]+'px';
 }
 if (ary[2]) setTimeout(function(oop){return function(){oop.start();}}(this),ary[2]);
}

marquee.prototype.start=function(){
 this.stop();
 for (var z0=0;z0<this.objs.length;z0++){
  this.objs[z0][1]--;
  this.objs[z0][0].style.top=this.objs[z0][1]+'px';
  if (this.objs[z0][1]==this.max) this.objs[z0][1]=-this.max;
 }
 this.to=setTimeout(function(oop){return function(){oop.start();}}(this),this.spd);
}

marquee.prototype.stop=function(){
 clearTimeout(this.to);
}
if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee




