// JavaScript Document


var theImages = new Array()
theImages[0] = "images/mainim1.jpg"; 
theImages[1] = "images/mainim2.jpg"; 
theImages[2] = "images/mainim3.jpg"; 
theImages[3] = "images/mainim4.jpg"; 
theImages[4] = "images/mainim5.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]+'">');
}

var theImages2 = new Array()
theImages2[0] = "images/quote1.jpg"; 
theImages2[1] = "images/quote2.jpg"; 
theImages2[2] = "images/quote3.jpg"; 
theImages2[3] = "images/quote4.jpg"; 
theImages2[4] = "images/quote5.jpg"; 
theImages2[5] = "images/quote6.jpg";

var j = 0
var p = theImages2.length;
var preBuffer = new Array()
	for (i = 0; i < p; i++){
  		preBuffer[i] = new Image()
   		preBuffer[i].src = theImages[i]
	}

var whichImage2 = Math.round(Math.random()*(p-1));

function showImage2(){
document.write('<img src="'+theImages2[whichImage2]+'">');
}