onload = function() {

images = new Array(    
"images/random/image01.jpg",
"images/random/image02.jpg",
"images/random/image03.jpg",
"images/random/image04.jpg",
"images/random/image05.jpg",
"images/random/image06.jpg",
"images/random/image07.jpg",
"images/random/image08.jpg",
"images/random/image09.jpg",
"images/random/image10.jpg",
"images/random/image11.jpg",
"images/random/image12.jpg",
"images/random/image13.jpg"
);// set up an array of the images

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("switchimg").src = currentImage; // for img tag
}
