Kod:
<script language="JavaScript">
<!--
function showImage()
{
theImages = new Array
theImages[0] = '100.jpg'
theImages[1] = '200.jpg'
theImages[2] = '300.jpg'
theImages[3] = '400.jpg'
theImages[4] = '500.jpg'
// ======================================
// do not change anything below this line
// ======================================
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
document.write(theImages[whichImage]);
}
//-->
</script>