<script>
var arr=new Array(); arr[]="url(images/city.jpg)";
arr[]="url(images/desert.jpg)";
arr[]="url(images/flower.jpg)";
var i=;
function changeimage()
{
if(i==)
{
i=;
}
var div=document.getElementById("apdiv1");
div.style.backgroundImage=arr[i];
i++;
window.setTimeout("changeimage()",);
}
changeimage(); </script>