Javascript: Remove checked status from disabled input on load (already checked)
<p>On load, the script is not un-checking the disabled checkboxes, I have tried everything. I have even tried running this code from Chrome Console, and it is working, but not in normal ways. Where is the error? (Note: I'm using prototype framework library) Javascript: </p>

<pre><code>document.observe("dom:loaded", function() {
    $(document.body).select('input').each(function(element) {
        init();
        element.observe('click', function(element) {
            init();
        });
    });
    loopGroup1();
    loopGroup3();
    loopGroup4();
});

function init() {
    $(document.body).select('input').each(function(element) {
        if (!element.checked) {
            element.up().removeClassName('yes');
        } else {
            element.up().addClassName('yes');
        }
        if (element.disabled &amp;&amp; element.checked) {
            element.checked = !element.checked;
            element.up().removeClassName('yes');
        }

    });
}
</code></pre>
