var ic = 5; // Number of alternative images 
var xoxo = new Array(ic); 
// Array to hold filenames xoxo[0] = "http://www.yoursite.com/graphic1.gif"; 
xoxo[0] = "images/midimg.jpg";
xoxo[1] = "images/midimg1.jpg"; 
xoxo[2] = "images/midimg2.jpg";
xoxo[3] = "images/midimg3.jpg"; 
xoxo[4] = "images/midimg4.jpg";

function pickRandom(range) 
{ if (Math.random) return Math.round(Math.random() * (range-1)); else { var now 
= new Date(); return (now.getTime() / 500) % range; } } 
var choice = pickRandom(ic); // --> 