// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'images/roost_run_club/Run With Us1.jpg';
theImages[1] = 'images/roost_run_club/DSC00256.jpg';
theImages[2] = 'images/roost_run_club/DSC00258.jpg';
theImages[3] = 'images/roost_run_club/Bret_Denver_081019a.jpg';
theImages[4] = 'images/roost_run_club/Run With Us2.jpg';
theImages[5] = 'images/roost_run_club/parktopark.jpg';
theImages[6] = 'images/roost_run_club/Bret_May2008_RMRR.jpg';
theImages[7] = 'images/roost_run_club/keith rim run.jpg';
theImages[8] = 'images/roost_run_club/bret_120708_colder_boulder_sm.png';
theImages[9] = 'images/roost_run_club/colfax_2008_half_sm.jpg';

// do not edit anything below this line

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]
}
reloadTime = 6 // set the time in seconds between automatic image changes
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
currentImage = whichImage;
document.write('<img src="'+ theImages[currentImage] +'" width="170"><input name="varBowl" id="varBowl" type="hidden" value="' + currentImage + '" /><a href="javascript: void();" style="height:15px; width:60px; position:absolute; left:155px; bottom:3px; z-index:100;  background-image:url(images/shared/empty.gif);" onclick="reloadShowImage();" ></a>');
reloadTime = (reloadTime * 1000);
setInterval("reloadShowImage();",reloadTime);
}
function reloadShowImage() {
if(currentImage <= (theImages.length - 2)) {
currentImage = parseFloat(document.getElementById('varBowl').value) + 1;
} else {
currentImage = 0;
}
document.getElementById('index_interactive_element').innerHTML = '<img src="' + theImages[currentImage] + '" width="170"><input name="varBowl" id="varBowl" type="hidden" value="' + currentImage + '" /><a href="javascript: void();" style="height:15px; width:60px; position:absolute; left:155px;  background-image:url(images/shared/empty.gif); bottom:3px; z-index:100;" onclick="reloadShowImage();" ></a>';

}