function sidebarVisibility(todo) {
    
    var divAll = document.getElementById("all");
    if (!divAll) {return false;}
    
    if (todo == 'hide') {    
        divAll.setAttribute('class', 'sidebar-hide');
        divAll.setAttribute('className', 'sidebar-hide');
    } else if (todo == 'show') {
        divAll.setAttribute('class', 'sidebar-show');
        divAll.setAttribute('className', 'sidebar-show');
    }
    
    return true;
}

function addSidebarButtons() {
    var divAll = document.getElementById("all");
    if (!divAll) {return false;}
    
    var sidebarShow = document.createElement("DIV");
    sidebarShow.id = "sidebar-show";
    sidebarShow.setAttribute("title", "Show sidebar");
    sidebarShow.onclick = function() { sidebarVisibility('show'); }
    divAll.appendChild(sidebarShow);
    
    var sidebarHide = document.createElement("DIV");
    sidebarHide.id = "sidebar-hide";
    sidebarHide.setAttribute("title", "Hide sidebar");
    sidebarHide.onclick = function() { sidebarVisibility('hide'); }
    divAll.appendChild(sidebarHide);
}

onloads[onloads.length] = "addSidebarButtons();";
