set first check box checked and others disable from checkbox list in clientside
<p>I have a Checkbox list. On the load of a page i want my first checkbox true and others are disable.I need to check only one checkbox from checkbox list and others should be disable.If use unchecked the checked checkbox then others should be enable means allowed only one check box checked.</p>

<p>My javascript code is here but on the load of page its not checked the first checkbox, also i want the id of each checkbox while using checkboxlist.</p>

<pre><code>function CheckOptions(CheckBoxList) {
         var checkboxlist = document.getElementById('CheckBoxList1');

            var checkedCount = 0;
            var options = CheckBoxList.getElementsByTagName('input');                
            for (var i = 0; i &lt; options.length; i++) {
                if (options[i].checked) {                       
                    checkedCount += 1;
                }
            }

            if (checkedCount &gt; 0) {
                for (var j = 0; j &lt; options.length; j++) {
                    if (!options[j].checked)
                        options[j].disabled = true;

                }                }
           else {
                for (var k = 0; k &lt; options.length; k++) {
                    options[k].disabled = false;
                }
            }

    }
</code></pre>
