This goes in your <head>...</head> <script type="text/javascript"> <!-- function makeArray(){ this.length = makeArray.arguments.length for (var i = 0; i < this.length; i++) this[i + 1] = makeArray.arguments[i] } function randNum (num) { var now = new Date(); var rand = Math.round(num * Math.cos(now.getTime())); if (rand < 0) rand = - rand; if (rand == 0) rand++; return rand; } --> </script> Put this piece of code into your web page at the place where you'd like the image tag to appear: What it does is "roll the dice", and then decide which of (in this case) three images to write out into the 'source code' of your document. <script type="text/javascript"> |