<!--
function getCookie(name) {
    var strCookie=document.cookie;
    var arrCookie=strCookie.split("; ");
    for(var i=0;i<arrCookie.length;i++) {
        var arr=arrCookie[i].split("=");
        if(arr[0]==name)return arr[1];
    }
    return "";
}

var arrCSS=[
    ["<img src='http://www.c365.com/cmsresource/2009style/images/yellow.gif' alt='默认'' style='padding:4px 0px 0px 0px;'>","Orange.css"],
    ["<img src='http://www.c365.com/cmsresource/2009style/images/red.gif'' alt='红色'' style='padding:4px 0px 0px 0px;'>","reds.css"],
    ["<img src='http://www.c365.com/cmsresource/2009style/images/blue.gif' alt='蓝色'' style='padding:4px 0px 0px 0px;'>","blues.css"],
    ["<img src='http://www.c365.com/cmsresource/2009style/images/green.gif' alt='绿色'' style='padding:4px 0px 0px 0px;'>","greens.css"]
    ];

// *** function to replace href="#" ***
function v(){
    return;
}
// *** Cookies ***
function writeCookie(name, value) { 
    exp = new Date(); 
    exp.setTime(exp.getTime() + (86400 * 1000 * 30));
    document.cookie = name + "=" + escape(value) + "; expires=" + exp.toGMTString() + "; path=/"; 
} 
function readCookie(name) { 
    var search; 
    search = name + "="; 
    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 "";
    }
}


////////////////////////////////////
// StyleSheet
////////////////////////////////////
function writeCSSLinks(){
  for(var i=0;i<arrCSS.length;i++){
    document.write('<a href="#" onclick="setStyleSheet(\''+ arrCSS[i][1] +'\');return false;">'+ arrCSS[i][0] +'</a>');
  }
}
function setStyleSheet(strCSS){
  var objs=document.getElementById("cssSkinLink");
  var cssurl = "http://www.c365.com/cmsresource/2009style/css/" + strCSS;
  //var cssurl = "css/" + strCSS;
  if (strCSS.length == 0)
  	cssurl += "Orange.css"; 
  objs.href = cssurl;
  writeCookie("cnlife365",strCSS);
}

setStyleSheet(readCookie("cnlife365"));
//-->