
// Type the number of images you are rotating.
NumberOfImagesToRotate = 3;
// Specify the first and last part of the image tag. 
FirstPart = '<img src="../aa-imgs/inxpic0';
LastPart = '.jpg" height="247" width="591">';
function printImage() {
var r = Math.ceil(Math.random() * NumberOfImagesToRotate);
document.write(FirstPart + r + LastPart);
}

var theImages = new Array() // do not change this
theImages[0] = '../aa-imgs/hdpic01.jpg'
theImages[1] = '../aa-imgs/hdpic02.jpg'
theImages[2] = '../aa-imgs/hdpic03.jpg'

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));
function showImage(myString){
alert(myString);
document.write('<table width="760" height="105" border="0" align="center" cellpadding="0" cellspacing="0" background="'+theImages[whichImage]+'">')
}
