Javascript Image Rotator Problems
<p>My code is very self explanatory. It is suppose to, after the page loads all necessary images, start looping through the same 5 images for the banner, with a 5 second delay in between. But, it doesn't do anything when the page loads.</p>

<pre><code>&lt;script type="text/javascript"&gt;
var counter = 0;
var bannerList = new Array();
bannerList[0] = "/portfolio/1.jpg"
bannerList[1] = "/portfolio/2.jpg"
bannerList[2] = "/portfolio/3.jpg"
bannerList[3] = "/portfolio/4.jpg"
bannerList[4] = "/portfolio/5.jpg"

function bannerRotator(){
    if(counter &gt; 4){
        counter = 0;
    }
    document.getElementById("slide").src = bannerList[counter];
    counter = counter + 1;
    var t=setTimeout("bannerRotator()", 2000);
}
&lt;/script&gt;
</code></pre>

<p>Along with:</p>

<pre><code>&lt;body onLoad="bannerRotator();"&gt;
</code></pre>

<p>Can anyone see where I'm going wrong? Thanks for any help!</p>
