This is another example:
Code:
<html>
<body onload="window_onload()">
JS:
Code:
var currentImgNumber = 1;
var numberOfImages = 3;
function switchImage(){
currentImgNumber++;
document.imgAdvert.src = 'images/YourImage' + currentImgNumber + '.jpg';
if(currentImgNumber == numberOfImages){
currentImgNumber = 0;
}
}
function window_onload(){
setInterval("switchImage()", 3000);
}
This code changes the image within a div. You could slightly modify this to suit the background images.
Regards,
LC.