﻿function switchVisible(source, visibleId) {
    var panelsParent = document.getElementById('featurePanels'); var panel; var button; source.className = 'featuresButtonSelected'; button = DOMhelp.firstSibling(source); while (button) {
        if (button.id != source.id)
        { button.className = "featuresButton"; button.style.backgroundColor = "#E7E1CB"; }
        button = DOMhelp.closestSibling(button, 1);
    }
    panel = DOMhelp.firstChild(panelsParent); while (panel) {
        if (panel.id == visibleId)
        { panel.style.display = "block"; }
        else
        { panel.style.display = "none"; }
        panel = DOMhelp.closestSibling(panel, 1);
    }
}
function setHoverStyle(button) {
    if (button) {
        button.style.cursor = "pointer"; if (button.className != "featuresButtonSelected")
        { button.style.backgroundColor = "#C1BFAF"; }
    }
}
function setNonHoverStyle(button) {
    if (button) {
        button.style.cursor = ""; if (button.className != "featuresButtonSelected")
        { button.style.backgroundColor = "#E7E1CB"; }
    }
}
function setHoverStyleSc(button) {
    if (button)
    { button.style.cursor = "pointer"; }
}
