function expandCategory(categoryId) {
    var childrenUL = document.getElementById("categoryChildren" + categoryId);

    if (childrenUL) {
        childrenUL.style.display = "block";
    }
}


function toggleBoxVisible(id) {
    var box = document.getElementById(id);

    if (box) {
        if (!box.style.display) {
            box.style.display = 'block';
        } else {
            if (box.style.display != 'block') {
                box.style.display = 'block';
            } else {
                box.style.display = 'none';
            }
        }
    }
}

function toggleBoxVisible(id, visible) {
    var box = document.getElementById(id);

    if (box) {
        if (!box.style.display) {
            if (visible) {
                box.style.display = "block";
            } else {
                box.style.display = "none";
            }
        } else {
            if (box.style.display != 'block') {
                box.style.display = 'block';
            } else {
                box.style.display = 'none';
            }
        }
    }
}

function setBoxVisible(id, visible) {
    var box = document.getElementById(id);

    if (box) {
        if (visible) {
            box.style.display = "block";
        } else {
            box.style.display = "none";
        }
    }
}
