function setActiveStyleSheet(title) {
        var i, a, main;
        for (i = 0; (a = document.getElementsByTagName("link")[i]); i++) {
            if (a.getAttribute("rel").indexOf("style") !== -1 && a.getAttribute("title")) {
                a.disabled = true;
                if (a.getAttribute("title") === title) {
                    a.disabled = false;
                }
            }
        }
    }
http://www.alistapart.com/articles/alternate/

    var cookie = readCookie("style");
    var title = cookie ? cookie : getPreferredStyleSheet();
    setActiveStyleSheet(title);