title: Using a thumbnail image, how do I change main picture to thumbnail image?
body: <p>I am trying to use Javascript to change a picture with on-hover. I have a thumbnail image and when the user hovers on top, the big picture will then change, depending on what thumbnail is being hovered over. </p>
  
  <p>This is the HTML I have used.</p>
  
  <pre><code>&lt;img onmouseover="showT(0)" src="pictures/278 Edit 10-8-11 2312.jpg" 
                      height="75" width="75" &gt;
              &lt;a href="#" onmouseover="showT(0)"&gt;pic 1&lt;/a&gt;
              &lt;a href="#" onmouseover="showT(1)"&gt;pic 2&lt;/a&gt;
              &lt;a href="#" onmouseover="showT(2)"&gt;pic 3&lt;/a&gt;
  </code></pre>
  
  <p>This is the java script placed in header.</p>
  
  <pre><code>    &lt;!-- onhover mouse for thumbNail --&gt;
  &lt;script language="JavaScript" type="text/JavaScript"&gt; 
  function showT(q){ 
  document.getElementById('ima').setAttribute('src','0'+q+'.jpg') 
  } 
  &lt;/script&gt;
  </code></pre>