Hello all,

I've been searching the net for a while, for the easiest multiple random images code and found it. But now I've also been searching for a script to link all single images to a different link (link z1.jpg to home.html, z2.jpg to contact.html, x1 to banana.html, etc.).

This is the script I'm using:
<script language="javascript">
var gallery = new Array();
gallery[0] = new Array("z1.jpg","z2.jpg","z3.jpg","z4.jpg","z5.jpg");
gallery[1] = new Array("y1.jpg","y2.jpg","y3.jpg","y4.jpg","y5.jpg");
gallery[2] = new Array("x1.jpg","x2.jpg","x3.jpg","x4.jpg","x5.jpg", "x6.jpg");
gallery[3] = new Array("w1.jpg","w2.jpg","w3.jpg","w4.jpg","w5.jpg");
gallery[4] = new Array("v1.jpg","v2.jpg","v3.jpg","v4.jpg","v5.jpg");

function pickImageFrom(whichGallery)
var idx = Math.floor(Math.random() * gallery[whichGallery].length);
document.write('<img src="images/' + gallery[whichGallery][idx] + '">');
This is what i place in where the image schould be placed:
<script language="javascript">pickImageFrom(0);</script>
Please help!