Building Wraparound Slideshows
Script 4.16. This HTML page creates a slideshow.
Script 4.17. This script builds a slideshow that the user can click through using links to control movement forward and back.
This script builds a slideshow that wraps aroundthat is, if you go past the end of the list you go back to the beginning and vice versa. Figure 4.14 shows the new slideshow.
Figure 4.14. Clicking the Previous or Next link calls the processPrevious() or processNext() function, respectively.