BodyOffset() {
    const topMenu = document.getElementById("topmenu");
    const mainBody = document.getElementById("main");

    if (topMenu && mainBody) {
        const topMenuHeight = topMenu.offsetHeight;
        mainBody.style.marginTop = `${topMenuHeight}px`;
    }
}

// Apply the adjustment on page load and window resize
window.addEventListener("DOMContentLoaded", adjustMainBodyOffset);
window.addEventListener("resize", adjustMainBodyOffset);
</script>
</body>
</html>
