function resetLine(line){ var checkboxes = $$('#matrixTR_'+line+' input[type=checkbox]'); var cbControl = $('matrixRST_'+line); if(cbControl.checked) { checkboxes.each(function(box){ box.checked = !cbControl.checked; }); cbControl.checked = true; } else cbControl.checked = false; } function resetGroup(ident, rstID){ var checkboxes = $$('#qLineTD_'+ident+' input[type=checkbox]'); var cbControl = $(rstID); if(cbControl.checked) { checkboxes.each(function(box){ box.checked = false; box.disabled = true; }); cbControl.checked = true; cbControl.disabled =false; } else { checkboxes.each(function(box){ box.disabled = false; }); cbControl.checked = false; } }