more javascript run-ins
<p>I have a list of checkboxes. Each have a class, either East or West. I have 2 links currently, Select All, Select None. I'm making 2 new links, Select East, Select West. I'm using the following javascript to select the checkboxes by class:</p>

<pre><code>&lt;script language="JavaScript"&gt;
        function checkAll(theForm, cName, status) {
        for (i=0,n=theForm.elements.length;i&lt;n;i++)
          if (theForm.elements[i].className.indexOf(cName) !=-1) {
            theForm.elements[i].checked = status;
          }
        }

&lt;/script&gt;
</code></pre>

<p>Here is a copy of the onClick:</p>

<pre><code>&lt;a href="" onclick="$('sites').select('input[type=checkbox]').each(function(e){if(!e.checked)e.click();}); return false;"&gt;Select All&lt;/a&gt; | 
&lt;a href="" onclick="$('sites').select('input[type=checkbox]').each(function(e){if(e.checked)e.click();}); return false;"&gt;Select None&lt;/a&gt; | 
&lt;a href="" onclick="checkAll(document.getElementById('selectForm'), 'East', this.checked);"&gt;East&lt;/a&gt; | 
&lt;a href="" onclick="checkAll(document.getElementById('selectForm'), 'West', this.checked);"&gt;West&lt;/a&gt;
</code></pre>

<p>The Javascript is not working and reloads my page after clicking my new links. Help please :(</p>
