Below are the JavaScripts
<a href="" onClick="document.forms[0].d.checked = true; for(i=0; i<document.forms[0].d.length; i++) { document.forms[0].d.checked = true; } return false">Select all</a>
<a href="" onClick="document.forms[0].d.checked = !document.forms[0].d.checked; for(i=0; i<document.forms[0].d.length; i++) { document.forms[0].d[i].checked = !document.forms[0].d[i].checked; } return false">Invert selection</a>
I was hoping for 'd' to be an array when it arrived in php (as Javascript seems to see it as one), but perhaps thats wishfull thinking, I guess im going to need a new javascript so that I can allocate unique names to the check boxes.