var theImages = new Array() 
// modify list for path to images
theImages[0] = '/images/sub_image_01.jpg'
theImages[1] = '/images/sub_image_02.jpg'
theImages[2] = '/images/sub_image_03.jpg'
theImages[3] = '/images/sub_image_04.jpg'
theImages[4] = '/images/sub_image_05.jpg'
theImages[5] = '/images/sub_image_06.jpg'
theImages[6] = '/images/sub_image_07.jpg'
theImages[7] = '/images/sub_image_08.jpg'
theImages[8] = '/images/sub_image_09.jpg'
theImages[9] = '/images/sub_image_10.jpg'
theImages[10] = '/images/sub_image_11.jpg'
theImages[11] = '/images/sub_image_12.jpg'
theImages[12] = '/images/sub_image_13.jpg'
theImages[13] = '/images/sub_image_14.jpg'
theImages[14] = '/images/sub_image_15.jpg'
theImages[15] = '/images/sub_image_16.jpg'
theImages[16] = '/images/sub_image_17.jpg'
theImages[17] = '/images/sub_image_18.jpg'
theImages[18] = '/images/sub_image_19.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="'+theImages[whichImage]+'" border="0" alt="Westlake Village"></a>');
}