var theImages = new Array();

theImages[0] = 'uploads/images/1.jpg';
theImages[1] = 'uploads/images/2.jpg';
theImages[2] = 'uploads/images/3.jpg';
theImages[3] = 'uploads/images/4.jpg';
theImages[4] = 'uploads/images/ford.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>');
}
else if(whichImage==1){
document.write('<img src="'+theImages[whichImage]+'" border=0>');
}
else if(whichImage==2){
document.write('<img src="'+theImages[whichImage]+'" border=0>');
}
else if(whichImage==3){
document.write('<img src="'+theImages[whichImage]+'" border=0>');
}
else if(whichImage==4){
document.write('<img src="'+theImages[whichImage]+'" border=0>');
}

}

