infinite loop for a slideshow
<p>This is my code but i would like an infinite loop. Please help and be gentle. Explain where to put the code in full as i dont know html.
if you have a better code for me to use i would appreciate this but i found this on the web and it works except for infinite loop.
this is a 2 image slidehow.</p>

<pre><code>&lt;script type="text/javascript"&gt;
&lt;!--
var image1=new Image()
image1.src="/v/vspfiles/assets/images/home1.jpg"

var image2=new Image()
image2.src="/v/vspfiles/assets/images/home2.jpg"
//--&gt;
&lt;/script&gt;


&lt;div style="text-align: left;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;img           src="http://xvrlm.lhcjd.servertrust.com/v/vspfiles/assets/images/home2.jpg" name="slide"    width="610" height="78"&gt;
&lt;script&gt;
&lt;!--

//variable that will increment through the images
var step=1
function slideit(){

    //if browser does not support the image object, exit.
    if (!document.images)
        return
    document.images.slide.src=eval("image"+step+".src")
    if (step&lt;3)
        step++
    else
        step=1
    //call function "slideit()" every 2.5 seconds
    setTimeout("slideit()",2500)
}
slideit()

//--&gt;
&lt;/script&gt;
</code></pre>
