// randomizer array
var theImages = new Array() 

theImages[0] = "img/pic_main.jpg";
theImages[1] = "img/pic_main2.jpg";
theImages[2] = "img/pic_main3.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('<table width="425" height="220" border="0" cellpadding="0" cellspacing="0" background="'+theImages[whichImage]+'">');
}

function BgOn(td){
if(document.getElementById||(document.all && !(document.getElementById))){
td.style.backgroundColor="#A8A8A6";
}
}


function BgOut(td){
if(document.getElementById||(document.all && !(document.getElementById))){
td.style.backgroundColor="";

}
}
