
// Set up the image files to be used.
var theImages = new Array() // do not change this

// This path MUST be updated to the proper link once things go live //
var startImagePath = '<img src="http://www.sfu.ca/earth-sciences/images/banners/';
var endImagePath = '" width="490" height="70"/>';

// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'banner1_right.jpg'
theImages[1] = 'banner1_right.jpg'
theImages[2] = 'banner2_right.jpg'
theImages[3] = 'banner3_right.jpg'
theImages[4] = 'banner4_right.jpg'
theImages[5] = 'banner5_right.jpg'
theImages[6] = 'banner6_right.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]
}
var whichBanner = Math.round(Math.random()*(p-1));
function showBanner(){
document.write(startImagePath + theImages[whichBanner] + endImagePath);
}


