hide multiple tr, div with javascript without jquery
<p>How can I hide multiple tables based on a result from a checkbox.</p>

<pre><code>&lt;input type="checkbox" name="t_show" value="1"  checked="checked" onchange="visible_checkbox(this.id, 't_settings'); update_preview();" id="t_show"&gt; 
</code></pre>

<p>Clicking on this div should mean that all the occurring elements with the id t_settings should be hidden.</p>

<p>javascript:</p>

<pre><code> function visible_checkbox(x, y) {
        var v = document.getElementById(x).checked;
        if(v == 1) {
            show(y);
        } else {
            hide(y);
        }
    }
</code></pre>

<p>Thanks guys.</p>
