In the DIV below, the doScroll method is invoked at one-second intervals. The parameter down is passed to the doScroll method to scroll the text one line at a time.
The doScroll method works the same on any object that has scroll bars. Setting the CSS property overflow to the value scroll forces scroll bars to appear on any object. As a result, the doScroll method can be used to control scroll behavior on this division.