if(typeof(Action)==="undefined"||!Action){var Action={}}Action.Scroll=function(a){a=a||{};this.renderId=a.renderId;this.speed=a.speed||30;this.cls=a.cls;this.height=a.height;this.timmer=null;if(a.cls){$("#"+this.renderId).wrap("<div class='"+this.cls+"'></div>")}else{$("#"+this.renderId).wrap("<div style='height:"+this.height+"px;overflow:hidden;'></div>")}$("#"+this.renderId).css("overflow","auto")};Action.Scroll.prototype.start=function(){var f=this;if(f.timmer){clearInterval(f.timmer);f.timmer=null}var e=$("#"+this.renderId);var d=$("#"+this.renderId).parent();d.unbind("mouseover");d.unbind("mouseout");var b=e.height();if(b<=d.height()){return}var c=e.html();var g=0;e.append(c);var a=function(){g=g+1;if(g>=b){g=0}d.scrollTop(g)};f.timmer=window.setInterval(a,f.speed);d.mouseover(function(){clearInterval(f.timmer);f.timmer=null});d.mouseout(function(){if(f.timmer==null){f.timmer=window.setInterval(a,f.speed)}})};Action.DownUp=function(a){a=a||{};Action.Scroll.call(this,a)};Action.DownUp.prototype.down=function(){var f=this;var e=$("#"+this.renderId);var d=$("#"+this.renderId).parent();var c=e.height();var a=d.height();if(c<=a||d.scrollTop()<=0){return}var b=function(){if(d.scrollTop()<=0){f.stop();return}d.scrollTop(d.scrollTop()-1)};f.timmer=window.setInterval(b,f.speed)};Action.DownUp.prototype.up=function(){var f=this;var e=$("#"+this.renderId);var d=$("#"+this.renderId).parent();var c=e.height();var a=d.height();if(c<=a||(d.scrollTop()+a)>=c){return}var b=function(){if((d.scrollTop()+a)>=c){f.stop();return}d.scrollTop(d.scrollTop()+1)};f.timmer=window.setInterval(b,f.speed)};Action.DownUp.prototype.stop=function(){var a=this;if(a.timmer){clearInterval(a.timmer);a.timmer=null}};
