// JavaScript Document
var theImages = new Array() 

theImages[0] = 'http://intendance2.clients.squiz.co.uk/__data/assets/image/0003/44742/General_8.jpg'
theImages[1] = 'http://intendance2.clients.squiz.co.uk/__data/assets/image/0004/44743/Subpage_6.jpg'
theImages[2] = 'http://intendance2.clients.squiz.co.uk/__data/assets/image/0005/44744/Subpage_21.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]+'">');
}