function UpdateMarkings(event) {
console.log(event);
var ChangeType = event.checked;
var listOfChildren = event.parentElement.parentElement.getElementsByClassName(“checkboxClass”);
for (var i = 0; i < listOfChildren.length; i++) {
listOfChildren[i].checked = ChangeType;
}
//Update Indeterminates
var allCheckboxClasses = document.getElementsByClassName("checkboxClass");
for (var i = allCheckboxClasses.length - 1; i >= 0; i–) {
var allChildrenTypes = allCheckboxClasses[i].parentElement.parentElement.getElementsByClassName(“checkboxClass”);
var checkCount = 0;
for (var j = 1; j < allChildrenTypes.length; j++) {
if (allChildrenTypes[j].checked) checkCount++;
}
if (allChildrenTypes.length > 1 && (checkCount + 1) == allChildrenTypes.length) {
allCheckboxClasses[i].checked = true;
allCheckboxClasses[i].indeterminate = false;
} else
if (checkCount > 0) {
allCheckboxClasses[i].checked = false;
allCheckboxClasses[i].indeterminate = true;
} else
allCheckboxClasses[i].indeterminate = false;
}
}