﻿var theImages = new Array()

theImages[0] = 'banner_01.jpg'
theImages[1] = 'banner_02.jpg'
theImages[2] = 'banner_03.jpg'
theImages[3] = 'banner_04.jpg'
theImages[4] = 'banner_05.jpg'
theImages[5] = 'banner_06.jpg'
theImages[6] = 'banner_07.jpg'
theImages[7] = 'banner_08.jpg'
theImages[8] = 'banner_09.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(){
document.write('<img src="Images/'+theImages[whichImage]+'" alt="banner" style="height: 200px; width: 665px;" />');
}