if (document.getElementById) { window.onload = swap };

function swap() {
var numimages=5;  /* adjust # of images */
rndimg = new Array(
  "images/random/Welcome_to_UBC_1.jpg", 
  "images/random/Welcome_to_UBC_2.jpg",  
  "images/random/Welcome_to_UBC_3.jpg",  
  "images/random/Welcome_to_UBC_4.jpg",  
  "images/random/Welcome_to_UBC_5.jpg" /* no comma after last image array */
); 
x=(Math.floor(Math.random()*numimages));
randomimage=(rndimg[x]);
document.getElementById("ubc").style.backgroundImage = "url("+ randomimage +")"; 
}



