OK so I have a new problem I got the script to work, which is:
// Set up the image files to be used.
var theImages = [
var link = [
var r = Math.floor(Math.random() * theImages.length);
document.write('<A HREF="' + link[r] + '"><img width="150" height="100" src="reports/'+theImages[r] +'" border="1" ></a>');
However sometimes the images are repeated, this shows up in four different cells, I actually use quite a few more images and links, just cut them off to save space. Is there a line of code I can change to stop the random repetition, it doesn't happen often but it looks stupid when it does.