
var theImages=['bg1', 'bg2', 'bg3', 'bg4'];
var p = theImages.length;
var whichImage = Math.round(Math.random()*(p-1));
onload=function() {
document.getElementById('bg').style.background="url(../images/"+theImages[whichImage]+".jpg) no-repeat top center";
}