// Set up the image files to be used.
var theImages = new Array() 
theImages[0] = 'images/pics1/img01.jpg'
theImages[1] = 'images/pics1/img02.jpg'
theImages[2] = 'images/pics1/img03.jpg'
theImages[3] = 'images/pics1/img04.jpg'
theImages[4] = 'images/pics1/img05.jpg'
theImages[5] = 'images/pics1/img06.jpg'
theImages[6] = 'images/pics1/img07.jpg'

var theImages2 = new Array() 
theImages2[0] = 'images/pics2/img01.jpg'
theImages2[1] = 'images/pics2/img05.jpg'
theImages2[2] = 'images/pics2/img06.jpg'
theImages2[3] = 'images/pics2/img07.jpg'
theImages2[4] = 'images/pics2/img08.jpg'
theImages2[5] = 'images/pics2/img09.jpg'
theImages2[6] = 'images/pics2/img10.jpg'

var theImages3 = new Array() 
theImages3[0] = 'images/pics3/img01.jpg'
theImages3[1] = 'images/pics3/img02.jpg'
theImages3[2] = 'images/pics3/img03.jpg'
theImages3[3] = 'images/pics3/img04.jpg'
theImages3[4] = 'images/pics3/img05.jpg'
theImages3[5] = 'images/pics3/img06.jpg'
theImages3[6] = 'images/pics3/img07.jpg'
theImages3[7] = 'images/pics3/img08.jpg'
theImages3[8] = 'images/pics3/img09.jpg'
theImages3[9] = 'images/pics3/img10.jpg'
theImages3[10] = 'images/pics3/img11.jpg'
theImages3[11] = 'images/pics3/img12.jpg'
theImages3[12] = 'images/pics3/img13.jpg'
theImages3[13] = 'images/pics3/img14.jpg'
theImages3[14] = 'images/pics3/img15.jpg'
theImages3[15] = 'images/pics3/img16.jpg'
theImages3[16] = 'images/pics3/img17.jpg'


// do not edit anything below this line
var j = 0
var p = theImages.length;
var q = theImages2.length;
var r = theImages3.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(){
document.write('<img src="'+theImages[whichImage]+'">');
}
var whichImage2 = Math.round(Math.random()*(q-1));
function showImage2(){
document.write('<img src="'+theImages2[whichImage2]+'">');
}
var whichImage3 = Math.round(Math.random()*(r-1));
function showImage3(){
document.write('<img src="'+theImages3[whichImage3]+'">');
}