// JavaScript Document
var theImages = new Array()

// REPLACE THIS
theImages[0] = 'images/samples_a.png';
theImages[1] = 'images/samples_b.png';
theImages[2] = 'images/samples_c.png';
theImages[3] = 'images/samples_d.png';
theImages[4] = 'images/samples_e.png';
theImages[5] = 'images/samples_f.png';
theImages[6] = 'images/samples_g.png';


theWidth     = 420;
theHeight    = 342;
// DONE REPLACE THIS

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" width="'+theWidth+'" height="'+theHeight+'">');
}
