<!--
// ==============================================
// Copyright 2003 by jsCode.com
// Source: jsCode.com
// Author: etLux
// Free for all; but please leave in the header.
// Modified May 2005 - Joe Calderon
//			- Allows the images to be hyperlinked
// ==============================================

// Set up the image files to be used.
var theImages = new Array() // do not change this
var theURLS = new Array() // do not change this
var randomImages = new Array() // do not change this

// To add more image files, continue with the
// pattern below, adding to the array. Rememeber
// to increment the theImages[x] index!
// jcalderon - do the same with the "theURLS" array

// These are the Top static banner images and hyperlink urls
theImages[0] = 'images/top_BL1.jpg'
theImages[1] = 'images/top_BL2.jpg'
theImages[2] = 'images/top_OL1.jpg'
theImages[3] = 'images/top_OL2.jpg'
theImages[4] = 'images/top_GL1.jpg'
theImages[5] = 'images/top_GL2.jpg'

theURLS[0] = 'index.html'
theURLS[1] = 'index.html'
theURLS[2] = 'index.html'
theURLS[3] = 'index.html'
theURLS[4] = 'index.html'
theURLS[5] = 'index.html'
//---

// These are the other random images
randomImages[0] = 'images/random0.jpg'
randomImages[1] = 'images/random1.jpg'
randomImages[2] = 'images/random2.jpg'
randomImages[3] = 'images/random3.jpg'

//---

// ======================================
// do not change anything below this line
// ======================================

//Compute the random index for the top image banner
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));

//Compute the random index for the other images
var j = 0
var p = randomImages.length;

var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = randomImages[i]
}

var whichrandomImage = Math.round(Math.random()*(p-1));

//--- "showImage" function calls for top and random images
function showImage(){
	document.write('<a href="'+theURLS[whichImage]+'"><img src="'+theImages[whichImage]+'" border="0"></a>');
}

function showrandomImage(){
	document.write('<img src="'+randomImages[whichrandomImage]+'">');
}

//-->