This peice of code I have found useful for
adding to websites that want a banner or images rotated. This
script has the added functionality that different images can
link to different websites or pages, so if you want your site
to appear like it has a little bit of functionality, and would
like to do it with a random image, then you can use this script.
On page load, this script chooses a random image and then
it uses that image on the page. The image won't rotate or
anything, it will just make it look like your website has
changed a little bit more often as the experience can be a
little more unique this way.
This code is really easy to use. All you have to do is paste
the code anywhere on a page where you want to use it and then
customize the image names and the links.
If you like these code samples, please link back to here!