var currentIndx;
var theImages = new Array();

var rand1 = 0;
var useRand = 0;

currentIndx=0;
theImages=new Array();
theImages[0] = 'images/header_photo_01.jpg';
theImages[1] = 'images/header_photo_02.jpg';
theImages[2] = 'images/header_photo_03.jpg';
theImages[3] = 'images/header_photo_08.jpg';
theImages[4] = 'images/header_photo_09.jpg';
        
/* this function loads a random image */
function newImage() {
var imgnum = theImages.length - 1;
do {
var randnum = Math.random();
rand1 = Math.round((imgnum - 1) * randnum) + 1;
} while (rand1 == useRand);
useRand = rand1;
document.getElementById('theImage').attributes['src'].value = theImages[useRand];
}