// A simple script to mark / unmark all check boxes on the page
var checkflag = "false";
function check(field) {


if (checkflag == "false") {
 if(typeof(field[0]) == "undefined") {
  field.checked = true;
  CCA(field);
 } else {
  for (i = 0; i < field.length; i++) {
   field[i].checked = true;
   CCA(field[i]);
  }
 }
 checkflag = "true";
 return "Unmark all";
}
else {
 if(typeof(field[0]) == "undefined") {
  field.checked = false;
  CCA(field);
 } else {
  for (i = 0; i < field.length; i++) {
   field[i].checked = false;
   CCA(field[i]);
  }
 }
 checkflag = "false";
 return "Mark all";
}
}
