onload = function() {

images = new Array(
"images/title_sportler.jpg",
"images/title_ski.jpg",
"images/title_langlauf.jpg",
"images/title_langlauf2.jpg",
"images/title_wald.jpg",
"images/title_wald2.jpg",
"images/title_wald3.jpg",
"images/title_wald4.jpg",
"images/title_wald5.jpg",
"images/title_uhren.jpg",
"images/title_titisee_winter.jpg",
"images/title_titisee_sonne.jpg",
"images/title_schluchsee.jpg",
"images/title_see.jpg",
"images/title_stube.jpg",
"images/title_kutsche.jpg",
"images/title_feldberg_pano.jpg",
"images/title_feldberg_pano2.jpg",
"images/title_feldberg_pano3.jpg"
);

rand = Math.floor(Math.random()*images.length); // chose a random number, between 0 and the length of the array -1
currentImage = images[rand]; // set img to the random image's src

document.getElementById("randomimage").style.backgroundImage = "url('"+currentImage+"')"; //for div background
}
