function simplescroll(c,f,g,h){this.config=h?h:{start_delay:0,speed:50,delay:3000,scrollItemCount:1,movecount:1};this.container=document.getElementById(c);this.pause=false;this.scrollType=f;this.addType=g;var j=this;this.init=function(){j.scrollTimeId=null;setTimeout(j.start,j.config.start_delay)}this.start=function(){var d=j.container;var a=d.getElementsByTagName("tr")[0];if(a==null)return;var b=a.offsetHeight;if(d.scrollHeight-d.offsetHeight>=b)j.scrollTimeId=setInterval(j.scroll,j.config.speed)};this.scroll=function(){if(j.pause)return;var d=j.container;d.scrollTop+=2;var a=d.getElementsByTagName("tr")[0];if(a==null)return;var b=a.offsetHeight;if(d.scrollTop%(b*j.config.scrollItemCount)<=1){if(j.config.movecount!=undefined)for(var i=0;i<j.config.movecount;i++){var c=d.getElementsByTagName("tbody")[0];var e=c.getElementsByTagName("tr")[0];c.removeChild(e);c.appendChild(e)}else for(var i=0;i<j.config.scrollItemCount;i++){var c=d.getElementsByTagName("tbody")[0];var e=c.getElementsByTagName("tr")[0];c.removeChild(e);c.appendChild(e)}d.scrollTop=0;clearInterval(j.scrollTimeId);setTimeout(j.start,j.config.delay)}}this.container.onmouseover=function(){j.pause=true}this.container.onmouseout=function(){j.pause=false}}
