the code
<script language="JavaScript" type="text/javascript">
<!--
// original code by jovino
// © 2001 jovino
// all rights reserved
var masterArray=new Array(item1,item2,item3,etcetera);
var theChosenOne=masterArray[Math.floor(Math.random()*masterArray.length)]
// -->
</script>
the instructions
Customization of this script is prety easy actually.
All you really have to do is change the masterArray list (item1,item2,item3,etcetera) to an actual list of objects.
These can be variables, numbers, strings or even arrays.
Once you have the list populated with your new data, what you decide to do with it is up to you.
You can simply output it to the screen with a document.write() method or you can use it to trigger other actions.
Your output code will look something like this:
document.write('<img src="' + theChosenOne + '">');
It is that simple, but if you need any additional help making this code work for your project, please feel free to and I will be more than happy to give you a hand.