📄 cnkclass.js
字号:
a.ibullets_apply_to = "parent" //parent, non-parent, all
a.ibullets_main_image = "/skin/cnk/main_plus.gif";
a.ibullets_main_image_active = "/skin/cnk/main_plus_active.gif";
a.ibullets_main_image_hover = "/skin/cnk/main_plus_hover.gif";
a.ibullets_main_image_width = 13;
a.ibullets_main_image_height = 13;
a.ibullets_main_position_x = -15;
a.ibullets_main_position_y = -6;
a.ibullets_main_align_x = "right"
a.ibullets_main_align_y = "middle"
a.ibullets_sub_image = "/skin/cnk/sub_plus.gif";
a.ibullets_sub_image_active = "/skin/cnk/sub_plus_active.gif";
a.ibullets_sub_image_hover = "/skin/cnk/sub_plus_hover.gif";
a.ibullets_sub_image_width = 5;
a.ibullets_sub_image_height = 5;
a.ibullets_sub_position_x = -10;
a.ibullets_sub_position_y = -3;
a.ibullets_sub_align_x = "left"
a.ibullets_sub_align_y = "middle"
//tree_menu.js
cnkad.br_navigator=navigator.userAgent.indexOf("Netscape")+1;cnkad.br_version=parseFloat(navigator.vendorSub);cnkad.br_oldnav=cnkad.br_navigator&&cnkad.br_version<7.1;cnkad.tree=new Object();if(cnkad.bvis.indexOf("cnk_tree_item_click(b.cdiv);")==-1){cnkad.bvis+="cnk_tree_item_click(b.cdiv);";cnk_tree_init_styles();}if(window.attachEvent)window.attachEvent("onload",cnk_tree_init);else if(window.addEventListener)window.addEventListener("load",cnk_tree_init,1);;function cnk_tree_init_styles(){var a,b;if(cnkad){var i;for(i in cnkad){if(i.indexOf("cnk")!=0||i.indexOf("cnkv")+1)continue;var ss=cnkad[i];if(ss&&ss.tree_width){var az="";if(window.showHelp)az="zoom:1;";var a2="";if(cnk_s2)a2="display:none;position:relative;";var wv='<style type="text/css">.cnkistreestyles'+i+'{} #'+i+'{position:relative !important;} #'+i+' a{float:none !important;white-space:normal !important;}#'+i+' div{width:auto !important;left:0px !important;top:0px !important;overflow:hidden;'+a2+az+'border-top-width:0px !important;border-bottom-width:0px !important;margin-left:0px !important;margin-top:0px !important;}';wv+='#'+i+'{width:'+ss.tree_width+'px;}';if(ss.tree_sub_sub_indent)wv+='#'+i+' div div{padding-left:'+ss.tree_sub_sub_indent+'px}';document.write(wv+'</style>');}}}};function cnk_tree_init(event,spec){var q=cnkad.tree;var a,b;var i;for(i in cnkad){if(i.indexOf("cnk")!=0||i.indexOf("cnkv")+1||i.indexOf("cnks")+1||(!isNaN(spec)&&spec!=i))continue;var ss=cnkad[i];if(ss&&ss.tree_width){q.estep=ss.tree_expand_step_size;if(!q.estep)q.estep=1;q.cstep=ss.tree_collapse_step_size;if(!q.cstep)q.cstep=1;q.acollapse=ss.tree_auto_collapse;q.no_focus=ss.tree_hide_focus_box;q.etype=ss.tree_expand_animation;if(q.etype)q.etype=parseInt(q.etype);if(!q.etype)q.etype=0;q.ctype=ss.tree_collapse_animation;if(q.ctype)q.ctype=parseInt(q.ctype);if(!q.ctype)q.ctype=0;if(cnkad.br_oldnav){q.etype=0;q.ctype=0;}cnk_tree_init_items(document.getElementById(i));}i++;}};function cnk_tree_init_items(a,sub){var w,b;var q=cnkad.tree;var aa;aa=a.childNodes;for(var j=0;j<aa.length;j++){if(aa[j].tagName=="A"){if(aa[j].cdiv){aa[j].cdiv.ismove=1;aa[j].cdiv.cnktree=1;}if(!aa[j].onclick){aa[j].onclick=aa[j].onmouseover;aa[j].onmouseover=null;}if(q.no_focus){aa[j].onfocus=function(){this.blur();};}if(aa[j].cdiv)new cnk_tree_init_items(aa[j].cdiv,1);if(aa[j].getAttribute("cnktreeopen"))cnk_oo(new Object(),aa[j],1)}}};function cnk_tree_item_click(a,close){var z;if(!a.cnktree&&!((z=window.cnkv)&&z.loaded)){var id=cnk_get_menu(a).id;if(window.cnkad&&cnkad[id]&&cnkad[id].tree_width)cnk_x2("cnkfh",a,1);return;}if((z=window.cnkv)&&(z=z.addons)&&(z=z.tree_menu)&&!z["on"+cnk_index(a)])return;cnk_x2("cnkfh",a);var q=cnkad.tree;if(q.timer)return;cnk_la=null;q.co=new Object();var levid="a"+cnk_get_level(a);var ex=false;var cx=false;if(q.acollapse){var mobj=cnk_get_menu(a);var ds=mobj.getElementsByTagName("DIV");for(var i=0;i<ds.length;i++){if(ds[i].style.position=="relative"&&ds[i]!=a){var go=true;var cp=a[qp];while(!cnk_a(cp)){if(ds[i]==cp)go=false;cp=cp[qp];}if(go){cx=true;q.co["a"+i]=ds[i];cnk_uo(ds[i],1);}}}}if(a.style.position=="relative"){cx=true;q.co["b"]=a;var d=a.getElementsByTagName("DIV");for(var i=0;i<d.length;i++){if(d[i].style.position=="relative"){q.co["b"+i]=d[i];cnk_uo(d[i],1);}}a.cnktreecollapse=1;cnk_uo(a,1);if(window.cnk_ibullets_hover)cnk_ibullets_hover(null,a.idiv);}else {ex=true;if(cnk_s2)a.style.display="block";a.style.position="relative";q.eh=a.offsetHeight;a.style.height="0px";cnk_x2("cnkfv",a,1);cnk_x2("cnkfh",a);a.cnktreecollapse=0;q.eo=a;}cnkwait=true;cnk_tree_item_expand(ex,cx,levid);};function cnk_tree_item_expand(expand,collapse,levid){var q=cnkad.tree;var go=false;var cs=1;if(collapse){for(var i in q.co){if(!q.co[i].style.height&&q.co[i].style.position=="relative"){q.co[i].style.height=(q.co[i].offsetHeight)+"px";q.co[i].cnktreeht=parseInt(q.co[i].style.height);}cs=parseInt((q.co[i].offsetHeight/parseInt(q.co[i].cnktreeht))*q.cstep);if(q.ctype==1)cs=q.cstep-cs+1;else if(q.ctype==2)cs=cs+1;else if(q.ctype==3)cs=q.cstep;if(q.ctype&&parseInt(q.co[i].style.height)-cs>0){q.co[i].style.height=parseInt(q.co[i].style.height)-cs+"px";go=true;}else {q.co[i].style.height="";q.co[i].style.position="";if(cnk_s2)q.co[i].style.display="";cnk_x2("cnkfh",q.co[i],1);cnk_x2("cnkfv",q.co[i]);}}}if(expand){cs=parseInt((q.eo.offsetHeight/q.eh)*q.estep);if(q.etype==2)cs=q.estep-cs;else if(q.etype==1)cs=cs+1;else if(q.etype==3)cs=q.estep;if(q.etype&&q.eo.offsetHeight<(q.eh-cs)){q.eo.style.height=parseInt(q.eo.style.height)+cs+"px";go=true;if(window.cnkv_position_pointer)cnkv_position_pointer();}else {q.eo.cnktreeh=q.eo.style.height;q.eo.style.height="";if(window.cnkv_position_pointer)cnkv_position_pointer();}}if(go){q.timer=setTimeout("cnk_tree_item_expand("+expand+","+collapse+",'"+levid+"')",10);}else {cnkwait=false;q.timer=null;}};function cnk_get_level(a){lev=0;while(!cnk_a(a)&&(a=a[qp]))lev++;return lev;};function cnk_get_menu(a){while(!cnk_a(a)&&(a=a[qp]))continue;return a;}
//item_bullets.js
cnkad.br_navigator=navigator.userAgent.indexOf("Netscape")+1;cnkad.br_version=parseFloat(navigator.vendorSub);cnkad.br_oldnav6=cnkad.br_navigator&&cnkad.br_version<7;if(!cnkad.br_oldnav6){if(!cnkad.ibullets)cnkad.ibullets=new Object();if(cnkad.bvis.indexOf("cnk_ibullets_active(o,false);")==-1){cnkad.bvis+="cnk_ibullets_active(o,false);";cnkad.bhide+="cnk_ibullets_active(a,1);";if(window.attachEvent)window.attachEvent("onload",cnk_ibullets_init);else if(window.addEventListener)window.addEventListener("load",cnk_ibullets_init,1);if(window.attachEvent)document.attachEvent("onmouseover",cnk_ibullets_hover_off);else if(window.addEventListener)document.addEventListener("mouseover",cnk_ibullets_hover_off,false);}};function cnk_ibullets_init(e,spec){var z;if((z=window.cnkv)&&(z=z.addons)&&(z=z.item_bullets)&&(!z["on"+cnkv.id]&&z["on"+cnkv.id]!=undefined&&z["on"+cnkv.id]!=null))return;cnk_ts=1;var q=cnkad.ibullets;var a,b,r,sx,sy;z=window.cnkv;for(i=0;i<10;i++){if(!(a=document.getElementById("cnk"+i))||(!isNaN(spec)&&spec!=i))continue;var ss=cnkad[a.id];if(ss&&(ss.ibullets_main_image||ss.ibullets_sub_image)){q.mimg=ss.ibullets_main_image;if(q.mimg){q.mimg_a=ss.ibullets_main_image_active;if(!z)cnk_ibullets_preload(q.mimg_a);q.mimg_h=ss.ibullets_main_image_hover;if(!z)cnk_ibullets_preload(q.mimg_a);q.mimgwh=eval("new Array("+ss.ibullets_main_image_width+","+ss.ibullets_main_image_height+")");r=q.mimgwh;if(!r[0])r[0]=9;if(!r[1])r[1]=6;sx=ss.ibullets_main_position_x;sy=ss.ibullets_main_position_y;if(!sx)sx=0;if(!sy)sy=0;q.mpos=eval("new Array('"+sx+"','"+sy+"')");q.malign=eval("new Array('"+ss.ibullets_main_align_x+"','"+ss.ibullets_main_align_y+"')");r=q.malign;if(!r[0])r[0]="right";if(!r[1])r[1]="center";}q.simg=ss.ibullets_sub_image;if(q.simg){q.simg_a=ss.ibullets_sub_image_active;if(!z)cnk_ibullets_preload(q.simg_a);q.simg_h=ss.ibullets_sub_image_hover;if(!z)cnk_ibullets_preload(q.simg_h);q.simgwh=eval("new Array("+ss.ibullets_sub_image_width+","+ss.ibullets_sub_image_height+")");r=q.simgwh;if(!r[0])r[0]=6;if(!r[1])r[1]=9;sx=ss.ibullets_sub_position_x;sy=ss.ibullets_sub_position_y;if(!sx)sx=0;if(!sy)sy=0;q.spos=eval("new Array('"+sx+"','"+sy+"')");q.salign=eval("new Array('"+ss.ibullets_sub_align_x+"','"+ss.ibullets_sub_align_y+"')");r=q.salign;if(!r[0])r[0]="right";if(!r[1])r[1]="middle";}q.type=ss.ibullets_apply_to;cnk_ibullets_init_items(a,1);}}};function cnk_ibullets_preload(src){d=document.createElement("DIV");d.style.display="none";d.innerHTML="<img src="+src+" width=1 height=1>";document.body.appendChild(d);};function cnk_ibullets_init_items(a,main){var q=cnkad.ibullets;var aa,pf;aa=a.childNodes;for(var j=0;j<aa.length;j++){if(aa[j].tagName=="A"){if(window.attachEvent)aa[j].attachEvent("onmouseover",cnk_ibullets_hover);else if(window.addEventListener)aa[j].addEventListener("mouseover",cnk_ibullets_hover,false);var skip=false;if(q.type!="all"){if(q.type=="parent"&&!aa[j].cdiv)skip=true;if(q.type=="non-parent"&&aa[j].cdiv)skip=true;}if(!skip){if(main)pf="m";else pf="s";if(q[pf+"img"]){var ii=document.createElement("IMG");ii.setAttribute("src",q[pf+"img"]);ii.setAttribute("width",q[pf+"imgwh"][0]);ii.setAttribute("height",q[pf+"imgwh"][1]);ii.style.borderWidth="0px";ii.style.position="absolute";var ss=document.createElement("SPAN");var s1=ss.style;s1.display="block";s1.position="relative";s1.fontSize="1px";s1.lineHeight="0px";ss.ibhalign=q[pf+"align"][0];ss.ibvalign=q[pf+"align"][1];ss.ibiw=q[pf+"imgwh"][0];ss.ibih=q[pf+"imgwh"][1];ss.ibposx=q[pf+"pos"][0];ss.ibposy=q[pf+"pos"][1];cnk_ibullets_position(aa[j],ss);ss.appendChild(ii);aa[j].cnkibullet=aa[j].insertBefore(ss,aa[j].firstChild);aa[j]["cnkibullet"+pf+"a"]=q[pf+"img_a"];aa[j]["cnkibullet"+pf+"h"]=q[pf+"img_h"];aa[j].cnkibulletorig=q[pf+"img"];ss.setAttribute("cnkvbefore",1);ss.setAttribute("isibullet",1);if(aa[j].className.indexOf("cnkactive")+1)cnk_ibullets_active(aa[j]);}}if(aa[j].cdiv)new cnk_ibullets_init_items(aa[j].cdiv);}}};function cnk_ibullets_position(a,b){if(b.ibhalign=="right")b.style.left=(a.offsetWidth+parseInt(b.ibposx)-b.ibiw)+"px";else if(b.ibhalign=="center")b.style.left=(parseInt(a.offsetWidth/2)-parseInt(b.ibiw/2)+parseInt(b.ibposx))+"px";else b.style.left=b.ibposx+"px";if(b.ibvalign=="bottom")b.style.top=(a.offsetHeight+parseInt(b.ibposy)-b.ibih)+"px";else if(b.ibvalign=="middle")b.style.top=parseInt((a.offsetHeight/2)-parseInt(b.ibih/2)+parseInt(b.ibposy))+"px";else b.style.top=b.ibposy+"px";};function cnk_ibullets_hover(e,targ){e=e||window.event;if(!targ){var targ=e.srcElement||e.target;while(targ.tagName!="A")targ=targ[qp];}var ch=cnkad.ibullets.lasth;if(ch&&ch!=targ){cnk_ibullets_hover_off(new Object(),ch);}if(targ.className.indexOf("cnkactive")+1)return;var wo=targ.cnkibullet;var ma=targ.cnkibulletmh;var sa=targ.cnkibulletsh;if(wo&&(ma||sa)){var ti=ma;if(sa&&sa!=undefined)ti=sa;if(ma&&ma!=undefined)ti=ma;wo.firstChild.src=ti;cnkad.ibullets.lasth=targ;}if(e)cnk_kille(e);};function cnk_ibullets_hover_off(e,o){if(!o)o=cnkad.ibullets.lasth;if(o&&o.className.indexOf("cnkactive")==-1){if(o.firstChild&&o.firstChild.getAttribute&&o.firstChild.getAttribute("isibullet"))o.firstChild.firstChild.src=o.cnkibulletorig;}};function cnk_ibullets_active(a,hide){var wo=a.cnkibullet;var ma=a.cnkibulletma;var sa=a.cnkibulletsa;if(!hide&&a.className.indexOf("cnkactive")==-1)return;if(hide&&a.idiv){var o=a.idiv;if(o&&o.cnkibulletorig){if(o.firstChild&&o.firstChild.getAttribute&&o.firstChild.getAttribute("isibullet"))o.firstChild.firstChild.src=o.cnkibulletorig;}}else {cnk_ibullets_wait_position(a);if(wo&&(ma||sa)){var ti=ma;if(sa&&sa!=undefined)ti=sa;if(ma&&ma!=undefined)ti=ma;wo.firstChild.src=ti;}}};function cnk_ibullets_wait_position(a){if(a)cnkad.ibullets.a=a;else a=cnkad.ibullets.a;if(a.cdiv){var aa=a.cdiv.childNodes;for(var i=0;i<aa.length;i++){if(aa[i].tagName=="A"&&aa[i].cnkibullet){if(!aa[i].offsetWidth){setTimeout("cnk_ibullets_wait_position()",10);return;}cnk_ibullets_position(aa[i],aa[i].cnkibullet);}}}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -