onload = function() {

images = new Array(	
"/images/layout/lamborghini_banner_yellow_m_back",
"/images/layout/lamborghini_banner_eng_black"
);


images1 = new Array(
"/images/layout/lamborghini_heading_whitelp"
);

images2 = new Array(
"/images/layout/lamborghini_heading_wheel_black_1"
);

images3 = new Array(
"/images/layout/lamborghini_heading_wheel_black_close",
"/images/layout/lamborghini_heading_wheel_white"
);

images4 = new Array(
"/images/layout/lamborghini_heading_yellow_open_door",
"/images/layout/lamborghini_heading_eng_black"
);

images5 = new Array(
"/images/layout/lamborghini_heading_wheel_white"
);

images6 = new Array(
"/images/layout/lamborghini_heading_eng_black"
);



rand = Math.floor(Math.random()*images.length); // chose a random number, between 0 and the length of the array -1
rand1 = Math.floor(Math.random()*images1.length); // chose a random number, between 0 and the length of the array -1
rand2 = Math.floor(Math.random()*images2.length); // chose a random number, between 0 and the length of the array -1
rand3 = Math.floor(Math.random()*images3.length); // chose a random number, between 0 and the length of the array -1
rand4 = Math.floor(Math.random()*images4.length); // chose a random number, between 0 and the length of the array -1
rand5 = Math.floor(Math.random()*images5.length); // chose a random number, between 0 and the length of the array -1
rand6 = Math.floor(Math.random()*images6.length); // chose a random number, between 0 and the length of the array -1

currentImage = images[rand]+".jpg"; // set img to the random image's src
currentImageSub = images[rand]+"_S.jpg"; // set img to the random image's src
currentImageHeading = images1[rand1]+".jpg";
currentImageHeading2 = images2[rand2]+".jpg";
currentImageHeading3 = images3[rand3]+".jpg";
currentImageHeading4 = images4[rand4]+".jpg";
currentImageHeading5 = images5[rand5]+".jpg";
currentImageHeading6 = images6[rand6]+".jpg";

// document.getElementById("test1").src = currentImage; // for img tag
document.getElementById("bannerSub").style.backgroundImage = "url("+currentImageSub+")"; //for div background
document.getElementById("banner").style.backgroundImage = "url("+currentImage+")"; //for div background
document.getElementById("heading1").style.backgroundImage = "url("+currentImageHeading+")"; //for div background
document.getElementById("heading2").style.backgroundImage = "url("+currentImageHeading2+")"; //for div background
document.getElementById("heading3").style.backgroundImage = "url("+currentImageHeading3+")"; //for div background
document.getElementById("heading4").style.backgroundImage = "url("+currentImageHeading4+")"; //for div background

document.getElementById("heading5").style.backgroundImage = "url("+currentImageHeading5+")"; //for div background
document.getElementById("heading6").style.backgroundImage = "url("+currentImageHeading6+")"; //for div background

// document.body.style.background = "url("+img+")"; // set the background image
}
