Added the new function to support a slide-show mode.