Show/hide div when checkbox is selected
<p>I would like to show/hide a div when a single checkbox is selected. It currently works with "Select all" but I can't get it to work with a single checkbox. Here's the code for "Select All":</p>

<p><strong>JS:</strong></p>

<pre><code>&lt;script language='JavaScript'&gt; 
var checkboxcount = 1;

function doCheckOne() {
    if(checkboxcount == 0) {
        with (document.messageform) {
            for (var i=0; i &lt; elements.length; i++) {
                if (elements[i].type == 'checkbox') {
                    elements[i].checked = false;
                document.getElementById('mail_delete_button').style.display = "none";
                }
            }
            checkboxcount = checkboxcount + 1;
        }
    } else
    with (document.messageform) {
        for (var i=0; i &lt; elements.length; i++) {
            if (elements[i].type == 'checkbox') {
                elements[i].checked = true;
            document.getElementById('mail_delete_button').style.display = "block";
            }
        }
    checkboxcount = checkboxcount - 1;
    }
}
&lt;/script&gt;
</code></pre>

<p><strong>HTML:</strong></p>

<pre><code>&lt;a href="javascript:void(0);" onclick="doCheckAll();this.blur();"&gt;Select all&lt;/a&gt;
&lt;div id="mail_delete_button" style="display: none;"&gt;&lt;/div&gt;
</code></pre>

<p>I'd like to display the div "mail_delete_button" when a single checkbox is selected and hide it when there's nothing checked. Note: My html/input field is in the form "messageform" This is my input code:</p>

<pre><code>&lt;input type='checkbox' name='delete_convos[]' value='{$pms[pm_loop].pmconvo_id}'&gt;
</code></pre>

<p>Any help would be greatly appreciated! Thanks! :)</p>
