var theImages = new Array() 
theImages[0] = 'nav/cars.jpg'
theImages[1] = 'nav/exige.jpg'
theImages[2] = 'nav/merceds-clk.jpg'
theImages[3] = 'nav/people1.jpg'
theImages[4] = 'nav/people2.jpg'
theImages[5] = 'nav/bmw-e92m3.jpg.jpg'
theImages[6] = 'nav/group1.jpg.jpg'
theImages[7] = 'nav/m3lights.jpg'
theImages[8] = 'nav/people3.jpg'
theImages[9] = 'nav/people4.jpg'
theImages[10] = 'nav/spider.jpg'
theImages[11] = 'nav/spider.jpg'
theImages[12] = 'nav/viper.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]+'">');
}