var theImages = new Array()
var total = 44; // total number of images

//Random-loading images
for (i = 0; i < total; i++){
	theImages[i] = 'images/random/'+(i+1)+'.jpg' // replace with names of images
}

var j = 0
var preBuffer = new Array()

for (i = 0; i < total; i++){
	preBuffer[i] = new Image()
	preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(total-1));

function showImage(){
	document.write('<img src="'+theImages[whichImage]+'" alt="'+(whichImage+1)+'.jpg" />');
}