let closeNav = document.getElementById('CLOSE');
let menuBtn = document.getElementById('MenuButton');
let menuWindow = document.getElementById('Menu');
let sidebarBtn = document.getElementById('SidebarButton');
let sidebarWindow = document.getElementById('Sidebar');
let footerBtn = document.getElementById('FooterButton');
let footerMenu = document.getElementById('FooterMenu');

if(document.getElementById('closeMessages')){ document.getElementById('closeMessages').onclick = () => document.getElementById('Messages').remove(); }

menuBtn.addEventListener('click', (e) => {

    menuWindow.style.display = 'block';
    closeNav.style.display = 'block';

});

sidebarBtn.addEventListener('click', (e) => {

    sidebarWindow.style.display = 'block';
    closeNav.style.display = 'block';

});

footerBtn.addEventListener('click', (e) => {

    footerMenu.style.display = 'block';
    closeNav.style.display = 'block';

});

closeNav.addEventListener('click', (e) => {

    menuWindow.style.display = 'none';
    sidebarWindow.style.display = 'none';
    footerMenu.style.display = 'none';
    closeNav.style.display = 'none';

});
