title: Control javascript hide/show div with radio controls without jquery
body: <p>The code below doesn't seem to work</p>
  
  <p>//javascript</p>
  
  <pre><code>function t_show() {
      if(document.getElementById("t_show").checked == true){
          if(document.getElementById("t_show").value == 1) {
              showDiv("t_settings");
          }
      } else {
          hideDiv("t_settings");
      }
  }
  
  function show(show){
      var s = document.getElementById(show);
      if(!s) return true;
      s.style.display="";
      return true;
  }
  
  function hide(hide){
      var h = document.getElementById(hide);
      if(!h) return true;
      h.style.display="none";
      return true;
  }
  </code></pre>
  
  <p>//html</p>
  
  <pre><code>Text show:
  &lt;input type="radio" name="t_show" value="1"  checked="checked" onchange="t_show(); update_preview();" id="t_show"&gt;Yes 
  &lt;input type="radio" name="t_show" value="0"                    onchange="t_show(); update_preview();" id="t_show"&gt;No 
  
  &lt;div id="t_settings"&gt;This content is to be shown if the show text is enabled.&lt;/div&gt;
  </code></pre>