var theImages = new Array()

//Random-loading images
theImages[0] = '<a href="/candles/"><img src="/images/lightACandleBox.gif" alt="Light a Candle" style="margin: auto; margin-top: 6px; border: none;" /></a>'
theImages[1] = '<a href="/obits/subscribe.php"><img src="/images/obitNotifyBox.gif" alt="Obituary Notices" style="margin: auto; margin-top: 6px; border: none;" /></a>'

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(theImages[whichImage]);

}