// JavaScript Document

//var base = "http://sjnet/stjoedev2/";
var base = "http://www.stjoe.on.ca/";

var theImages = new Array() 
theImages[0] = base + 'images/01.jpg'
theImages[1] = base + 'images/03.jpg'
theImages[2] = base + 'images/04.jpg'
theImages[3] = base + 'images/05.jpg'
theImages[4] = base + 'images/06.jpg'
theImages[5] = base + 'images/07.jpg'
theImages[6] = base + 'images/12.jpg'
theImages[7] = base + 'images/13.jpg'
theImages[8] = base + 'images/15.jpg'
theImages[9] = base + 'images/16.jpg'
theImages[10] = base + 'images/17.jpg'
theImages[11] = base + 'images/18.jpg'
theImages[12] = base + 'images/19.jpg'
theImages[13] = base + 'images/20.jpg'
theImages[14] = base + 'images/21.jpg'
theImages[15] = base + 'images/22.jpg'
theImages[16] = base + 'images/23.jpg'
theImages[17] = base + 'images/24.jpg'
theImages[18] = base + 'images/25.jpg'
theImages[19] = base + 'images/26.jpg'
theImages[20] = base + 'images/27.jpg'
theImages[21] = base + 'images/28.jpg'
theImages[22] = base + 'images/29.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("<a href='"+base+"index.php' /><img src="+theImages[whichImage]+" height='209' width='775' alt='Welcome to St. Joseph\'s Health Centre! Our vision is to be Canada\'s Best Community Teaching Hospital.' /></a>");
}


