for each JavaScript Support in IE?
<p>I have this code:</p>

<pre><code>&lt;script&gt;
function toggle(source) {

  checkboxes = document.getElementsByName('DG1');
  for each(var checkbox in checkboxes)
    checkbox.checked = source.checked;

  checkboxes = document.getElementsByName('DG2');
  for each(var checkbox in checkboxes)
    checkbox.checked = source.checked;

  checkboxes = document.getElementsByName('DG3');
  for each(var checkbox in checkboxes)
    checkbox.checked = source.checked;

  checkboxes = document.getElementsByName('DG4');
  for each(var checkbox in checkboxes)
    checkbox.checked = source.checked;

  checkboxes = document.getElementsByName('DG5');
  for each(var checkbox in checkboxes)
    checkbox.checked = source.checked;
}
&lt;/script&gt;

&lt;input type="checkbox" onClick="toggle(this)" /&gt;Select All&lt;br/&gt;

&lt;form method=POST action="DGUsageServlet"&gt;
    &lt;input type="checkbox" name="DG1"&gt;DG1&lt;/input&gt;
    &lt;input type="checkbox" name="DG2"&gt;DG2&lt;/input&gt;
    &lt;input type="checkbox" name="DG3"&gt;DG3&lt;/input&gt;
    &lt;input type="checkbox" name="DG4"&gt;DG4&lt;/input&gt;
    &lt;input type="checkbox" name="DG5"&gt;DG5&lt;/input&gt;
&lt;/form&gt;
</code></pre>

<p>How can I make the above script to work in IE?</p>
