Пример работы - тут

Код:
   <SCRIPT type="text/javascript">
<!-- Web Site: http://javascript.clan.su -------------------------------->
<!--
// preloader
var img=new Array();
img[0]=new Image(); img[0].src="http://javascript.clan.su/ime/01.gif";
img[1]=new Image(); img[1].src="http://javascript.clan.su/ime/02.gif";
img[2]=new Image(); img[2].src="http://javascript.clan.su/ime/03.gif";

var interval=3000; // change this value to change the speed, ie: 2000 = 2 seconds between slides
var n=0;
var imgs = new Array("http://javascript.clan.su/ime/01.gif","http://javascript.clan.su/ime/02.gif","http://javascript.clan.su/ime/03.gif","http://javascript.clan.su/ime/04.gif");
function rotate()
{
if(navigator.appName=="Netscape" && document.getElementById)
{
document.getElementById("p").src=imgs[n];
}
else document.images.p.src=imgs[n];
(n==(imgs.length-1))?n=0:n++;
setTimeout("rotate()",interval);
}
// -->
</SCRIPT>
</HEAD>
<BODY leftMargin="0" topMargin="0" onload="rotate()" marginwidth="0" marginheight="0">
<IMG height=283 alt=Slide width=216 name="p" id="p">
</BODY>