function changeFold(title){    var list = new Array(10);    list[0] = "newentry";    list[1] = "comment";    list[2] = "trackback";    list[3] = "qrcode";    list[4] = "sstyle";    list[5] = "ssearch";    list[6] = "category";    list[7] = "monthly";    list[8] = "introduction";    list[9] = "counter";    for (i = 0; i < list.length; i++) {        var title1 = Array(list[i], 'name').join('');        var title2 = document.getElementById(title1);        var list1 = Array(list[i], 'list').join('');        var list2 = this.document.getElementById(list1);        if(title == "Original"){            if(title2){                title2.style.borderBottom = 'none';            }        } else {            if(list2){                if(list2.style.display == 'none'){                    title2.style.borderBottom = 'none';                } else {                    title2.style.borderBottom = '1px solid #666699';                }                if(list[i] == 'ssearch' || list[i] == 'qrcode' || list[i] == 'counter'){                    title2.style.borderBottom = '1px solid #666699';                }            }        }    }    return;}function setActiveStyleSheet2(title) {  var i, a, main;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {if(a.getAttribute("rel")){    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {      a.disabled = true;      if(a.getAttribute("title") == title) a.disabled = false;    }}  }  return;}function setActiveStyleSheet(title) {  var i, a, main;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {if(a.getAttribute("rel")){    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {      a.disabled = true;      if(a.getAttribute("title") == title) a.disabled = false;    }}  }  changeFold(title);  // add 2005.07.15  createCookie("p903tvistyle", title, 365);  return;}function getActiveStyleSheet() {  var i, a;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");  }  return null;}function getPreferredStyleSheet() {  var i, a;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {    if(a.getAttribute("rel").indexOf("style") != -1       && a.getAttribute("rel").indexOf("alt") == -1       && a.getAttribute("title")       ) return a.getAttribute("title");  }  return null;}function createCookie(name,value,days) {  if (days) {    var date = new Date();    date.setTime(date.getTime()+(days*24*60*60*1000));    var expires = "; expires="+date.toGMTString();  }  else expires = "";  document.cookie = name+"="+value+expires+"; path=/";}function readCookie(name) {  var nameEQ = name + "=";  var ca = document.cookie.split(';');  for(var i=0;i < ca.length;i++) {    var c = ca[i];    while (c.charAt(0)==' ') c = c.substring(1,c.length);    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);  }  return null;}window.onload = function(e) {  var cookie = readCookie("mobile");  var title = cookie ? cookie : getPreferredStyleSheet();  setActiveStyleSheet(title);}window.onunload = function(e) {  var title = getActiveStyleSheet();  createCookie("mobile", title, 365);}var cookie = readCookie("mobile");var title = cookie ? cookie : getPreferredStyleSheet();setActiveStyleSheet(title);