title: Inner HTML if statement not recognizing a div tag
body: <p>I tested the following code in IE, Chrome, and Firefox and it does not work in any of them. I have read several questions about similar problems but they have not offered solutions that fix my example.</p>
  
  <p>I am trying to create a pause/play button that interfaces with JWplayer (I also want it to interface with flowplayer, once I get the button working) and the image will change depending on which image is currently there. I also have a stop button that stops the player completely and changes the image of the pause/play button to pause.</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function changeimg()
  {
    var obj = document.getElementById('image1');
    var imgtag1 = '&lt;img src=\'PLAY.png\'&gt;';
    var imgtag2 = '&lt;img src=\'PAUSE.png\'&gt;';
    if(obj.innerHTML == imgtag2)
    {obj.innerHTML = imgtag1;}
    else
    {obj.innerHTML = imgtag2;}
    return;
  }
  
  function playimg()
  {
    document.getElementById('image1').innerHTML = '&lt;img src=\'PLAY.png\'&gt;';
    return;
  }
  
  &lt;/script&gt;
  
  &lt;div id="image1" href="#" onclick="changeimg(); jwplayer('mediaspace1').play(); jwplayer('mediaspace2').play(); jwplayer('mediaspace3').play(); jwplayer('mediaspace4').play();"&gt;&lt;img src='PLAY.png'&gt;&lt;/div&gt;
  &lt;div href="#" onclick="playimg(); jwplayer('mediaspace1').stop(); jwplayer('mediaspace2').stop(); jwplayer('mediaspace3').stop(); jwplayer('mediaspace4').stop();"&gt;&lt;img src='STOP.png'&gt;&lt;/div&gt;
  </code></pre>
  
  <p>The play/pause function works, and the first div WILL change into the pause img (so the javascript is going through) and it WILL change back into play if I click on the second div (stop function - triggers playimg() ) but it will not change back into the play image if I click on the pause button again.</p>
  
  <p>For security reasons I can't link the website, but any help would be appreciated</p>