this jquery solution works:
in the html head:
<link to jquery obviously...>
<script type="text/javascript">
jQuery.fn.checkAll = function(name,flag){
var selector = ':checkbox'+(name?'[@name='+name+']':'');
$(selector,this).attr('checked',flag);
}
</script>
on the page:
<input type="button" value="Select all pages" onclick="$('#pdflist').checkAll('', 1);"/>
<input type="button" value="Deselect all" onclick="$('#pdflist').checkAll('', 0);"/>
the sample above selects all the checkboxes on the page that are in the form : id='pdflist'
google the script name and you can add parameters to limit the selection of checkboxes by name etc
(works with square brackets)
edit: dang, beaten to it - must have taken me ten minutes to write that and miss entire conversation!