function switchall(theElement) {
     var theForm = theElement.form, i = 0;
     while (theForm[i].type == 'checkbox' && theForm[i].name != 'checkall') {
      theForm[i].checked = theElement.checked;
      i++;
     }
    }
