I'm trying to get random images to display onto four different cells with their corresponding links in place. All that's happenning is one random image is chosen and displayed throughout. Is there a way to pull 4 images from the given list and display them randomly instead? Thanks a bunch for any help provided.
<script language="JavaScript">
<!--
/*
Random Image Link Script- By JavaScript Kit(http://www.javascriptkit.com)
Over 200+ free JavaScripts here!
Updated: 00/04/25
*/
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="http://dl.dropbox.com/u/5739741/jam%20mascot/Main%20Page%20Buttons/allstar%20classic.png"
myimages[2]="http://dl.dropbox.com/u/5739741/jam%20mascot/Main%20Page%20Buttons/allstar%20clinic.png"
myimages[3]="http://dl.dropbox.com/u/5739741/jam%20mascot/Main%20Page%20Buttons/hopla.png"
myimages[4]="http://dl.dropbox.com/u/5739741/jam%20mascot/Main%20Page%20Buttons/jam%20night.png"
myimages[5]="http://dl.dropbox.com/u/5739741/jam%20mascot/Main%20Page%20Buttons/jamcamp.png"
myimages[6]="http://dl.dropbox.com/u/5739741/jam%20mascot/Main%20Page%20Buttons/mailing%20list.png"
//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]="http://www.javascriptkit.com"
imagelinks[2]="http://www.netscape.com"
imagelinks[3]="http://www.microsoft.com"
imagelinks[4]="http://www.dynamicdrive.com"
imagelinks[5]="http://www.freewarejava.com"
imagelinks[6]="http://www.cnn.com"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<table><tr><td><a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a></td><td><a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a></td><td><a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a></td><td><a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a></td></tr></table>')
}
random_imglink()
//-->
</script>