﻿//Content moved to MasterJS.js

    function fn_selectOnly(CheckBoxID, ParentID) {

        CheckBoxID.checked = true

        var collection = document.getElementById(ParentID).getElementsByTagName('INPUT');
        for (var x = 0; x < collection.length; x++) {                     
            if (collection[x].id != CheckBoxID.id ){
                collection[x].checked = false
            }
        }
     } 
     
         
     function fn_selectAll(CheckBoxID, ParentID) {
         if (CheckBoxID.checked == true) {
             checkByParent(ParentID, true)
         }
         else {
             checkByParent(ParentID, false)
         }
     }
     
     
     function checkByParent(aId, aChecked) {
         var collection = document.getElementById(aId).getElementsByTagName('INPUT');
         for (var x = 0; x < collection.length; x++) {
             if (collection[x].type.toUpperCase() == 'CHECKBOX')
                 collection[x].checked = aChecked;
         }
     }


