var Marquee=Class.create();Marquee.prototype={initialize:function(A,B,C){this.container=$(A);this.element=$(B);this.fps=C;this.scrolling=true;if(!this.container||!this.element||isNaN(this.fps)||(C<=0)){return false}this.stopScrolling=function(){this.scrolling=false}.bind(this);this.resumeScrolling=function(){this.scrolling=true}.bind(this);this.pe=new PeriodicalExecuter(this.scroll.bind(this),1/C);Event.observe(this.container,"mouseover",this.stopScrolling);Event.observe(this.container,"mouseout",this.resumeScrolling);Event.observe(window,"unload",this.deinitialize.bind(this))},scroll:function(A){if(!this.scrolling){return }var B=parseInt(this.element.getStyle("width"));var C=parseInt(this.element.getStyle("marginLeft"))-4;this.element.setStyle({marginLeft:(B+C>0?C:parseInt(this.container.getWidth()))+"px"})},deinitialize:function(){this.scrolling=false;if(this.pe){this.pe.stop()}Event.stopObserving(this.container,"mouseover",this.stopScrolling);Event.stopObserving(this.container,"mouseout",this.resumeScrolling);delete this.container;delete this.element;delete this.fps;delete this.pe;delete this.scrolling;delete this.stopScrolling;delete this.resumeScrolling}};