﻿var theImages = new Array()
theImages[0] = '/images/photos/mags.gif'
theImages[1] = '/images/photos/macca.gif'
theImages[2] = '/images/photos/hansongough.gif'
theImages[3] = '/images/photos/hardman.gif'
theImages[4] = '/images/photos/durlo.gif'
theImages[5] = '/images/photos/boys.gif'
theImages[6] = '/images/photos/gladman.gif'
theImages[7] = '/images/photos/credlin.gif'
theImages[8] = '/images/photos/hilton.gif'
theImages[9] = '/images/photos/nigel.gif'
theImages[10] = '/images/photos/lkelly.gif'
theImages[11] = '/images/photos/chubbs.gif'

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] + '">');
}