window.addEventListener?window.addEventListener("load",randImg,false):window.attachEvent("onload",randImg);

//Selects a random image on page load
function randImg() {

imgs = 10; //Set the total number of images to pick from

rand = 1 + Math.floor(Math.random() * imgs)

//by default pictures have to be named home_header#.jpg
//the name can be changed below

target = "/images/home/headers/home_header"+ rand +".jpg";

document.getElementById ('home_header').src = target;
return false;
}