Javascript content rotator?
<p>I’ve got the basics of a content rotator done, the only problem is it doesn’t loop itself back to the beginning and I cannot figure out why! It is a very simple javascript script:</p>

<pre><code>window.onload = function() { setInterval("transition()", 5000); }

    function transition()
    {
        var y = document.getElementById("featured").getElementsByTagName("li");
        for (var i=0;i&lt;y.length;i++)
        {
            if (y[i].className == "current")
            {
                y[(i+1)].className = "current";
                y[i].className = "";
                break;
            }
        }
    }
</code></pre>

<p>It keeps stopping at the end of the list, basically I just want it to loop. Any help?</p>
