() {
    const navbar = document.getElementById("theSideNav");
    const scrollPosition = navbar.scrollTop;
    localStorage.setItem("navbarScrollPosition", scrollPosition);
}

function restoreSidenavScrollPosition() {
    const navbar = document.getElementById("theSideNav");
    const savedPosition = localStorage.getItem("navbarScrollPosition");
    if (savedPosition !== null) {
        navbar.scrollTop = parseInt(savedPosition, 10);
    }
}

function adjustSidenavOffset() {
    const topMenu = document.ge