// JavaScript Document

var theImages = new Array()

//Random-loading images
theImages[0] = 'randomOne.jpg'
theImages[1] = 'randomTwo.jpg'
theImages[2] = 'randomThree.jpg'
theImages[3] = 'randomFour.jpg'
theImages[4] = 'randomFive.jpg'
theImages[5] = 'randomSix.jpg'
theImages[6] = 'randomSeven.jpg'
theImages[7] = 'randomEight.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(){
if(whichImage==0){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=349 height=235>');
}
else if(whichImage==1){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=349 height=235>');
}
else if(whichImage==2){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=349 height=235>');
}
else if(whichImage==3){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=349 height=235>');
}
else if(whichImage==4){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=349 height=235>');
}
else if(whichImage==5){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=349 height=235>');
}
else if(whichImage==6){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=349 height=235>');
}
else if(whichImage==7){
document.write('<img src="'+theImages[whichImage]+'" border=0 width=349 height=235>');
}

}


var theImages2 = new Array()

//Random-loading images
theImages2[0] = 'randomOne.jpg'
theImages2[1] = 'randomTwo.jpg'
theImages2[2] = 'randomThree.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(){
if(whichImage2==0){
document.write('<img src="'+theImages2[whichImage2]+'" border=0 width=349 height=235>');
}
else if(whichImage2==1){
document.write('<img src="'+theImages2[whichImage2]+'" border=0 width=349 height=235>');
}
else if(whichImage2==2){
document.write('<img src="'+theImages2[whichImage2]+'" border=0 width=349 height=235>');
}


}


