var isATS=false;var asint;var cscroll;jQuery(".btn-autoscroll").click(function(){if(!isATS){lv=jQuery('input[name=level]:checked').val();jQuery("input[name=level2][value="+lv+"]").attr('checked','checked');if(lv==1){astart=1;}else if(lv==2){astart=1.2;}else if(lv==3){astart=1.5;}else if(lv==4){astart=2.5;}else if(lv==5){astart=3.5;} asint=window.setInterval(autoscroll,200/astart);jQuery("#speed").html("1x");jQuery("div#autoscroll").stop();jQuery("div#x").animate({"width":"53px"},200,'easeInOutQuint');jQuery("div#autoscroll").animate({"right":"10px"},300,'easeInOutQuint');jQuery("a#autoscroll em").css({"background-position":"left 27px"});jQuery('.mb-scroll').text('Stop');jQuery('.lg-scroll').text('Stop');jQuery('.end-scroll').show();}else{astart=0;clearInterval(asint);jQuery("#speed").html(0);jQuery("div#autoscroll").stop();jQuery("div#x").css({"width":"0px"});jQuery("div#autoscroll").css({"right":"-35px"});jQuery("a#autoscroll em").css({"background-position":"left top"});jQuery('.mb-scroll').text('Auto Scroll');jQuery('.lg-scroll').text('Auto Scroll');jQuery('.end-scroll').hide();} isATS=!isATS;});jQuery('input[name=level]').click(function(){lv=jQuery('input[name=level]:checked').val();jQuery("input[name=level2][value="+lv+"]").attr('checked','checked');if(lv==1){astart=1;}else if(lv==2){astart=1.2;}else if(lv==3){astart=1.5;}else if(lv==4){astart=2.5;}else if(lv==5){astart=3.5;} clearInterval(asint);jQuery("#speed").html(0);asint=window.setInterval(autoscroll,200/astart);jQuery("#speed").html("1x");jQuery("div#autoscroll").stop();jQuery("div#x").animate({"width":"53px"},200,'easeInOutQuint');jQuery("div#autoscroll").animate({"right":"10px"},300,'easeInOutQuint');jQuery("a#autoscroll em").css({"background-position":"left 27px"});jQuery('.mb-scroll').text('Stop');jQuery('.lg-scroll').text('Stop Scroll');jQuery('.end-scroll').show();isATS=true;});jQuery('input[name=level2]').click(function(){lv=jQuery('input[name=level2]:checked').val();jQuery("input[name=level][value="+lv+"]").attr('checked','checked');if(lv==1){astart=1;}else if(lv==2){astart=1.2;}else if(lv==3){astart=1.5;}else if(lv==4){astart=2.5;}else if(lv==5){astart=3.5;} clearInterval(asint);jQuery("#speed").html(0);asint=window.setInterval(autoscroll,200/astart);jQuery("#speed").html("1x");jQuery("div#autoscroll").stop();jQuery("div#x").animate({"width":"53px"},200,'easeInOutQuint');jQuery("div#autoscroll").animate({"right":"10px"},300,'easeInOutQuint');jQuery("a#autoscroll em").css({"background-position":"left 27px"});jQuery('.mb-scroll').text('Stop');jQuery('.lg-scroll').text('Stop Scroll');jQuery('.end-scroll').show();isATS=true;});jQuery("div#autoscroll a").click(function(){clearInterval(asint);var id=jQuery(this).attr('id');if(id=="de"){astart--;}else{astart++;} if(astart<=0){astart=0;}else if(astart>5){astart=5;} var sdatsp=astart==0?"0":astart+"x";if(astart!=0){asint=window.setInterval(autoscroll,200/astart);} jQuery("#speed").html(sdatsp);return false;});jQuery("div#autoscroll").css({"right":"-35px"});function getScrollTop(){if(typeof pageYOffset!='undefined'){return pageYOffset;}else{var B=document.body;var D=document.documentElement;D=(D.clientHeight)?D:B;return D.scrollTop;}} function autoscroll(){cscroll=getScrollTop()+1;jQuery('body,html').scrollTop(cscroll);}