var theImages = new Array()

theImages[0] = 'images/random_photos/001.jpg'
theImages[1] = 'images/random_photos/003.jpg'
theImages[2] = 'images/random_photos/004.jpg'
theImages[3] = 'images/random_photos/005.jpg'
theImages[4] = 'images/random_photos/006.jpg'
theImages[5] = 'images/random_photos/007.jpg'
theImages[6] = 'images/random_photos/008.jpg'
theImages[7] = 'images/random_photos/009.jpg'
theImages[8] = 'images/random_photos/010.jpg'
theImages[9] = 'images/random_photos/011.jpg'
theImages[10] = 'images/random_photos/012.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 getImage()
{
	return "<img src='" + theImages[whichImage] + "'/>";
}
