﻿function getCookie(Name) {
    var search = Name + "=";
    if (document.cookie.length > 0) {
        offset = document.cookie.indexOf(search);
        if (offset != -1) {
            offset += search.length;
            end = document.cookie.indexOf(";", offset);
            if (end == -1)
                end = document.cookie.length;
            return unescape(document.cookie.substring(offset, end));
        }
        else {
            return "";
        }
    }
    return "";
}
function SetCookie(n, v) {
    var exp = new Date();
    exp.setTime(exp.getTime() + (365 * 24 * 60 * 60 * 1000));
    document.cookie = n + "=" + v + ";expires=" + exp.toGMTString();
}
function $(obj) {
    return document.getElementById(obj);
}

function setCSS(n1) {
    $('cc5CSS').href = '/img2010/s' + n1 + '.css';
    SetCookie("cc5skin", n1);
}

function loadCSS(sp) {
    var n1 = getCookie("cc5skin");
    if (n1 == "")
        n1 = "1";
    document.write('<link href="/img2010/s' + n1 + '.css" type="text/css" rel="stylesheet" id="cc5CSS" />');
}
loadCSS(0);