var currentTab = "tab1";
var currentFolder = "details1";
function turnOn(newTab, newFolder) {
    if (!document.getElementById) return false;
    if (currentTab != newTab) {
        var thisTab = document.getElementById(newTab);
        var oldTab = document.getElementById(currentTab);
        currentTab = newTab;
        thisTab.style.color = "#999999";
        thisTab.style.fontWeight = "bold";
        thisTab.style.textDecoration = "none";
        oldTab.style.color = "#336699";
        oldTab.style.fontWeight = "normal";
        oldTab.style.textDecoration = "underline";
        var thisFolder = document.getElementById(newFolder);
        thisFolder.style.display = "block";
        thisFolder.style.position = "relative";
        var oldFolder = document.getElementById(currentFolder);
        oldFolder.style.display = "none";
        oldFolder.style.position = "absolute";
        currentFolder = newFolder;
    }
};
function showCart(liCart, newCart) {
    if (!document.getElementById) return false;
    var thisList = document.getElementById(liCart);
    var thisCart = document.getElementById(newCart);
    if (thisCart.style.display != "inline-block") {
        thisCart.style.display = "inline-block";
        thisList.style.background = "url(/content/img/backMinicart.gif) no-repeat scroll bottom right";

    } else {
        thisCart.style.display = "none";
        thisList.style.background = "url(/content/img/backMinicart.gif) no-repeat scroll top right";
    }
}
var currentLink = "link1";
var currentView = "view1";
function switchView(newLink, newView) {
    if (!document.getElementById) return false;
    if (currentLink != newLink) {
        var thisLink = document.getElementById(newLink);
        var oldLink = document.getElementById(currentLink);
        currentLink = newLink;
        thisLink.style.color = "#999999";
        thisLink.style.fontWeight = "bold";
        thisLink.style.textDecoration = "none";
        oldLink.style.color = "#336699";
        oldLink.style.fontWeight = "normal";
        oldLink.style.textDecoration = "underline";
        var thisView = document.getElementById(newView);
        thisView.style.display = "block";
        thisView.style.position = "relative";
        var oldView = document.getElementById(currentView);
        oldView.style.display = "none";
        oldView.style.position = "absolute";
        currentView = newView;
    }
};

function switchClass(idList, className) {
    var id = idList.split(",");
    var len = id.length;
    for (i = 0; i < len; i++) {
        document.getElementById(id[i]).className = className;
    }
};

