if (document.getElementById) { window.onload = swap };

function swap() {
var numimages=3;
rndimg = new Array("img/gfx_polahero_001.jpg", "img/gfx_polahero_002.jpg", "img/gfx_polahero_003.jpg"); 
x=(Math.floor(Math.random()*numimages));
randomimage=(rndimg[x]);
document.getElementById("hero").style.backgroundImage = "url("+ randomimage +")"; 
}
