<script language =javascript > var curIndex=0;
var timeInterval=1000; var arr=new Array(); arr[0]="photos/1.jpg"; arr[1]="photos/2.jpg"; arr[2]="photos/3.jpg"; arr[3]="photos/4.jpg"; arr[4]="photos/5.jpg";
setInterval(changeImg,timeInterval); function changeImg() {
var obj=document.getElementById("obj"); if (curIndex==arr.length-1) {
curIndex=0; } else {
curIndex+=1; }
obj.src=arr[curIndex]; } </script>
<img id=obj src ="photos/1.jpg" width=200 height=150 border =0>
var timeInterval=1000; var arr=new Array(); arr[0]="photos/1.jpg"; arr[1]="photos/2.jpg"; arr[2]="photos/3.jpg"; arr[3]="photos/4.jpg"; arr[4]="photos/5.jpg";
setInterval(changeImg,timeInterval); function changeImg() {
var obj=document.getElementById("obj"); if (curIndex==arr.length-1) {
curIndex=0; } else {
curIndex+=1; }
obj.src=arr[curIndex]; } </script>
<img id=obj src ="photos/1.jpg" width=200 height=150 border =0>