6.3.3.xsl源码
1.treefunc.xsl
#foldheader{cursor:hand ;list-style-image:url(/images/fold.gif);padding-left-width:-3}
#foldinglist{list-style-image:url(/images/list.gif);list-left-width:-3}
a:link{color: #051679;text-decoration: none}
a:visited{color: #d91656;text-decoration: none}
a:hover{color: #cc0000;text-decoration: underline}
body{font-size: 10pt;}
var temp_str = thexmltreecookie;
var fl_n = 0;
temp_str = temp_str + "=";
for (i=0;i
temp_str=temp_str+"0:";
}
temp_str = temp_str.substring(0,temp_str.length-1);
fl_n = temp_str.length -17 ;
if ((document.cookie == )||(wm_readcookie(thexmltreecookie).length != fl_n)){
document.cookie = temp_str;
}
else {
var temp_s = wm_readcookie("thexmltreecookie").split(":");
for (i=0;i
if (temp_s][i] == 0){
var tb =0;
for (j=0;tb < 1;j++){
if (document.all[j] == foldinglist[i]){
tb = 1;
document.all[j-1].style.liststyleimage="url(/images/fold.gif)";
}
}
foldinglist[i].style.display="none";
}
else {
var tb =0;
for (j=0;tb < 1;j++){
if (document.all[j] == foldinglist[i]){
tb = 1;
document.all[j-1].style.liststyleimage="url(/images/open.gif)";
}
}
foldinglist[i].style.display="";
}
}
}
]]>
img1=new image()
img1.src="/images/fold.gif"
img2=new image()
img2.src="/images/open.gif"
function change(){
if(!document.all)
return;
var temp_ss =wm_readcookie("thexmltreecookie").split(":");
var temp_s = thexmltreecookie;
temp_s = temp_s + =;
if (event.srcelement.id=="foldheader") {
var srcindex = event.srcelement.sourceindex;
var nested = document.all][srcindex+1];
for (i=0;i
if (foldinglist[i] == nested){
var clickid;
clickid = "clickid="+event.srcelement.no;
document.cookie =clickid;
//alert(document.cookie);
if (temp_ss[i]==0){
temp_ss[i]=1;
}
else {
temp_ss[i]=0;
}
}
}
for (i=0;i
temp_s =temp_s+temp_ss[i]+:;
}
temp_s = temp_s.substring(0,temp_s.length-1);
document.cookie = temp_s;
//var clickid;
//clickid = "clickid="+nested;
//document.cookie = clickid;
//alert(document.cookie);
if (nested.style.display=="none") {
nested.style.display=
event.srcelement.style.liststyleimage="url(/images/open.gif)"
}
else {
nested.style.display="none"
event.srcelement.style.liststyleimage="url(/images/fold.gif)"
}
top.topframe.location.reload();
}
}
document.οnclick=change;
function wm_readcookie(name){
//如果没有cookie则返回false或者取得值并返回该值
if(document.cookie == ){
return false;
}
else {
return unescape(wm_getcookievalue(name));
}
}
function wm_getcookievalue(name){
var firstchar,lastchar;
var thebigcookie = document.cookie;
firstchar = thebigcookie.indexof(name);
if (firstchar != -1){
firstchar += name.length + 1;
// find the end of the value string (i.e. the next ;).
lastchar = thebigcookie.indexof(;, firstchar);
if(lastchar == -1) lastchar = thebigcookie.length;
// return the value.
return thebigcookie.substring(firstchar, lastchar);
}
else {
// if there was no cookie, return false.
return false;
}
}
]]>
foldheader
foldheader
foldheader
foldheader
foldheader
foldheader
foldheader
foldheader