// JavaScript Document
<!-- 
if (document.getElementById) { window.onload = swap };
function swap() {
var numimages=4;
rndimg = new Array("images/random/1.png", "images/random/2.png", "images/random/3.png", "images/random/4.png"); 

x=(Math.floor(Math.random()*numimages));

randomimage=(rndimg[x]);

document.getElementById("randomhomeimage").style.backgroundImage = "url("+ randomimage +")"; 

}
//--> 