title: Crossbrowser JS
body: <p>Made this nice little loop for hiding and showing div's, works as a charm in firefox and opera, but IE, safari and chrome say's no....
  So my question is; why?</p>
  
  <pre><code>    function theme(nr){
    document.getElementById(nr).style.display = "block";
    for (i = 0;i &lt;= 28; i++) {
     if (i != nr) {
      document.getElementById(i).style.display = "none";
     }    
    }
   }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;select id="subject" name="subject"&gt;
  &lt;option value="no" selected&gt;Velg tema&lt;/option&gt;
  &lt;option value="value0" onChange="javascript:theme(0)" onClick="javascript:theme(0)" onFocus="javascript:theme(0)"&gt;value0&lt;/option&gt;
  &lt;option value="value1" onClick="theme(1)"&gt;value1&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;div class="tips" id="theme_0" name="theme_0"&gt;
  &lt;div class="tipsLabel"&gt;Tips:&lt;/div&gt;
  &lt;div class="tipsContent"&gt;
      lorem ipsum
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;div class="tips" id="theme_1"  name="theme_1"&gt;
  &lt;div class="tipsLabel"&gt;Tips:&lt;/div&gt;
  &lt;div class="tipsContent"&gt;
      more lorem ipsum
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>and so on...</p>
  
  <p>Thanx:)</p>