
/***********************************************
* Object Oriented 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.
* Modified in http://www.dynamicdrive.com/forums by jscheuer1
* For multiple use and functionality in Opera and NS 7
***********************************************/

//////// NO NEED TO EDIT ////////////
function cross_marquee(delayb4scroll, marqueespeed, pauseit){
  if(!cross_marquee.ar)
  cross_marquee.ar=[];
  cross_marquee.ar[this.mqid=cross_marquee.ar.length]=this;
  this.delayb4scroll=delayb4scroll;
  this.marqueespeed=marqueespeed;
  this.pauseit=pauseit;

  this.copyspeed=this.marqueespeed
  this.pausespeed=(this.pauseit==0)? this.copyspeed: 0;
  this.actualheight=''
  document.write('<div class="scroll" id="marqueecontainer'+this.mqid+'" onMouseover="cross_marquee.ar['+this.mqid+'].copyspeed=cross_marquee.ar['+this.mqid+'].pausespeed" onMouseout="cross_marquee.ar['+this.mqid+'].copyspeed=cross_marquee.ar['+this.mqid+'].marqueespeed">\n'+
  '<div id="vmarquee'+this.mqid+'" style="position: absolute; width: 99%;">')

  this.cross_marquee=document.getElementById("vmarquee"+this.mqid)
  this.cross_marquee.style.top=0
  this.marqueeheight=document.getElementById("marqueecontainer"+this.mqid).offsetHeight
  var cacheobj=this;
  setTimeout(function(){cacheobj.lefttime=setInterval("cross_marquee.ar["+cacheobj.mqid+"].scrollmarquee()",30)}, cacheobj.delayb4scroll)
}

cross_marquee.prototype.scrollmarquee=function(){
  this.actualheight=this.cross_marquee.offsetHeight
  if (parseInt(this.cross_marquee.style.top)>(this.actualheight*(-1)-28))
    this.cross_marquee.style.top=parseInt(this.cross_marquee.style.top)-this.copyspeed+"px"
  else
    this.cross_marquee.style.top=parseInt(this.marqueeheight)+5+"px"
}


  