// JavaScript Document

// State variables to keep track of current tab and folder
var currentTab = "Tab1";
var currentFolder = "Folder1";

// Function to switch tabs and folders
function turnOn(newTab, newFolder) {
    if (currentTab != newTab) {
        // Adjust the background colors for the tabs
        var thisTab = document.getElementById(newTab);
        thisTab.style.backgroundColor = "#6699CC";
        var oldTab = document.getElementById(currentTab);
        oldTab.style.backgroundColor = "#E7E7E7";

        // Make the new tab the current tab
        currentTab = newTab;

        // Adjust the visibility and background color for the folders
        var thisFolder = document.getElementById(newFolder);
        thisFolder.style.visibility = "visible";
        thisFolder.style.backgroundColor = "#E7F3FF";
        var oldFolder = document.getElementById(currentFolder);
        oldFolder.style.visibility = "hidden";

        // Make the new folder the current folder
        currentFolder = newFolder;
    }
}