var dY=0; document.onmousewheel = function(e){ dY+=e.deltaY; if(dY<0)dY=0; if(dY>200){ scroll(0,200); dY=200;} else scroll(0,dY); }