var Marquee=function(){this.ID=document.getElementById(arguments[0]);this.Direction=arguments[1];this.Step=arguments[2];this.BakStep=arguments[2];this.Width=arguments[3];this.HalfWidth=Math.round(arguments[3]/2);this.Height=arguments[4];this.Timer=arguments[5];this.DelayTime=arguments[6];this.WaitTime=arguments[7];if(arguments[8]||arguments[8]==0){this.ScrollStep=arguments[8]}else{this.ScrollStep=this.Direction>1?this.Width:this.Height}this.Correct=0;this.CTL=0;this.StartID=0;this.Stop=0;this.MouseOver=0;this.ID.style.overflow="hidden";this.ID.style.overflowX="hidden";this.ID.style.overflowY="hidden";this.ID.noWrap=true;this.ID.style.width=this.Width+"px";this.ID.style.height=this.Height+"px";this.ClientScroll=this.Direction>1?parseInt(this.ID.scrollWidth):parseInt(this.ID.scrollHeight);this.ID.innerHTML+=this.ID.innerHTML;this.IsNotOpera=(navigator.userAgent.toLowerCase().indexOf("opera")==-1);if(arguments.length>=8){this.Start(this,this.Timer,this.DelayTime,this.WaitTime)}};Marquee.prototype.Start=function(c,d,a,b){c.StartID=function(){c.Scroll()};c.Continue=function(){if(c.MouseOver==1){setTimeout(c.Continue,a)}else{clearInterval(c.TimerID);c.CTL=0;c.Stop=0;c.TimerID=setInterval(c.StartID,d)}};c.Pause=function(){c.Stop=1;clearInterval(c.TimerID);setTimeout(c.Continue,a)};c.Begin=function(){c.ID.onmousemove=function(e){if(c.ScrollStep==0&&c.Direction>1){var f=null;if(window.event){f=window.event;if(c.IsNotOpera){c.EventLeft=f.srcElement.id==c.ID.id?parseInt(f.offsetX)-parseInt(c.ID.scrollLeft):parseInt(f.srcElement.offsetLeft)-parseInt(c.ID.scrollLeft)+parseInt(f.offsetX)}else{c.ScrollStep=null;return}}else{f=e;c.EventLeft=parseInt(f.layerX)-parseInt(c.ID.scrollLeft)}c.Direction=c.EventLeft>c.HalfWidth?3:2;c.AbsCenter=Math.abs(c.HalfWidth-c.EventLeft);c.Step=Math.round(c.AbsCenter*(c.BakStep*2)/c.HalfWidth)}};c.ID.onmouseover=function(){if(c.ScrollStep==0){return}c.MouseOver=1;clearInterval(c.TimerID)};c.ID.onmouseout=function(){if(c.ScrollStep==0){if(c.Step==0){c.Step=1}return}c.MouseOver=0;if(c.Stop==0){clearInterval(c.TimerID);c.TimerID=setInterval(c.StartID,d)}};c.TimerID=setInterval(c.StartID,d)};setTimeout(c.Begin,b)};Marquee.prototype.Scroll=function(){if(this.Correct==0&&this.CTL>this.ClientScroll){this.ClientScroll=(this.Direction>1)?Math.round(parseInt(this.ID.scrollWidth)/2):Math.round(parseInt(this.ID.scrollHeight)/2);this.Correct=1}switch(this.Direction){case 0:this.CTL+=this.Step;if(this.CTL>=this.ScrollStep&&this.DelayTime>0){this.ID.scrollTop+=(this.ScrollStep+this.Step-this.CTL);this.Pause();return}else{if(this.ID.scrollTop>=this.ClientScroll){this.ID.scrollTop-=this.ClientScroll}this.ID.scrollTop+=this.Step}break;case 1:this.CTL+=this.Step;if(this.CTL>=this.ScrollStep&&this.DelayTime>0){this.ID.scrollTop-=(this.ScrollStep+this.Step-this.CTL);this.Pause();return}else{if(this.ID.scrollTop<=0){this.ID.scrollTop+=this.ClientScroll}this.ID.scrollTop-=this.Step}break;case 2:this.CTL+=this.Step;if(this.CTL>=this.ScrollStep&&this.DelayTime>0){this.ID.scrollLeft+=(this.ScrollStep+this.Step-this.CTL);this.Pause();return}else{if(this.ID.scrollLeft>=this.ClientScroll){this.ID.scrollLeft-=this.ClientScroll}this.ID.scrollLeft+=this.Step}break;case 3:this.CTL+=this.Step;if(this.CTL>=this.ScrollStep&&this.DelayTime>0){this.ID.scrollLeft-=(this.ScrollStep+this.Step-this.CTL);this.Pause();return}else{if(this.ID.scrollLeft<=0){this.ID.scrollLeft+=this.ClientScroll}this.ID.scrollLeft-=this.Step}break;this.ID.scrollTop+="px";this.ID.scrollLeft+="px"}};