I'm doing an image cycler but can't figure out why it keeps getting hung up
on the third pic in the array? Here is what I have:
----------------------------------------------------------------------------
---------------------------------
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function pic_cycler () {
var pics = new Array
("pic1.jpg","pi c2.jpg","pic3.j pg","pic4.jpg", "pic5.jpg") ;
var cycled_pic = document.getEle mentById("subje ct");
var pic_number = 0;
setInterval(cyc le, 1000);
function cycle(){
if (pic_number < 4) {
pic_number = pic_number + 1;
cycled_pic.src = pics[pic_number];
}
else {
pic_number = 0;
}
}
}
</script>
</head>
<body>
<img id="subject" src="pic1.jpg" width="118" height="90"
onLoad="pic_cyc ler();">
</body>
</html>
----------------------------------------------------------------------------
---------------------------------
Help would be appeciated--thanks/