/*
   Author: Troy Hamilton
   Date: February 5, 2009

   Function List:
   showImage()
      Displays a random image from 1 to 10
*/

var theImages = new Array() 

theImages[0]=1;
theImages[1]=2;
theImages[2]=3;
theImages[3]=4;
theImages[4]=5;
theImages[5]=6;
theImages[6]=7;
theImages[7]=8;
theImages[8]=9;
theImages[9]=10;
//theImages[6] = '7.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='images/"+theImages[whichImage]+".jpg'>");
}