function showSubmenu(id, show, perm) {
    showBlock(id, show);
    if (perm) {
        document.getElementById(id).parentNode.onmouseout = function() {}
    }
}

function switchVisibility(id) {
    visible = true;
    if (document.getElementById(id).style.display == 'none') {
        visible = false;
    }
    showBlock(id, !visible);
}

function showBlock(id, show) {
    document.getElementById(id).style.display = show ? 'block' : 'none';
}




