Hey guys first off I want to let you know that I am a total new noob in JS, I only know html so detail will be necessary.

Ok my website HOME PAGE has 3 images on the side. I want all 3 of those images to change every X seconds, each has to change from a different folder, image1 /path/SMLpics. image2 /path/LRGpics. image3 /path/XLpics.

Also I need to be able to change the frequency of all 3, they cant all change at say 3 seconds. I may want one to do 1sec, second to do 5 sec, and third to do 10 but I need to be able to change the intervals at any time.

Can anyone point me at such a script?

I have searched and searched and can not find something that works. I have found one that works but only works for one image, I CAN NOT get it to work for 3 different images being on the same page. This is the one that I use now but I don't know how to make it work with more then one image, and more then one path to images.


<script language="JavaScript" type="text/javascript">
<!--
var Img1Ary=new Array('1.jpg','2.jpg','3.jpg','4.jpg','5.jpg','6.jpg');
var Img1Path='http://MYSITE.com/files/SMLpics/';
var ID1Ary=new Array('Img1');


function Increment(c,ary){
c++
if (c>=ary.length){ c=0; }
return c
}

function Rotate(idary,imgpath,imgary){
if (!document.getElementById(idary[0]).set){
document.getElementById(idary[0]).set=true;
document.getElementById(idary[0]).cnt=-1;
}
for (zxc0=0;zxc0<idary.length;zxc0++){
document.getElementById(idary[0]).cnt=Increment(document.getElementById(idary[0]).cnt,imgary);
document.getElementById(idary[zxc0]).src=imgpath+imgary[document.getElementById(idary[0]).cnt];
}
}

function Init(){
setInterval('Rotate(ID1Ary,Img1Path,Img1Ary)',3000);
}
//-->
</script>

AND THEN IN HTML BODY I ADD: <body onload="Init();" ><img id="Img1" src="http://MYSITE.com/files/SMLpics/1.jpg"></body>