// JavaScript Document

// Set up the image files to be used.
var theImages = new Array(); // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'js-images/image_1.jpg';
theImages[1] = 'js-images/image_2.jpg';
theImages[2] = 'js-images/image_3.jpg';
theImages[3] = 'js-images/image_4.jpg';
theImages[4] = 'js-images/image_5.jpg';
theImages[5] = 'js-images/image_6.jpg';
theImages[6] = 'js-images/image_8.jpg';
theImages[7] = 'js-images/image_9.jpg';
theImages[8] = 'js-images/image_10.jpg';
theImages[9] = 'js-images/image_11.jpg';
theImages[10] = 'js-images/image_12.jpg';
theImages[11] = 'js-images/image_13.jpg';
theImages[12] = 'js-images/image_14.jpg';
theImages[13] = 'js-images/image_15.jpg';
theImages[14] = 'js-images/image_2.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]+'">');


}