Javascript IE7/IE8 Discrepancy
<p>When I use <code>document.getElementById('checkbox1').checked == true</code> in IE8 it does not work but works in IE7, any solutions please?  </p>

<pre><code>&lt;script language="Javascript" type="text/javascript"&gt;
function swap(){ 
        if(document.getElementById('checkbox1').checked == true ){  
           document.getElementById('captionrow1').style.display = "none";
           document.getElementById('captionrow2').style.display = "inline";
            document.getElementById('show').style.display = "inline";

                        if (location.href.indexOf("CheckBox1=1") == -1)
                                location.href = "employees_commends1a.asp?CheckBox1=1";
         } 
   if(document.getElementById('checkbox1').checked == false ){  
            document.getElementById('captionrow1').style.display = "inline";
           document.getElementById('captionrow2').style.display = "none";
           document.getElementById('show').style.display = "none";
      } 
   }
&lt;/script&gt;
</code></pre>
