title: How do I get my slideshow to repeat?
body: <p>I have the following code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var image1=new Image()
  image1.src="images/natandadam.jpg"
  
  var image2=new Image()
  image2.src="images/gardaa.jpg"
  
  var image3=new Image()
  image3.src="images/marmaris.jpg"
  
  var image4=new Image()
  image4.src="images/gardab.jpg"
  
  var image5=new Image()
  image5.src="images/engagement.jpg"
  
  var image6=new Image()
  image6.src="images/gardac.jpg"
  
  var image7=new Image()
  image7.src="images/natandadamlake.jpg"
  
  //--&gt;
  &lt;/script&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;7) {
          step++;
      } else {
          step=1;
      }
  
      //call function "slideit()" every 2.5 seconds
      setTimeout("slideit()",2500);
  }
  
  slideit();
  //--&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>...and this calls it:</p>
  
  <pre><code>&lt;img style="border:6px double #545565;"  src="gardaa.jpg" name="slide" width=600 height=400&gt;
  </code></pre>
  
  <p>I want it to continue skipping through the images but it stops on the last one. It used to repeat when it only had three images; Now I've added more its stopped.</p>
  
  <p>what do I change to make them repeat?</p>