var zkEvent={add:function(d,c,b,a){if(d.attachEvent){d["e"+c+b]=b;d[c+b]=function(){d["e"+c+b](window.event)};d.attachEvent("on"+c,d[c+b])}else{d.addEventListener(c,b,a)}},remove:function(f,c,b,a){if(f.detachEvent){try{f.detachEvent("on"+c,f[c+b])}catch(d){}f[c+b]=null}else{f.removeEventListener(c,b,a)}},setTgt:function(a){a=a?a:window.event;if(!a.target){a.target=a.srcElement}if(!a.preventDefault){a.preventDefault=function(){a.returnValue=false;return false}}if(!a.stopPropagation){a.stopPropagation=function(){a.cancelBubble=true}}return a},getTgt:function(a){a=zkEvent.setTgt(a);var b=a.target;if(b.nodeType!=1){b=b.parentNode}return b},addLoadEvent:function(a){var b=window.onload;if(typeof window.onload!="function"){window.onload=a}else{window.onload=function(){if(b){b()}a()}}}};var zkWin={init:function(){this.getWinWidth();this.getWinHeight();this.getScrollX();this.getScrollY()},getWinWidth:function(){this.width=0;if(window.innerWidth){this.width=window.innerWidth-18}else{if(document.documentElement&&document.documentElement.clientWidth){this.width=document.documentElement.clientWidth}else{if(document.body&&document.body.clientWidth){this.width=document.body.clientWidth}}}return this.width},getWinHeight:function(){this.height=0;if(window.innerHeight){this.height=window.innerHeight-18}else{if(document.documentElement&&document.documentElement.clientHeight){this.height=document.documentElement.clientHeight}else{if(document.body&&document.body.clientHeight){this.height=document.body.clientHeight}}}return this.height},getScrollX:function(){this.scrollX=0;if(typeof window.pageXOffset=="number"){this.scrollX=window.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollLeft){this.scrollX=document.documentElement.scrollLeft}else{if(document.body&&document.body.scrollLeft){this.scrollX=document.body.scrollLeft}else{if(window.scrollX){this.scrollX=window.scrollX}}}}return this.scrollX},getScrollY:function(){this.scrollY=0;if(typeof window.pageYOffset=="number"){this.scrollY=window.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){this.scrollY=document.documentElement.scrollTop}else{if(document.body&&document.body.scrollTop){this.scrollY=document.body.scrollTop}else{if(window.scrollY){this.scrollY=window.scrollY}}}}return this.scrollY}};function testMouseLeave(b,c){b=zkEvent.setTgt(b);var a=b.relatedTarget?b.relatedTarget:b.toElement?b.toElement:null;if(c!=a&&!isChild(a,c)){return true}return false}function isChild(b,a){if(!b){return}while(b=b.parentNode){if(b==a){return true}}return false}function getPgOffsets(a){var c=0,b=0;do{c+=a.offsetLeft;b+=a.offsetTop}while(a=a.offsetParent);return{x:c,y:b}}function getQryParam(b,e){e=e?e:window.location;if(e.search&&e.search.indexOf(b!=-1)){var d=e.search.slice(1).split("&");var a;for(var c=0;d[c];c++){a=d[c].split("=");if(a[0]==b&&a[1]){return a[1]}}}return""}function calcCompWid(c){var e=0;if(c.currentStyle&&!window.opera&&(document.compatMode==null||document.compatMode=="BackCompat")){var d=parseInt(getCurStl(c,"paddingLeft"))+parseInt(getCurStl(c,"paddingRight"));var a=parseInt(getCurStl(c,"borderLeftWidth"))+parseInt(getCurStl(c,"borderRightWidth"));e=d+a}return e}function getCurStl(d,e){var b="";if(document.defaultView&&document.defaultView.getComputedStyle){b=document.defaultView.getComputedStyle(d,null)[e]}else{if(d.currentStyle){b=d.currentStyle[e];if(!/^\d+(px)?$/i.test(b)&&/^\d/.test(b)){var c=d.style.left;var a=d.runtimeStyle.left;d.runtimeStyle.left=d.currentStyle.left;d.style.left=b||0;b=d.style.pixelLeft+"px";d.style.left=c;d.runtimeStyle.left=a}}}return b}function getObStl(b){var a=b.style;if(window.getComputedStyle){a=window.getComputedStyle(b,null)}else{if(b.currentStyle){a=b.currentStyle}}return a}function posByAnc(c,b,a){a=(typeof arg=="undefined"?0:a);c.style.left=b.offsetLeft+"px";c.style.top=b.offsetTop+b.offsetHeight+a+"px"}function posCenter(a){x=(zkWin.getWinWidth()-a.offsetWidth)/2;y=(zkWin.getWinHeight()-a.offsetHeight)/2;a.style.left=x+"px";a.style.top=y+"px"}function posCtrPrnt(b,a){x=(a.offsetWidth-b.offsetWidth)/2;y=(a.offsetHeight-b.offsetHeight)/2;if(y<0){y=b.offsetHeight/2}b.style.left=x+"px";b.style.top=y+"px"}function getScrollerWidth(){document.body.style.overflow="hidden";var a=document.body.clientWidth;document.body.style.overflow="scroll";a-=document.body.clientWidth;if(!a){a=document.body.offsetWidth-document.body.clientWidth}document.body.style.overflow="";return a}function v2Px(a){return isNaN(a)?0:a+"px"}function mv2(b,a,c){b.style.left=v2Px(a);b.style.top=v2Px(c)}function createAjaxReq(){var a;try{a=new XMLHttpRequest()}catch(b){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){return false}}}return a}function ajaxGetReq(c,a){var b=createAjaxReq();b.onreadystatechange=function(){if(b.readyState==4){a(b)}};b.open("GET",c,true);b.send(null);return b}function fndArEl(c,b){for(var d=0;d<b.length;d++){if(b[d]==c){return d}}return -1}function $(a){return document.getElementById(a)}function ge(a){return document.getElementById(a)}function geBT(b,a){return a.getElementsByTagName(b)}function geCS(e,d){var b=d.childNodes;for(var a=0;a<b.length;a++){if(b[a].className&&b[a].className==e){return b[a]}}return null}function getCSS(a,f,h){f=f.toLowerCase();if(document.styleSheets){for(var c=a;c<document.styleSheets.length;c++){var g=document.styleSheets[c];var d=0;var b=false;var e=g.href;if(e&&e.startsWith("http://"+document.domain)){do{if(g.cssRules){b=g.cssRules[d]}else{b=g.rules[d]}if(b){if(b.selectorText.toLowerCase()==f){if(h=="delete"){if(g.cssRules){g.deleteRule(d)}else{g.removeRule(d)}return true}else{return b}}}d++}while(b)}}}return false}function setCk(a,c,f,e,b,d){today=new Date();today.setTime(today.getTime());if(f){f=f*1000*60*60*24}expdt=new Date(today.getTime()+(f));document.cookie=a+"="+escape(c)+((f)?";expires="+expdt.toGMTString():"")+((e)?";path="+e:"")+((b)?";domain="+b:"")+((d)?";secure":"")}function getCk(e){var f=document.cookie.split(";");var c="",b="",a="",d=false;for(i=0;i<f.length;i++){c=f[i].split("=");b=c[0].replace(/^\s+|\s+$/g,"");if(b==e){d=true;if(c.length>1){a=unescape(c[1].replace(/^\s+|\s+$/g,""))}return a;break}c=null;b=""}return c}function delCk(a,c,b){if(getCk(a)){document.cookie=a+"="+((c)?";path="+c:"")+((b)?";domain="+b:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}}String.prototype.startsWith=function(a){return(this.match("^"+a)==a)};String.prototype.endsWith=function(a){return(this.match(a+"$")==a)};function mcl(a){var e=a.firstChild;while(e!=null){if(e.nodeType==1){var d=new Array();var c=e.firstChild;while(c!=null){if(c.tagName=="OL"||c.tagName=="UL"){c.style.display="block";d.push(c)}c=c.nextSibling}var b=document.createElement("img");b.setAttribute("src","http://images.zknives.com/icons/minus.png");b.onclick=ctTglFc(b,d);e.insertBefore(b,e.firstChild)}e=e.nextSibling}}function ctTglFc(a,b){return function(){if(a.getAttribute("class")=="collapsibleClosed"){a.setAttribute("class","collapsibleOpen");a.setAttribute("src","http://images.zknives.com/icons/minus.png")}else{a.setAttribute("class","collapsibleClosed");a.setAttribute("src","http://images.zknives.com/icons/plus.png")}for(var c=0;c<b.length;c++){b[c].style.display=(b[c].style.display=="block")?"none":"block"}}};
