Hey,
The code was a little convaluted for me to even look at. Instead, I'll just give an example of a random image. Here's what I'd do:
Code:
imageArray = new Array("images/image1.gif","image2.jpg","image3.gif");
function randImage(image){
ran=Math.floor(Math.random()*imageArray.length);
document.images[image].src = imageArray[ran];
}
randImage('tv1');
randImage('tv2');
randImage('tv3');
and you just do the array for your iamges and use that function, and it should work. There's no reason to load all the images.
aDog
Bookmarks