Scroll down the page automatically until the user scrolls up
<p>I got this simple script to scroll down the page</p>

<pre><code>function scrollDown() {
     window.scrollBy(0,50); // horizontal and vertical scroll increments
}

scrolldelay = setTimeout('scrollDown()',100); // scrolls every 100 milliseconds
</code></pre>

<p>Now I wish to intercept when the user scrolls up himself to stop the setTimeout with a</p>

<pre><code>clearTimeout(scrolldelay);
</code></pre>

<p>Any idea? <strong>Preferable with pure js</strong> </p>

<p>An alternative to accepted answer is here: <a href="http://jsfiddle.net/Vy8tW/" rel="nofollow">http://jsfiddle.net/Vy8tW/</a></p>
