var theImages = new Array()

theImages[0] = 'picture01.jpg';
theImages[1] = 'picture02.jpg';
theImages[2] = 'picture03.jpg';
theImages[3] = 'picture04.jpg';
theImages[4] = 'picture05.jpg';
theImages[5] = 'picture06.jpg';

var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
}
var whichImage = Math.round(Math.random()*(p-1));

