﻿if(viewCategoryHistory&&categoryId&&categoryName){setCategoryToCookie(categoryId,categoryName)}displayCategoryHistory();function displayCategoryHistory(){if(viewCategoryHistory==null){return}var innerContentHead="";var categoryInCookie=Zhishi.Cookie.getCookie("ww_categoryHistory");var innerContent="";if(categoryInCookie==null||categoryInCookie==""){innerContent="<li>\u6682\u65e0\u5386\u53f2</li>"}else{var aCategory=categoryInCookie.split("*");for(var ti=aCategory.length-1;ti>=0;ti--){if(aCategory[ti].length==0){continue}var categoryInfo=eval("("+aCategory[ti]+")");innerContent+='<li><a href="/z/ShowCategory.e?sp='+encodeURIComponent(categoryInfo.cid)+'&ch=fl.llls">'+categoryInfo.cname+"</a></li>"}innerContent=innerContent}viewCategoryHistory.innerHTML=innerContent;viewCategoryHistory.style.display="block"}function setCategoryToCookie(f,e){if(viewCategoryHistory==null||e==null){return}var a="";var g="{cid:"+f+',cname:"'+e+'"}';var h=Zhishi.Cookie.getCookie("ww_categoryHistory");if(h==""){Zhishi.Cookie.setCookie("ww_categoryHistory",g,365*24)}else{var d=h.split("*");if(d.length>0){var c=0;if(d.length==10){var b=false;for(c=1;c<d.length;c++){if(d[c]==g){b=true;continue}a+=d[c]+"*"}if(b){a=d[0]+"*"+a+g}else{a+=g}}else{for(c=0;c<d.length;c++){if(d[c]==g){continue}a+=d[c]+"*"}a+=g}}Zhishi.Cookie.setCookie("ww_categoryHistory",a,365*24)}displayCategoryHistory()}function clearHistory(){Zhishi.Cookie.delCookie("ww_categoryHistory");displayCategoryHistory()};
