title: Image scroll between <head> tags, can I put it in an external?
body: <p>I am using an image scroller within Javascript, this is the code:</p>
  
  <pre><code>var step=1
  function slideShow()
  {
  //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.0 seconds
  setTimeout("slideShow()",2000)
  }
  slideShow()
  </code></pre>
  
  <p>It is required that this following code goes between the  tags:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  &lt;!--
  var image1=new Image()
  image1.src="images/image1.png"
  var image2=new Image()
  image2.src="images/image2.png"
  var image3=new Image()
  image3.src="images/image3.png"
  var image4=new Image()
  image4.src="images/image4.png"
  var image5=new Image()
  image5.src="images/image5.png"
  //--&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>Now, I have other Javascript files within an external js file. I have tried putting the whole code in with the others and hoping it carries with the  tag, but it doesn't work.
  I have also tried adding it to an external one by itself, this also doesn't work.</p>
  
  <p>I am sure it is something obvious, but I cannot think what.
  Anyone know?</p>
  
  <p>I'd like to have all my JavaScript in JS docs.</p>
  
  <p>Thanks.</p>