function invertAll(field) // Invert all selections of a checkbox within a form, // just pass it the name of the checkbox field // e.g. onClick=”invertAll(document.frmTest.checkboxName)”; { if (typeof(field.length) == “undefined”) { if(field.checked == 1){field.checked = 0;} else {field.checked = 1;}