title: javascript slideshow not working?
body: <p>i have created a code for a simple javascript picture slideshow.
  so, when i copy the code directly from the website that i learned it from it works. when i try to recreate the code exactly the same way, it does not work. how is this possible? i have revised the code thoroughly. is javascript not working or what? the code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  
  &lt;head&gt;
      &lt;title&gt;Welcome!&lt;/title&gt;
      &lt;script type="text/javascript"&gt;
          var image1 = new Image()
              image1.src = "sample01.jpg"
          var image2 = new Image()
              image2.src = "sample02.jpg"
          var image3 = new Image()
              image3.src = "sample03.jpg"
          var image4 = new Image()
              image4.src = "sample04.jpg"
          var image5 = new Image()
              image5.src = "sample05.jpg"
      &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;center&gt;
          &lt;img src="sample01.jpg" name="slider1" width=800 height=380 /&gt;
          &lt;script type="text/javascript"&gt;
          var x=1;
          function slider()
          {
              document.images.slider1.src = eval("image"+x+".src");
              if (x&lt;5)
                  x++;
              else
                  x=1;
              setTimeout=("slider()",10);
          }
          slider();
          &lt;/script&gt;
      &lt;/center&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>