//
// NAVBAR, ONLY FOR DESKTOP VIEW
// Set the CSS classes (color of text and background, and hover color) of the menu entries depending on what page is currently shown
//

// Get the name of the page currently shown
var fileName = location.pathname.split("/").slice(-1);
var fileNameStr = new String(fileName);
var pageName = fileNameStr.slice(0, fileNameStr.length -4);

// Change the CSS classes of the menu entry that correspond to the page currently shown
document.getElementById(pageName).className = "qet-gray w3-left-align";

// Change the CSS class of the dropdown menu entry of the page currently shown
if (pageName == "features" || pageName == "about" || pageName == "gallery" || pageName == "contact" || pageName == "support-us") {
    document.getElementById("home").className = "qet-gray";
    }
if (pageName == "dl-win" || pageName == "dl-lin" || pageName == "dl-mac" || pageName == "dl-source") {
    document.getElementById("download").className = "qet-gray";
    }
if (pageName == "elmtrepo" || pageName == "dxftoqet" || pageName == "miscel") {
    document.getElementById("resources").className = "qet-gray";
    }
if (pageName == "manual" || pageName == "tutorials" || pageName == "wiki") {
    document.getElementById("help").className = "qet-gray";
    }


//
// OVERLAY SIDENAV, ONLY FOR TABLETS AND SMART PHONES
// Set the CSS classes (color of text and background, and hover color) of the menu entries depending on what page is currently shown
//

// Add the string OSV (Overlay SideNav) to the name of the page currently shown
var pageNameOSV = pageName + "OSV";

// Change the CSS classes of the menu entry that correspond to the page currently shown
if (pageNameOSV == "newsOSV" || pageNameOSV == "bugtrackerOSV") {
    document.getElementById(pageNameOSV).className = "qet-white";
    } else {
    document.getElementById(pageNameOSV).className = "qet-white qet-padding-medium";
    }
