title: My rollover image is not working correctly
body: <p>I have this rollover image for my final project in class and I need to use Dreamweaver's features to help accomplish this task.</p>
  
  <p>So after doing it, my rollover image doesn't work.</p>
  
  <p>Here is what it looks like without mouseover:</p>
  
  <p><img src="https://i.stack.imgur.com/CdEOL.jpg" alt="http://i.stack.imgur.com/CdEOL.jpg"></p>
  
  <p>and here is what it looks like with mouseover (or suppose to anyways):</p>
  
  <p><img src="https://i.stack.imgur.com/6gZvF.jpg" alt="http://i.stack.imgur.com/6gZvF.jpg"></p>
  
  <p>I feel dreamweaver probably put some unnecessary coding in there which is why it is not quite working, so the coding that it did for me is:</p>
  
  <pre><code>&lt;p&gt;
  &lt;a href="index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('1st-Link','','images/1st-link-roll.jpg',1)"&gt;&lt;img id="firstlink" src="images/1st-link.jpg" alt="TAP" id="1st-Link" /&gt;&lt;/a&gt;&lt;a href="whatis.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('2nd-Link','','images/2nd-link-roll.jpg',1)"&gt;&lt;img id="rollover" src="images/2nd-link.jpg" alt="Who is TAP" id="2nd-Link" /&gt;&lt;/a&gt;&lt;a href="why.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('3rd-Link','','images/3rd-link-roll.jpg',1)"&gt;&lt;img id="rollover" src="images/3rd-link.jpg" alt="Why we do it" id="3rd-Link" /&gt;&lt;/a&gt;&lt;a href="resources.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('4th-Link','','images/4th-link-roll.jpg',1)"&gt;&lt;img id="rollover" src="images/4th-link.jpg" alt="Resources" id="4th-Link" /&gt;&lt;/a&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>and the JavaScript it put in is:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&amp;&amp;i&lt;a.length&amp;&amp;(x=a[i])&amp;&amp;x.oSrc;i++) x.src=x.oSrc;
  }
  function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
      var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i&lt;a.length; i++)
      if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  }
  
  function MM_findObj(n, d) { //v4.01
    var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))&gt;0&amp;&amp;parent.frames.length) {
      d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&amp;&amp;d.all) x=d.all[n]; for (i=0;!x&amp;&amp;i&lt;d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&amp;&amp;d.layers&amp;&amp;i&lt;d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x &amp;&amp; d.getElementById) x=d.getElementById(n); return x;
  }
  
  function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i&lt;(a.length-2);i+=3)
     if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I don't know if you need it or not, but my CSS is:</p>
  
  <pre><code>#rollover
  {
      display:block;
      width:120px;
      border:1px solid #000;
      float:left;
      margin-top:30px;
      border:1px solid #000
  }
  
  #firstlink
  {
      display:block;
      width:120px;
      border:1px solid #000;
      float:left;
      margin-top:30px;
      margin-left:265px;
  }
  </code></pre>