function MM_findObj(f, e) {
    var c, b, a;
    if (!e) {
        e = document
    }
    if ((c = f.indexOf("?")) > 0 && parent.frames.length) {
        e = parent.frames[f.substring(c + 1)].document;
        f = f.substring(0, c)
    }
    if (!(a = e[f]) && e.all) {
        a = e.all[f]
    }
    for (b = 0; !a && b < e.forms.length; b++) {
        a = e.forms[b][f]
    }
    for (b = 0; !a && e.layers && b < e.layers.length; b++) {
        a = MM_findObj(f, e.layers[b].document)
    }
    if (!a && e.getElementById) {
        a = e.getElementById(f)
    }
    return a
}
function MM_showHideLayers() {
    var c, e, a, d, b = MM_showHideLayers.arguments;
    for (c = 0; c < (b.length - 2); c += 3) {
        if ((d = MM_findObj(b[c])) != null) {
            a = b[c + 2];
            if (d.style) {
                d = d.style;
                a = (a == "show") ? "visible" : (a == "hide") ? "hidden" : a
            }
            if (a != "bool") {
                d.visibility = a
            } else {
                if (d.visibility == "visible") {
                    d.visibility = "hidden"
                } else {
                    if (d.visibility == "hidden" || d.visibility == "") {
                        d.visibility = "visible"
                    }
                }
            }
        }
    }
}
function setActiveStyleSheet(f, c) {
    var e, d, b;
    for (e = 0;
    (d = document.getElementsByTagName("link")[e]); e++) {
        if (d.getAttribute("cat") == c && d.getAttribute("rel").indexOf("style") != -1 && d.getAttribute("title")) {
            d.disabled = true;
            if (d.getAttribute("cat") == c && d.getAttribute("title") == f) {
                d.disabled = false
            }
        }
    }
    setActiveStyle(f, c)
}
function setActiveStyle(f, b) {
    var e, c;
    for (e = 0;
    (c = document.getElementsByTagName("a")[e]); e++) {
        if (c.getAttribute("cat") == b && c.getAttribute("id")) {
            if (c.getAttribute("id") == f) {
                c.setAttribute("class", "here")
            } else {
                c.setAttribute("class", "")
            }
        }
    }
    for (e = 0;
    (c = document.getElementsByTagName("select")[e]); e++) {
        if (c.getAttribute("cat") == b) {
            var d = c.options;
            for (e = 0; e < d.length; e++) {
                if (d[e].value == f) {
                    d[e].selected = true
                }
            }
        }
    }
}
function getActiveStyleSheet(b) {
    var d, c;
    for (d = 0;
    (c = document.getElementsByTagName("link")[d]); d++) {
        if (c.getAttribute("cat") == b && c.getAttribute("rel").indexOf("style") != -1 && c.getAttribute("title") && !c.disabled) {
            return c.getAttribute("title")
        }
    }
    return null
}
function getPreferredStyleSheet(b) {
    var d, c;
    for (d = 0;
    (c = document.getElementsByTagName("link")[d]); d++) {
        if (c.getAttribute("cat") == b && c.getAttribute("rel").indexOf("style") != -1 && c.getAttribute("rel").indexOf("alt") == -1 && c.getAttribute("title")) {
            return c.getAttribute("title")
        }
    }
    return null
}
function createCookie(c, d, e) {
    if (e) {
        var b = new Date();
        b.setTime(b.getTime() + (e * 24 * 60 * 60 * 1000));
        var a = "; expires=" + b.toGMTString()
    } else {
        a = ""
    }
    document.cookie = c + "=" + d + a + "; path=/"
}
function readCookie(b) {
    var e = b + "=";
    var a = document.cookie.split(";");
    for (var d = 0; d < a.length; d++) {
        var f = a[d];
        while (f.charAt(0) == " ") {
            f = f.substring(1, f.length)
        }
        if (f.indexOf(e) == 0) {
            return f.substring(e.length, f.length)
        }
    }
    return null
}
function setAllStyleCat() {
    var d, b;
    for (d = 0;
    (b = document.getElementsByTagName("styleSwitcher")[d]); d++) {
        if (b.getAttribute("cat")) {
            var c = readCookie(b.getAttribute("cat"));
            var e = c ? c : getPreferredStyleSheet(b.getAttribute("cat"));
            setActiveStyleSheet(e, b.getAttribute("cat"))
        }
    }
}
function createAllStyleCatCookie() {
    var c, b;
    for (c = 0;
    (b = document.getElementsByTagName("styleSwitcher")[c]); c++) {
        if (b.getAttribute("cat")) {
            var d = getActiveStyleSheet(b.getAttribute("cat"));
            createCookie(b.getAttribute("cat"), d, 365)
        }
    }
}
window.onload = function (a) {
    setAllStyleCat()
};
window.onunload = function (a) {
    createAllStyleCatCookie()
};
setAllStyleCat();
