BgSlide is a JavaScript library which turns the background of a webpage into a slideshow, displaying random images with nice transition effects.
Written using the usual Prototype + Scriptaculous combo.
Have a look at the source code and comments in the demo page for implementation details, it should be easy to add to your own page.
Latest Version
v1.50, released on 17/10/2009