title: I can't get external JavaScript to work
body: <p>We're (me and a few friends) working on a website, we want to display 4 images on a page and have 8 we want to cycle through. I think I've written an adequate script but none of my friends know JS and it's my first time using it. I'm not sure if I have errors in the JS or am having trouble linking to it from the HTML. The HTML document is named "index.html", in the directory there is a folder named "js" in  which we have all the JavaScript we are and will be using. We have a folder named "images" where we're holding all the images.</p>
  
  <p>Here's the JS code:</p>
  
  <pre><code>var arregloImagen = new Array(
  "../images/pic02.jpg",
  "../images/pic03.jpg",
  "../images/pic04.jpg",
  "../images/pic05.jpg",
  "../images/pic06.jpg",
  "../images/pic07.jpg",
  "../images/pic08.jpg",
  "../images/pic09.jpg");
  var contadorImagen =0;
  function iniciaTiempo()  {
  if(contadorImagen == arregloImagen.length){
      contadorImagen = 0;
      alert("Hello");
  }
  if(contadorImagen &lt;= 4) {
      document.getElementById("img1").src = arregloImagen[contadorImagen];
      document.getElementById("img2").src = arregloImagen[contadorImagen+1];
      document.getElementById("img3").src = arregloImagen[contadorImagen+2];
      document.getElementById("img4").src = arregloImagen[contadorImagen+3];
  }
  else{
      switch (contadorImagen) {
          case 5:
              document.getElementById("img1").src = arregloImagen[contadorImagen-5];
              document.getElementById("img2").src = arregloImagen[contadorImagen];
              document.getElementById("img3").src = arregloImagen[contadorImagen+1];
              document.getElementById("img4").src = arregloImagen[contadorImagen+2];
              break;
  
          case 6:
              document.getElementById("img1").src = arregloImagen[contadorImagen-6];
              document.getElementById("img2").src = arregloImagen[contadorImagen-5];
              document.getElementById("img3").src = arregloImagen[contadorImagen];
              document.getElementById("img4").src = arregloImagen[contadorImagen+1];
              break;
  
          case 7:
              document.getElementById("img1").src = arregloImagen[contadorImagen-7];
              document.getElementById("img2").src = arregloImagen[contadorImagen-6];
              document.getElementById("img3").src = arregloImagen[contadorImagen-5];
              document.getElementById("img4").src = arregloImagen[contadorImagen];
              break;
      }
  
  }
  contadorImagen++;
  
  
  setTimeout("iniciaTiempo()", 1000);
  }
  </code></pre>
  
  <p>And here I reference the JS from HTML:</p>
  
  <pre><code>&lt;head&gt;
  &lt;script src="js/test.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      iniciaTiempo();
  &lt;/script&gt;
  &lt;/head&gt;
  </code></pre>