var theImages = new Array() 
theImages[0] = 'images/random/1.jpg'
theImages[1] = 'images/random/2.jpg'
theImages[2] = 'images/random/5.jpg'
theImages[3] = 'images/random/6.jpg'
theImages[4] = 'images/random/7.jpg'
theImages[5] = 'images/random/8.jpg'
theImages[6] = 'images/random/9.jpg'
theImages[7] = 'images/random/10.jpg'
theImages[8] = 'images/random/11.jpg'
theImages[9] = 'images/random/13.jpg'
theImages[10] = 'images/random/14.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 class="sub" src="'+theImages[whichImage]+'">');
}

var theImages2 = new Array() 
theImages2[0] = 'images/random1/1.jpg'
theImages2[1] = 'images/random1/2.jpg'
theImages2[2] = 'images/random1/3.jpg'
theImages2[3] = 'images/random1/4.jpg'
theImages2[4] = 'images/random1/5.jpg'
theImages2[5] = 'images/random1/6.jpg'
theImages2[6] = 'images/random1/7.jpg'
theImages2[7] = 'images/random1/8.jpg'
theImages2[8] = 'images/random1/9.jpg'
theImages2[9] = 'images/random1/10.jpg'
theImages2[10] = 'images/random1/11.jpg'
theImages2[12] = 'images/random1/13.jpg'
theImages2[12] = 'images/random1/14.jpg'
theImages2[13] = 'images/random1/15.jpg'
theImages2[14] = 'images/random1/16.jpg'
var j = 0
var p = theImages2.length;
var preBuffer2 = new Array()
for (i = 0; i < p; i++){
   preBuffer2[i] = new Image()
   preBuffer2[i].src = theImages2[i]
}
var whichImage2 = Math.round(Math.random()*(p-1));
function showImage2(){
document.write('<img class="sub" src="'+theImages2[whichImage2]+'">');
}

var theImagesEvents = new Array() 
theImagesEvents[0] = 'images/events/1.jpg'
theImagesEvents[1] = 'images/events/2.jpg'
theImagesEvents[2] = 'images/events/3.jpg'
theImagesEvents[3] = 'images/events/4.jpg'
theImagesEvents[4] = 'images/events/5.jpg'
theImagesEvents[5] = 'images/events/6.jpg'
theImagesEvents[6] = 'images/events/7.jpg'
theImagesEvents[7] = 'images/events/8.jpg'
theImagesEvents[8] = 'images/events/9.jpg'
theImagesEvents[9] = 'images/events/10.jpg'
theImagesEvents[10] = 'images/events/11.jpg'
var j = 0
var p = theImagesEvents.length;
var preBufferEvents = new Array()
for (i = 0; i < p; i++){
   preBufferEvents[i] = new Image()
   preBufferEvents[i].src = theImagesEvents[i]
}
var whichImageEvents = Math.round(Math.random()*(p-1));
function showImageEvents(){
document.write('<img class="sub" src="'+theImagesEvents[whichImageEvents]+'">');
}