/***********************************************
* 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(module_id,delayb4scroll, marqueespeed, pauseit){
if(!cross_marquee.ar)
cross_marquee.ar=[];
this.module_id=module_id
//cross_marquee.ar[this.mqid=cross_marquee.ar.length]=this;
cross_marquee.ar[this.module_id]=this;
this.delayb4scroll=delayb4scroll;//(Math.round((Math.random()*delayb4scroll)+1));
this.marqueespeed=marqueespeed;//(Math.round((Math.random()*marqueespeed)+1));
this.pauseit=pauseit;


this.copyspeed=this.marqueespeed
this.pausespeed=(this.pauseit==0)? this.copyspeed: 0;
this.module_id=module_id
this.actualheight=''
document.write('<div id="marqueecontainer_'+this.module_id+'"  style="position:relative;padding: 2px; padding-left: 4px;width:100%; height:150px; border:1px dashed #BB8888; overflow:hidden;" onMouseover="cross_marquee.ar['+this.module_id+'].copyspeed=cross_marquee.ar['+this.module_id+'].pausespeed" onMouseout="cross_marquee.ar['+this.module_id+'].copyspeed=cross_marquee.ar['+this.module_id+'].marqueespeed">\n'+
'<div id="vmarquee_'+this.module_id+'"  style="position: absolute; width: 98%;">')

this.cross_marquee=document.getElementById("vmarquee_"+this.module_id)
this.cross_marquee.style.top=0
this.marqueeheight=document.getElementById("marqueecontainer_"+this.module_id).offsetHeight
var cacheobj=this;
setTimeout(function(){cacheobj.lefttime=setInterval("cross_marquee.ar["+cacheobj.module_id+"].scrollmarquee()",40)}, 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)+8+"px"
}

