﻿function showElem(thisElem) {
    thisElem.style.display = "inline";
}

function hideElem(thisElem) {
    thisElem.style.display = "none";
}

function toggleElemVisibility(elemID) {
    var thisElem = document.getElementById(elemID);
    if (thisElem.style.display == "none") {
        showElem(thisElem);
    }
    else {
        hideElem(thisElem);
    }
}

function checkAll(elemId,origChkBox) {
    var checkBoxList = document.getElementById(elemId);
    var inputRefArray = checkBoxList.getElementsByTagName('input');
    var ChkBox = document.getElementById(origChkBox);

    for (var i = 0; i < inputRefArray.length; i++) {
        var inputRef = inputRefArray[i];
        if (inputRef.type.substr(0, 8) == 'checkbox') {
            inputRef.checked = ChkBox.checked;
        }
    }

}
