title: JavaScript link to another page
body: <p>I have the next code:</p>
  
  <pre><code>&lt;p&gt;
      &lt;img alt="" src="imagini/slide1.png" 
           style="height: 64px; width: 64px" id="imgClickAndChange"
           onclick="changeImage()" /&gt;
  &lt;/p&gt;
  
  
  &lt;script language="javascript"&gt;
  function changeImage() {
  
      if (document.getElementById("imgClickAndChange").src == "imagini/slide1.png") 
      {
          document.getElementById("imgClickAndChange").src = "imagini/platform.png";
      }
      else 
      {
          document.getElementById("imgClickAndChange").src = "imagini/platform.png";
      }
  }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>That is changing an image (phase 1) after clicking on it into another image(phase 2). I want to link the second image (phase 2) to an index.php page. How do I do that? Is there a way of altering or interfering in the changeImage function.</p>