function UBClick(n,t,i){function u(n){var t=document.UB,i=n.target;t.contains(i)||t.bubble.isVisible()&&r(t)}function f(n){if(n.which==27){var t=document.UB;t.bubble.isVisible()&&r(t)}}function r(n){n.bubble.hide();n.btn.removeClass(i.AC)}function e(n){n.bubble.show("block");n.btn.addClass(i.AC)}i=OptExtend({AC:"Active",Btn:"a.Handle",Bubble:"div.Bubble"},i);document.UB||(n.btn=FE(i.Btn,n),n.bubble=FE(i.Bubble,n),n.bubble.hide(),$(document).bind({click:u,keydown:f}),document.UB=n);t=EventFix(t);n.btn.contains(t.target)&&(n.bubble.isVisible()?r(n):e(n))}function AjaxForm(n,t,i,r){return $.ajax({cache:!1,type:"POST",url:n,data:t,dataType:"json",success:function(n){n=n||{};typeof n.Status=="undefined"&&(n.Status=1);i&&i(n,r)},error:function(n,t){typeof console!="undefined"&&typeof console.error!="undefined"&&console.error(t);i&&i({Status:-500,Message:"Internal Server Error"},r)}})}function AjaxJson(n,t,i,r){return $.ajax({cache:!1,type:"POST",url:n,data:JSON.stringify(t),dataType:"json",processData:!1,contentType:"application/json; charset=UTF-8",success:function(n){n=n||{};typeof n.Status=="undefined"&&(n.Status=1);i&&i(n,r)},error:function(n,t){typeof console!="undefined"&&typeof console.error!="undefined"&&console.error(t);i&&i({Status:-500,Message:"Internal Server Error"},r)}})}function AjaxHtml(n,t,i,r){return $.ajax({cache:!1,type:"POST",url:n,data:t,dataType:"html",success:function(n){i&&i({Status:1,Html:n},r)},error:function(n,t){typeof console!="undefined"&&typeof console.error!="undefined"&&console.error(t);i&&i({Status:-500,Message:"Internal Server Error"},r)}})}function HtmlEncode(n){return n==null?"":n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/>/g,"&gt;")}function OptExtend(n,t){t=t||{};for(var i in n)typeof t[i]=="undefined"&&(t[i]=n[i]);return t}function Log(n,t){t=t||"log";typeof console!="undefined"&&typeof console[t]!="undefined"&&console[t](n)}function px(n,t){return(n=ToInt(n),n==null)?"":t===!0&&n<0?"0":n==0?"0":n+"px"}function ppx(n){return px(n,!0)}function EventFix(n){return jQuery.event.fix(n||window.event)}function keyCode(n){return n.which}function IsKeyChar(n){return jQuery.inArray(keyCode(n),[9,13,16,17,18,19,20,33,34,35,36,37,38,39,40,91,92,112,113,114,115,116,117,118,119,120,121,122,123,144,145])<0}function EventKill(n){return n==null?!1:(typeof n.returnValue!="undefined"&&(n.returnValue=!1),typeof n.cancelBubble!="undefined"&&(n.cancelBubble=!0),n.stopPropagation&&n.stopPropagation(),n.preventDefault&&n.preventDefault(),!1)}function OnEnter(n,t,i){t=EventFix(t);keyCode(t)==13&&(EventKill(t),i(n))}function CE(n,t){if(t==null)return document.createElement(n);var i=document.createElement(n);return i.prop(t),i}function FE(n,t,i){if(i==null)return $.find(n,t)[0];var r=$.find(n,t)[0];return r?(r.prop(i),r):null}function _takeElem(n,t){return typeof n=="string"?CE(n,t):(n.prop(t),n)}function Event(){var t=this,n=[];t.Add=function(t,i){n.push([t,i])};t.Fire=function(){for(var i,r,t=0,u=n.length;t<u;t++)(i=n[t],r=i[0],r)&&r.apply(i[1]||this,arguments)}}function ToStr(n,t){return typeof n=="boolean"&&(n=n?"1":"0"),n==null?typeof t=="undefined"?null:t:String(n)}function ToInt(n,t){var i=parseInt(n);return isNaN(i)?typeof t=="undefined"?null:t:i}function ToFloat(n,t){var i=parseFloat(n);return isNaN(i)?typeof t=="undefined"?null:t:i}function ToBool(n,t){switch((""+n).toLowerCase()){case"true":case"yes":case"on":case"1":return!0;case"false":case"no":case"off":case"0":return!1;case"":case"null":case"undefined":case null:return typeof t=="undefined"?null:t;default:return Boolean(n)}}function rs(n){return _rs?_rs[n]||n:n}function rsp(n){if(!_rs)return n;var t=_rs[n];if(!t)return n;try{return JSON.parse(t)}catch(i){return{}}}function Loc(n,t){function s(n,t){h(n);o(t)}function h(n){if(n!=null&&n.length!=0){var u=n.indexOf("?"),t=n.indexOf("#");u<0?(e=null,t<0?(f=n,r=null):(f=n.substr(0,t),r=n.substr(t))):(f=n.substr(0,u),t<0?(e=n.substr(u),r=null):(e=n.substr(u,t-u),r=n.substr(t)),i=c(e))}}function c(n){var i,r,e,u,t,f,o;if(n==null||n==""||n=="?"||(n.indexOf("?")==0&&(n=n.substr(1)),i=n.split("&"),i.length==0))return null;for(r={},e=i.length,u=0;u<e;u++)(t=i[u],t!=null&&t.length!=0)&&(t.indexOf("=")>-1?(f=t.split("="),o=typeof unescape=="function"?unescape(f[1]):f[1],r[f[0]]=decodeURIComponent(o.replace(/\+/g," "))):r[t]=null);return r}function o(n,t){if(n!=null){if(typeof n=="object"){i||(i={});for(var r in n)i[r]=n[r];return}if(typeof t=="undefined")return i?i[n]:null;i||(i={});i[n]=t}}var u=this,f=null,e=null,r=null,i=null;s(n,t);u.path=function(n){if(typeof n=="undefined")return f;f=n};u.hash=function(n){if(typeof n=="undefined")return r;r=n==null||n==""||n=="#"?null:(n.indexOf("#")==0?"":"#")+n};u.param=o;u.paramI=function(n){return ToInt(o(n))};u.paramB=function(n){return ToBool(o(n))};u.render=function(){var n=f||"",t,u,e;if(i==null||i.length==0)return n;t=0;for(u in i)(e=i[u],e!=null)&&(n+=(t>0?"&":"?")+u+"="+Loc.enc(e),t++);return r!=null&&(n+=r),n};u.params=i;u._test=function(){return{path:f,search:e,params:i,hash:r}}}function PageUrl(){return window.location.href.substring(0,window.location.href.length-window.location.hash.length)}function parseLevel(n){var t=/(?:\s|^)L(\d+)(?:\s|$)/.exec(n);return t?ToInt(t[1],0):0}function parseYear(n){var t=parseInt(n,10);return t<45?t+2e3:t<100?t+1900:t}function parseNum3(n){var t=parseInt(n,10);return isNaN(t)?NaN:t<10?"00"+t:t<100?"0"+t:""+t}function ExtendValidation(){document.HasExValidation||(typeof Page_ClientValidate=="undefined"?window.Page_ClientValidate=Atom_ClientValidate:(MS_ClientValidate=Page_ClientValidate,Page_ClientValidate=Extended_ClientValidate),document.HasExValidation=!0)}function Extended_ClientValidate(n){var t=MS_ClientValidate(n),i=Atom_ClientValidate(n);return t&&i}function Atom_ClientValidate(n){var t=$(".Captcha")[0];return t.Validate(n)}function SubmitForm(n,t,i){(typeof Page_ClientValidate=="undefined"||Page_ClientValidate(i))&&__doPostBack(n,t)}function SubmitOnKeyUp(n,t){SubmitOnEnter(n,t)}function SubmitOnEnter(n,t){n=EventFix(n);n.keyCode==13&&(typeof Page_ClientValidate!="undefined"?Page_ClientValidate(t)&&__doPostBack():__doPostBack())}function SlideElement(n){n=OptExtend({Content:null,Btn:null,More:"more...",Less:"less..",LessClass:null,Duration:500},n);var i=$(n.Content),t=$(n.Btn);i.is(":visible")?i.slideUp(n.Duration,function(){t.html(n.More);t.removeClass(n.LessClass)}):i.slideDown(n.Duration,function(){t.html(n.Less);t.addClass(n.LessClass)})}function ComeBack(n){var t=window.location,i=t.pathname+t.search+t.hash;$.cookie("lru",i,{path:"/",raw:!0});t.href=n}function ConfirmPostBack(n,t,i){confirm(n)&&__doPostBack(t,i)}function InitUap(){Uap.IsAuthenticated=document.body.getAttribute("data-isauthenticated")==="1"}function SplashLoader(n){function l(){i=document.body.append("div",{cls:n.CssSplash,html:n.SplashHtml,style:{display:"none"}});u=$(i);r=document.body.append("div",{cls:n.CssBackground,style:{display:"none"}});n.CssWaitTime&&(t=FE("."+n.CssWaitTime,i),t==null&&(t=i.append("span",{cls:n.CssWaitTime})),t.html(0));n.CssToToggle&&(e=FE("."+n.CssToToggle,i));f=FE("img",i)}function a(){e!=null&&e.toggleClass(n.CssHighlight);t.html(ToInt(t.html(),0)+1)}function v(){f!=null&&f.attr("src",f.attr("src"))}n=OptExtend({SplashHtml:'<div class="head">Searching...<\/div><div class="body"><span class="time"><\/span><img src="/res/loading_b.gif" alt="Loading" /><\/div><div class="foot">Wait please<\/div>',CssBackground:"loader_bg",CssSplash:"loader",CssWaitTime:null,CssHighlight:null,CssToToggle:null},n);var s=this,h=null,r=null,i=null,u=[],t=null,e=null,f=null,c=$(document),o=$(window);l();s.show=function(){r.css({width:px(c.width()),height:px(c.height())});r.show("block");var n={left:px(Math.round((o.width()-u.width())/2)),top:px(o.scrollTop()+Math.round((o.height()-u.height())/2))};u.css(n).show();t!=null&&(clearInterval(h),t.html(0),h=setInterval(a,1e3));window.onbeforeunload=function(){setTimeout(v,100)}};s.hide=function(){i.hide();r.hide()}}function ShowSplash2(){splash2==null&&(splash2=new SplashLoader({CssBackground:"loader_bg",CssSplash:"loader",SplashHtml:'<div class="head">Nahrávam...<\/div><div class="body"><span class="time"><\/span><img src="/res/loading.gif" alt="Loading" /><\/div><div class="foot">Čakajte, prosím<\/div>',CssWaitTime:"time",CssHighlight:"highlight",CssToToggle:"head"}));splash2.show()}function PopupHelper(n){function v(){var i,o,r;t=document.body.append("div",{cls:"Pop N",style:{display:"none",width:"600px"}});t.append("div",{cls:"Aro"});var h=t.append("table"),f=h.append("tbody"),e=f.append("tr");e.append("td",{cls:"nw0"});e.append("td",{cls:"n0"});e.append("td",{cls:"ne0"});i=f.append("tr");i.append("td",{cls:"w0"});o=i.append("td",{cls:"Bd"});u=o.append("div");n.BdCls!=null&&u.addClass(n.BdCls);i.append("td",{cls:"e0"});r=f.append("tr");r.append("td",{cls:"sw0"});r.append("td",{cls:"s0"});r.append("td",{cls:"se0"});s=$(t);s.bind({mouseenter:w,mouseleave:b})}function y(){i=this;r=$(this);e();h=setTimeout(k,n.D1);o()}function p(){i=null;r=null;e();o();f=setTimeout(l,n.D2)}function w(){i=null;r=null;e();o()}function b(){i=null;r=null;e();o();f=setTimeout(l,n.D2)}function k(){i&&(t||v(),n.LoadDataFunc(i,d))}function d(n,i){t&&(c.CloseOthers(),c.Enable(),u.innerHTML=i,t.show("block"),g())}function l(){t&&(t.hide(),u.empty(),c.Disable())}function g(){if(t&&i){var u=r.offset();t.css({top:px(u.top-s.outerHeight()-n.Aro),left:px(u.left+r.outerWidth()/2-s.outerWidth()/2)})}}function e(){h!=null&&(clearTimeout(h),h=null)}function o(){f!=null&&(clearTimeout(f),f=null)}var a={$BindPopup:null,D1:400,D2:400,Aro:12,LoadDataFunc:function(){},BdCls:null};n=OptExtend(a,n);var t=null,s=null,u=null,i=null,r=null,h=null,f=null,c=null;this.Init=function(){n.$BindPopup&&n.$BindPopup.bind({mouseenter:y,mouseleave:p});c=Wgm.Add({Close:function(){e();o();t!=null&&(t.hide(),u.empty())},Level:1})}}function PopupTabs(n){function a(n){for(var i=0,r=t.children.length;i<r;i++)if(t.children[i].Code==n)return!0;return!1}function f(n){return n!=null&&a(n)||(n=v()),e(n),n}function e(i){for(var f,e,o,r=0,u=t.children.length;r<u;r++)f=t.children[r],f.toggleClass(n.AC,f.Code==i);for(e=h(),r=0,u=e.length;r<u;r++)o=e[r],o.toggle(o.attr(n.CodeAttr)==i);l=i}function o(){var u=h(),i,f,r,e;for(t.empty(),i=0,f=u.length;i<f;i++)r=u[i],e=t.append("li",{onclick:y,Code:r.attr(n.CodeAttr)}),e.append("span",{html:r.attr(n.NameAttr)})}function v(){return t.hasChildren()?t.children[0].Code:null}function y(){var f=u.outerHeight(),o=s(i.style.top),t=i.body,h=s(t.style.minHeight)||0,r=$(t).outerHeight();r>h&&(t.style.minHeight=px(r));e(this.Code);Setup.Update(n.Key,this.Code);setTimeout(function(){var n=f-u.outerHeight();i.style.top=px(o+n)},0)}function s(n){if(n==null||n.length==0)return null;var t=n.match(/^([0-9\.]+)px$/);return t?ToFloat(t[1]):null}function h(){return $.find(n.Tsel,c)}if(n=OptExtend(defaults={Popup:null,Header:null,Body:null,Key:null,Tsel:".Tab",CodeAttr:"data-code",NameAttr:"data-name",AC:"Selected"},n),n.Popup!=null&&n.Body!=null&&n.Header!=null){var r=this,i=n.Popup,u=$(i),t=n.Header,c=n.Body,l=null;r.Init=function(){o();var t=Setup.ValueS(n.Key);t=f(t);Setup.Update(n.Key,t)};r.SelectTab=function(t){o();t=f(t);Setup.Update(n.Key,t)}}}function StandStill(n,t){function o(){s();t();h()}function s(){for(var n,o=r.scrollTop()-u.offset().top,t=0,s=f.children.length;t<s;t++)if(n=f.children[t],n.offsetTop>=o){i=n;e=n.offsetTop-o;return}i=null}function h(){if(i!=null){var n=u.offset().top+i.offsetTop-e;setTimeout(function(){r.scrollTop(n)},0)}}if(n&&t){n.tagName=="TBODY"&&(n=n.parentNode);var r=$(window),u=$(n),f=FE("tbody",n),i=null,e=0;o()}}function CopyWrapper(){function t(){return!document.documentElement.hasClass("ie8")}var n=this;n.attach=function(n,i){if(t()&&Clipboard.isSupported()){var r=new Clipboard(n);r.on("success",function(n){console.info("Action:",n.action);console.info("Text:",n.text);console.info("Trigger:",n.trigger);n.clearSelection()});r.on("error",function(n){console.error&&(console.error("Action:",n.action),console.error("Trigger:",n.trigger))})}else $(n,i).click(function(){var n=this.getAttribute("data-clipboard-text");n!=null&&window.prompt("Kopírovat do schránky: Ctrl+C, Enter",n)})}}var Wgm,_testElem,Setup,Uap,splash2,eman;jQuery.cookie=function(n,t,i){function o(n,t){var i,r,u,f;if(n==null)return"";if(typeof n=="object"){i="";r=0;for(u in n)f=n[u],i+=(r>0?"&":"")+u+"="+encodeURIComponent(ToStr(f,"")),r++;return i}return t?ToStr(n,""):encodeURIComponent(ToStr(n,""))}var r,e,u,f;return arguments.length===1?(r=new RegExp("(?:^|; )"+encodeURIComponent(n)+"=([^;]*)").exec(document.cookie),r?decodeURIComponent(r[1]):null):(i=i||{},t===null&&(i.expires=-1),typeof i.expires=="number"&&(e=i.expires,u=i.expires=new Date,u.setDate(u.getDate()+e)),f=encodeURIComponent(n)+"="+o(t,i.raw)+(i.expires?"; expires="+i.expires.toUTCString():"")+(i.path?"; path="+i.path:"; path=/")+(i.domain?"; domain="+i.domain:"")+(i.samesite?"; SameSite="+i.samesite:"")+(i.secure?"; secure":""),document.cookie=f,f)};jQuery.cookieI=function(n,t){return ToInt(jQuery.cookie(n),t)};jQuery.cookieB=function(n,t){return ToBool(jQuery.cookie(n),t)};jQuery.cookieJSON=function(n,t){function r(n){var i,r,e,u,t,f;if(n==null||n.length===0||(i=n.split("&"),i.length===0))return null;for(r={},e=i.length,u=0;u<e;u++)(t=i[u],t!=null&&t.length!==0)&&(t.indexOf("=")>-1?(f=t.split("="),r[f[0]]=decodeURIComponent(f[1].replace(/\+/g," "))):r[t]=null);return r}typeof t=="undefined"&&(t=null);var i=r(jQuery.cookie(n));return i==null?t:i},function(n){typeof n.fn.wheel=="undefined"&&(n.fn.wheel=function(n,t){function f(n,t,f,e){n[r](u+t,i=="wheel"?f:function(n){n||(n=window.event);var t={originalEvent:n,target:n.target||n.srcElement,type:"wheel",deltaMode:n.type=="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0,preventDefault:function(){n.preventDefault?n.preventDefault():n.returnValue=!1}};return i=="mousewheel"?(t.deltaY=-1/40*n.wheelDelta,n.wheelDeltaX&&(t.deltaX=-1/40*n.wheelDeltaX)):t.deltaY=n.detail,f(t)},e||!1)}var u="",r,i;window.addEventListener?r="addEventListener":(r="attachEvent",u="on");i="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==undefined?"mousewheel":"DOMMouseScroll";this.each(function(){f(this,i,n,t);i=="DOMMouseScroll"&&f(this,"MozMousePixelScroll",n,t)})})}(jQuery);Wgm=new function(){function i(n,i){var u,r;for(n==null&&(n=9),r=t.length-1;r>=0;r--)u=t[r],u!=i&&u.Close(n)}function r(n,t){var i=this;t=OptExtend({Code:null,Close:null,Level:0,Enable:!1},t);i._fnc=t.Close;i._Level=t.Level;i.Close=function(n){n!=null&&t.Level>n||t.Enable&&(t.Enable=!1,t.Close&&t.Close())};i.CloseOthers=function(r){r==null&&(r=t.Level);n.Close(r,i)};i.Enable=function(){t.Enable=!0};i.Disable=function(){t.Enable=!1};i.Swap=function(n){t.Enable=n}}var n=this,t=[];n.Add=function(i){var u=new r(n,i);return t.push(u),u};n.Close=i;n.CloseAll=function(n){i(n)}};$(function(){$(document).click(function(){Wgm.Close(0)}).keydown(function(n){n.keyCode==27&&Wgm.Close(1)})});_testElem=CE("a");Element.prototype.prop=function(n){var i,t,r,u,f;for(i in n){t=n[i];switch(i){case"attr":for(r in t)u=t[r],u==null?this.removeAttribute(r):this.setAttribute(r,ToStr(u));break;case"style":for(f in t)this.style[f]=t[f];break;case"cls":this.className=t;break;case"html":this.html(t);break;case"txt":this.txt(t);break;default:this[i]=t}}};typeof _testElem.classList!="undefined"?(Element.prototype.hasClass=function(n){return!this.className||!n?!1:this.classList.contains(n)},Element.prototype.removeClass=function(n){this.className&&n&&this.classList.remove(n)},Element.prototype.addClass=function(n){n&&this.classList.add(n)},Element.prototype.toggleClass=function(n,t){return n?typeof t=="undefined"?this.classList.toggle(n):(t?this.classList.add(n):this.classList.remove(n),t):!1}):(Element.prototype.hasClass=function(n){return!this.className||!n?!1:(" "+this.className+" ").indexOf(" "+n+" ")>-1},Element.prototype.removeClass=function(n){this.className=jQuery.trim((" "+this.className+" ").replace(" "+n+" "," "))},Element.prototype.addClass=function(n){n&&(" "+this.className+" ").indexOf(" "+n+" ")===-1&&(this.className=jQuery.trim(this.className+" "+n))},Element.prototype.toggleClass=function(n,t){if(!n)return!1;var i=(" "+this.className+" ").indexOf(" "+n+" ")>-1;return typeof t=="undefined"&&(t=!i),t?i||(this.className=jQuery.trim(this.className+" "+n)):i&&(this.className=jQuery.trim((" "+this.className+" ").replace(" "+n+" "," "))),t});Element.prototype.attr=function(n,t){if(typeof t=="undefined")return this.hasAttribute(n)?this.getAttribute(n):null;t===null?this.removeAttribute(n):this.setAttribute(n,ToStr(t))};Element.prototype.attrI=function(n,t){return ToInt(this.getAttribute(n),t)};Element.prototype.attrF=function(n,t){return ToFloat(this.getAttribute(n),t)};Element.prototype.attrB=function(n,t){return ToBool(this.getAttribute(n),t)};Element.prototype.show=function(n){this.style.display=typeof n=="undefined"?"":n};Element.prototype.hide=function(){this.style.display="none"};Element.prototype.toggle=function(n,t){return typeof n=="undefined"&&(n=!this.isVisible()),n?this.show(t):this.hide(),n};Element.prototype.isVisible=function(){return this.style.display!=="none"};Element.prototype.before=function(n,t){return n=_takeElem(n,t),this.parentNode.insertBefore(n,this)};Element.prototype.after=function(n,t){n=_takeElem(n,t);var i=this.parentNode;return i.lastChild===this?i.appendChild(n):i.insertBefore(n,this.nextSibling)};Element.prototype.prepend=function(n,t){return n=_takeElem(n,t),this.insertBefore(n,this.firstChild)};Element.prototype.append=function(n,t){return n=_takeElem(n,t),this.appendChild(n)};Element.prototype.insertAt=function(n,t,i){n=_takeElem(n,i);t<=0?this.insertBefore(n,this.firstChild):t>this.children.length-1?this.appendChild(n):this.insertBefore(n,this.children[t])};Element.prototype.wrap=function(n,t){return n=_takeElem(n,t),this.parentNode.insertBefore(n,this),n.appendChild(this),n};Element.prototype.closest=function(n,t){for(var i=this,r=i.ownerDocument;i!==null;){if(i===t||i===r)return null;if($.find.matchesSelector(i,n))return i;i=i.parentNode}return null};typeof Element.prototype.contains=="undefined"&&(Element.prototype.contains=function(n){while(n!==null){if(n===this)return!0;n=n.parentNode}return!1});Element.prototype.hasChildren=function(){return this.children.length>0};Element.prototype.empty=function(){while(this.hasChildNodes())this.removeChild(this.lastChild)};Element.prototype.remove=function(){return this.parentNode.removeChild(this)};typeof _testElem.nextElementSibling!="undefined"?(Element.prototype.index=function(){for(var t=this.parentNode,i=t.children.length,n=0;n<i;n++)if(t.children[n]===this)return n;return null},Element.prototype.first=function(){return this.firstElementChild},Element.prototype.last=function(){return this.lastElementChild},Element.prototype.prev=function(){return this.previousElementSibling},Element.prototype.next=function(){return this.nextElementSibling},Element.prototype.txt=function(n){if(typeof n=="undefined")return this.textContent;this.textContent=n}):(Element.prototype.index=function(){for(var t,i=this.parentNode,u=i.children.length,r=0,n=0;n<u;n++)if(t=i.children[n],t.nodeType===1){if(t===this)return r;r++}return null},Element.prototype.first=function(){for(var t,n=0,i=this.children.length;n<i;n++)if(t=this.children[n],t.nodeType===1)return t;return null},Element.prototype.last=function(){for(var t,n=this.children.length-1;n>=0;n--)if(t=this.children[n],t.nodeType===1)return t;return null},Element.prototype.prev=function(){for(var n=this.previousSibling;n!==null;){if(n.nodeType===1)return n;n=n.previousSibling}return null},Element.prototype.next=function(){for(var n=this.nextSibling;n!==null;){if(n.nodeType===1)return n;n=n.nextSibling}return null},Element.prototype.txt=function(n){if(typeof n=="undefined")return $.text(this);this.innerHTML=HtmlEncode(n)});Element.prototype.css=function(n){for(var t in n)this.style[t]=n[t]};Element.prototype.html=function(n){if(typeof n=="undefined")return this.innerHTML;this.innerHTML=n};Setup=new function(){function e(){t=$.cookieJSON(r,{})}function o(n){if(n==null||n.length==0)return null;var t=n.match(f);return t!=null?new Date(t[3],ToInt(t[2],0)-1,t[1]):(t=n.match(u),t==null?null:new Date(t[1],ToInt(t[2],0)-1,t[3]))}function s(n){return n==null||!(n instanceof Date)?null:i(n.getDate())+"."+i(n.getMonth()+1)+"."+n.getFullYear()}function i(n){return(n<10?"0":"")+n}function h(n){return n==null||!(n instanceof Date)?null:n.getFullYear()+"-"+i(n.getMonth()+1)+"-"+i(n.getDate())}var n=this,u=/^\s*(\d+)-(\d+)-(\d+)\s*$/,f=/^\s*(\d+)\s*\.\s*(\d+)\s*\.\s*(\d+)\s*$/,t={},r="Setup";n.ValueS=function(n,i){typeof i=="undefined"&&(i=null);var r=t[n];return r==null?i:r};n.ValueI=function(n,i){typeof i=="undefined"&&(i=null);var r=ToInt(t[n]);return r==null?i:r};n.ValueI0=function(t){return n.ValueI(t,0)};n.ValueB=function(n,i){typeof i=="undefined"&&(i=null);var r=ToBool(t[n]);return r==null?i:r};n.ValueB0=function(t){return n.ValueB(t,!1)};n.ValueD=function(n,i){var f,r;return(typeof i=="undefined"&&(i=null),f=t[n],f==null)?null:(r=f.match(u),r==null?i:new Date(r[1],ToInt(r[2],0)-1,r[3]))};n.ValueDateFmt=function(t,i){return s(n.ValueD(t,i))};n.Update=function(i,u){if(u==null){n.Delete(i);return}var f=null;f=u instanceof Date?h(u):ToStr(u);Uap.IsAuthenticated&&AjaxForm("/handler/uap.ashx?Cmd=Setup_IU",{Key:i,Value:f});t[i]=f;$.cookie(r,t)};n.UpdateDateFmt=function(t,i){var r=o(i);n.Update(t,r)};n.Delete=function(n){Uap.IsAuthenticated&&AjaxForm("/handler/uap.ashx?Cmd=Setup_D",{Key:n});delete t[n];$.cookie(r,t)};n._Values=function(){return t};e()};Loc.enc=function(n){return n==null?"":encodeURIComponent(n)},function(n){n.fn.wheelnobubble=function(){var i=this[0],t=n(i);t.wheel(function(n){if(n.deltaY<0)t.scrollTop()==0&&EventKill(n);else{var r=t.outerHeight(!0),u=t.scrollTop(),f=i.scrollHeight;r+u==f&&EventKill(n)}})}}(jQuery);Uap={IsAuthenticated:!1},function(n){n.fn.tar=function(t){function s(){document.documentElement.hasClass("ie8")?r.bind({keyup:u,keydown:u,focus:e,change:u}):r.bind({input:u,focus:e});n(window).resize(h);i.css({boxSizing:"border-box",display:"block",overflow:"hidden",resize:"none"});i.delta=r.outerHeight()-r.innerHeight();t.ResizeOnInit&&(i.prevValue=i.value,f())}function u(){o()}function e(){o()}function h(){f()}function o(){i.prevValue!=i.value&&(i.prevValue=i.value,f())}function f(){i.parentNode.style.height=px(r.outerHeight(!0));i.style.height="";i.style.height=px(i.scrollHeight+i.delta);i.parentNode.style.height=""}t=OptExtend({ResizeOnInit:!0},t);var i=this[0],r=n(i);i.Resize=f;s()}}(jQuery);splash2=null,function(n){n.fn.sort=function(t){function w(n){n?(e.bind("mousemove",b),e.bind("mouseup",k),e.bind("keyup",d)):(e.unbind("mousemove",b),e.unbind("mouseup",k),e.unbind("keyup",d))}function et(r){var f,e,o;r.which==1&&(f=r.target,i=f.closest(t.Item,u),i)&&f.closest(t.Grip,i)&&(lt(),h=n(i),e=h.position(),v({opacity:.4,height:i.dim.height,width:i.dim.width,top:e.top,left:e.left,position:"absolute",zIndex:1e3}),o=h.offset(),c={top:r.pageY-o.top,left:r.pageX-o.left},ct(i),w(!0),EventKill(r))}function b(n){var e;if(i!=null){ot(n);v({top:n.pageY-o.offset().top-c.top,left:n.pageX-o.offset().left-c.left});var h={top:n.pageY,left:n.pageX-c.left+i.dim.width/2},s=p(r),u=it(f,h);u!=null&&u.Within&&(t.Cross||u.Elem==s)&&(rt(u.Elem)?(e=it(u.Elem.children,h),e!=null&&(e.Trend<0?e.Elem.before(r):e.Elem.after(r))):u.Elem.append(r),u.Elem!=s&&(l(s),l(u.Elem)),EventKill(n))}}function k(n){i!=null&&(g(!0),EventKill(n))}function d(n){i!=null&&n.keyCode==27&&g(!1)}function g(n){if(v({position:"",top:"",left:"",width:"",height:"",opacity:"",zIndex:""}),n&&t.Callback){var u=i,f=u.after("div",{cls:"line"});r.after(u);r.remove();t.Callback(u,ht(u)-1,function(n){if(n.Status!=1){if(u!=null){var t=p(f),i=p(u);f.before(u);f.remove();l(t);l(i)}n.Msg!=null&&alert(n.Msg)}else f.remove()})}else r.remove();i=null;h=null;r=null;w(!1)}function ot(n){var t=s.height()-a;n.pageY<s.scrollTop()+a&&s.scrollTop(n.pageY-a);n.pageY>s.scrollTop()+t&&s.scrollTop(n.pageY-t)}function nt(t,i){var f=n(t),r=ut(t,f),u=f.offset();return{Trend:u.top+r.height/2<i.top?1:-1,Within:tt(u.top,r.height,i.top)&&tt(u.left,r.width,i.left)}}function tt(n,t,i){return n<=i&&i<=n+t}function it(n,t){var e,r,i,u,f;if(n==null||n.length==0)return null;if(e=n.length,i=st(n),i!=null&&(r=nt(i,t),!r.Within&&r.Trend<0))return{Elem:i,Trend:-1,Within:!1};for(u=null,f=0;f<e;f++)if(i=n[f],y(i)){if(r=nt(i,t),r.Within)return{Elem:i,Trend:r.Trend,Within:!0};if(r.Trend<0)return u;u={Elem:i,Trend:1,Within:!1}}return u}function st(n){for(var i,r=n.length,t=0;t<r;t++)if(i=n[t],y(i))return i;return null}function ht(n){for(var t=0;n!=null;)n.s&&t++,n=n.prev();return t}function ct(n){r=n.after("div",{cls:t.PH,style:{height:px(n.dim.height),width:px(n.dim.width)}});r.append("div")}function lt(){var e,r,i;for(f=t.Folder==null?null:n.find(t.Folder,u),(f==null||f.length==0)&&(f=[u]),e=f.length,i=0;i<e;i++)r=f[i],r.s=!0,at(r)}function rt(n){for(var i=n.children.length,t=0;t<i;t++)if(y(n.children[t]))return!0;return!1}function at(i){for(var f=i.children.length,r,u=0;u<f;u++)(r=i.children[u],r.s=n.find.matchesSelector(r,t.Item),r.s)&&(r.dim=ut(r))}function ut(t,i){return typeof t.dim!="undefined"?t.dim:(typeof i=="undefined"&&(i=n(t)),{height:i.outerHeight(!0),width:i.outerWidth(!0)})}function v(n){var t,r;if(i&&n)for(t in n)r=n[t],i.style[t]=ft.test(t)?px(r):r}function l(i){rt(i)?n("p",i).remove():FE("p",i)==null&&i.append("p",{txt:t.EmptyMsg})}function y(n){return n.s&&n!=i}function p(n){return t.Folder==null?u:n.closest(t.Folder,u)}var u,o;t=OptExtend({Folder:null,EmptyMsg:"Empty folder",Item:null,Grip:null,Cross:!1,Callback:null,PH:"PH"},t);u=this[0];o=n(u);o.css("position","relative");var ft=new RegExp(/(?:height|width|top|left|bottom|right)/),i=null,h=null,c=null,r=null,s=n(window),e=n(document),a=40,f=[];o.mousedown(et)}}(jQuery);eman=new function(){var n=this;n.Trail=new Event;n.Bmark=new Event;n.NavSum=new Event;n.NavGo=new Event;n.Hash=new function(){function r(){i.on("hashchange",n.Run)}function u(n){return!n||n=="#"?null:n.indexOf("#")==0?n.substr(1):n}function f(n){if(!n)return null;var t=n.split("_"),i={Id1:t[0]};return t.length>1&&t[0]!=t[1]&&(i.Id2=t[1]),i}var n=this,t=new Event,i=$(window);n.Change=function(n){t.Add(n)};n.GoTo=function(n){var r,e;(n=u(n),n)&&(r=f(n),r)&&(r.Elem1=FE("#"+r.Id1),r.Elem2=r.Id2!=null?FE("#"+r.Id2):null,r.Elem2!=null&&(e=$(r.Elem1).offset(),i.scrollTop(e.top)),t.Fire(r))};n.Run=function(){var t=window.location.hash;n.GoTo(t)};r()};n.Tools=new function(){function a(){l.Fire()}function i(n){if(t==null||n==null)return!1;var i=v(n);return i!=null&&i.length>0}function v(n){var u,i,f,r;if(t==null||n==null)return null;u=[];for(i in t)if(t[i])for(f=n.length,r=0;r<f;r++)n[r]==i&&u.push(i);return u}var n=this,r={},f=[],e=[],o=[],s=[],h=[],c=[],t={},u={},l=new Event;n.Init=function(n){var u,i;if(n!=null&&(r=n.Competition,f=n.PickTools,e=n.EffectTools,o=n.NovelTools,s=n.AimTools,h=n.GotoTools,c=n.CmTools,n.List!=null&&n.List.length>0))for(u=n.List.length,i=0;i<u;i++)t[n.List[i]]=!0};n.PickClazz=function(){return i(f)};n.EffectClazz=function(){return i(e)};n.NovelClazz=function(){return i(o)};n.AimClazz=function(){return i(s)};n.GotoClazz=function(){return i(h)};n.CmClazz=function(){return i(c)};n.AddHandler=function(n,t){u[n]=t};n.Toggle=function(t,i){i?n.Enable(t):n.Disable(t)};n.Enable=function(t){var f,o,s,e,i;if(typeof r[t]!="undefined"&&(f=r[t],f!=null&&f.length>0))for(o=v(f),s=o.length,e=0;e<s;e++)i=o[e],i!=t&&(u[i]&&u[i](),n.Clear(i));n.Set(t);a()};n.Disable=function(t){n.Clear(t);a()};n.Set=function(n){t[n]=!0};n.Clear=function(n){t[n]&&(t[n]=!1)};n.AddExpire=function(n){l.Add(n)}};n.Shortcuts=new function(){function t(t,r){if(t.which){var u=i(t);typeof n[u]=="undefined"&&(n[u]=new Event);n[u].Add(r)}}function i(n){var t="";return n.ctrlKey&&(t+="ctrl+"),n.shiftKey&&(t+="shift+"),n.altKey&&(t+="alt+"),t+n.which}var r=this,n=[];r.Add=function(n,i){var u,r;if(n&&i)if($.isArray(n))for(u=n.length,r=0;r<u;r++)t(n[r],i);else t(n,i)};$(document).keypress(function(t){var r=document.activeElement,u;(r==null||r.tagName!="INPUT")&&r.tagName!="TEXTAREA"&&r.tagName!="A"&&(u=i(t),typeof n[u]!="undefined")&&n[u].Fire()})}},function(n){n.fn.tt=function(t){function h(n){n.prop({Enable:!1,onmouseover:v,onmouseout:p,onmousemove:y,onmousedown:w})}function a(){i=document.body.append("div",{cls:"Pop",style:{position:"absolute",display:"none",width:px(t.Width)}});o=i.append("div",{cls:"Bd"});r=n(i)}function v(n){n=EventFix(n);this.prop({MouseX:n.pageX,MouseY:n.pageY,Enable:!0});e();b(this)}function y(n){n=EventFix(n);this.prop({MouseX:n.pageX,MouseY:n.pageY});i!=null&&i.isVisible()&&l(this)}function p(){this.Enable=!1;u&&clearTimeout(u);i!=null&&i.isVisible()&&e()}function w(){this.Enable=!1;u&&clearTimeout(u);i!=null&&i.isVisible()&&e()}function b(n){var t,r;i||a();t="CacheTT";n[t]==null?(r=null,r=n.tagName=="A"&&n.hasAttribute("href")&&!n.hasAttribute("data-docid")?{cmd:"href",value:n.attr("href")}:n.tagName=="A"&&n.hasAttribute("data-docid")?{cmd:"novel",docid:n.attr("data-docid"),indirect:n.attrB("data-indirect")}:{cmd:"sdate",value:n.attr("data-sdate")},d(r,function(i){i.Status==1?(n[t]=i.Html,c(n,i.Html)):n[t]=""})):c(n,n[t])}function c(n,r){i&&n.Enable&&(f.CloseOthers(),f.Enable(),o.innerHTML=r,u&&clearTimeout(u),u=setTimeout(function(){l(n);i.show("block")},t.Delay))}function e(){i&&(f.Disable(),i.hide(),o.empty())}function l(n){var u=k(n)||"";i.className="Pop "+u;switch(u){case"N":i.style.top=px(n.MouseY-r.outerHeight()-t.Offset.n);i.style.left=px(n.MouseX-r.outerWidth()/2);break;case"E":i.style.top=px(n.MouseY-r.outerHeight()/2);i.style.left=px(n.MouseX+t.Offset.e);break;case"S":i.style.top=px(n.MouseY+t.Offset.s);i.style.left=px(n.MouseX-r.outerWidth()/2);break;case"W":i.style.top=px(n.MouseY-r.outerHeight()/2);i.style.left=px(n.MouseX-r.outerWidth()-t.Offset.w)}}function k(n){switch(t.Pos){case"N":return n.MouseY-r.outerHeight()-t.Offset.n>0?"N":"S";case"E":return n.MouseX+r.outerWidth()+t.Offset.e<s.width()?"E":"W";case"S":return n.MouseY+r.outerHeight()+t.Offset.n<s.height()?"S":"N";case"W":return n.MouseX-r.outerWidth()-t.Offset.e>0?"W":"E"}}function d(n,i,r){AjaxHtml(t.HandlerUrl,n,i,r)}t=OptExtend({HandlerUrl:"/handler/tooltip.ashx",Width:600,Offset:{n:20,e:30,s:38,w:30},Pos:"E",Delay:200},t);var i=null,r=null,o=null,u=null,f=null,s=n(window);f=Wgm.Add({Close:e,Level:0});this.each(function(){h(this)});window.AttachTooltip=h}}(jQuery),function(n){n.fn.trafo=function(t){function h(i){for(var s,h=i.attr("data-tc")||t.TS,u=i.parentNode.append("div",{cls:h}),c=u.append("a"),l=c.append("span"),e=u.append("ul",{style:{display:"none"}}),o=0,a=i.options.length;o<a;o++)s=i.options[o],e.append("li",{option:s,html:s.text,onclick:k});i.hide();u.prop({cap:l,ul:e,select:i,activeIndex:i.selectedIndex});n(e).wheelnobubble();r.push(u);f(u)}function c(i){var u=i.attr("data-tc")||t.TR,r=CE("span",{cls:u});r.toggleClass(t.CC,i.checked);i.wrap(r);n(i).change(l)}function l(){n("input[type='radio'][name='"+this.name+"']").each(function(){this.parentNode.toggleClass(t.CC,this.checked)})}function a(i){var u=i.attr("data-tc")||t.TC,r=CE("span",{cls:u});r.toggleClass(t.CC,i.checked);i.wrap(r);n(i).change(p)}function v(n){var i=n.attr("data-tc")||t.TI;n.wrap("div",{cls:i})}function y(n){var i=n.attr("data-tc")||t.TT,r=n.before("div",{cls:i});r.append(n)}function p(){this.parentNode.toggleClass(t.CC,this.checked)}function w(n){var f=n.target,r=f.closest("div."+t.TS),o;if(r){if(o=f.closest("a",r),!o)return;r.ul.isVisible()?u(r):(d(r),e())}else i=null,e()}function b(t){var r,e;if(i&&i.ul.isVisible()){r=i;switch(t.which){case 13:case 9:e=r.ul.childNodes[r.activeIndex];e.option.selected=!0;f(r);u(r);n(r.select).trigger("change");EventKill(t);break;case 27:u(r);EventKill(t);break;case 38:s(r,-1);EventKill(t);break;case 40:s(r,1);EventKill(t)}}}function k(){var t=this.parentNode.parentNode;this.option.selected=!0;f(t);u(t);n(t.select).trigger("change")}function d(n){i=n;o(n,n.select.selectedIndex);n.ul.show("block");n.addClass("on")}function e(){var f,n,t;if(r&&r.length!=0)for(f=r.length,n=0;n<f;n++)t=r[n],(i==null||t!=i)&&u(t)}function u(n){n.ul.hide();n.removeClass("on");i==n&&(i=null)}function o(n,i){var u,f,r,e;for(n.activeIndex=i,u=n.ul,f=u.children.length,r=0;r<f;r++)e=u.children[r],e.toggleClass(t.AC,r==i)}function f(n){var t=n.select;n.cap.innerHTML=t.options[t.selectedIndex].text}function s(n,t){var r=n.ul.childNodes.length-1,i=n.activeIndex==null?-1:n.activeIndex;t>=0?i++:i--;i>r&&(i=0);i<0&&(i=r);o(n,i)}t=OptExtend({TS:"tfs",TC:"tfc",TR:"tfr",TI:"tfi",TT:"tft",AC:"active",CC:"checked"},t);var r=[],i=null;this.each(function(){switch(this.tagName){case"SELECT":h(this);break;case"INPUT":switch(this.type){case"radio":c(this);break;case"checkbox":a(this);break;case"text":case"password":v(this)}break;case"TEXTAREA":y(this)}});r!=null&&r.length>0&&(n(document).mousedown(w),n(document).keydown(b))}}(jQuery),function(n){n.fn.crumbs=function(){function s(n){var c,i,s;r||(c=n.target,i=c.closest("div.grip",e),i)&&(u()&&i.parentNode!=t&&f(),t=i.parentNode,t.Grip=i,s=t.attr("data-handler"),s)&&(t.Bubble?u()?f():o():(r=!0,AjaxForm(s,{},function(n){r=!1;n&&(h(n.Data),o())})),EventKill(n))}function h(n){if(n){var u,i,r,f;for(t.Bubble=t.append("div",{cls:"bubble",style:{display:"none"}}),f=n.length,u=0;u<f;u++)i=n[u],r=CE("a",{html:i[0]}),i[1]!=null&&(r.href=i[1]),i[2]&&r.addClass("selected"),i[3]&&r.addClass("disabled"),t.Bubble.append(r)}}function u(){return!t||!t.Bubble?!1:t.Bubble.isVisible()}function o(){if(t.Bubble){i.CloseOthers();i.Enable();t.Bubble.show();var r=FE(".selected",t.Bubble);r&&n(t.Bubble).scrollTop(n(r).position().top+n(t.Bubble).scrollTop());t.Grip.addClass("selected")}}function f(){t.Grip.removeClass("selected");t.Bubble&&t.Bubble.hide();i.Disable()}var e=this[0],r=!1,t=null,i=null;i=Wgm.Add({Close:function(){u()&&f()},Level:0});n(e).click(s)}}(jQuery),function(n){n.fn.search=function(t){function b(n){n=EventFix(n);a();EventKill(n)}function k(){setTimeout(function(){i.hide();o()},200)}function d(n){if(n=EventFix(n),/27$|38$|40$/.test(n.which)&&i.isVisible()||/^13$|^9$/.test(n.which)&&u!=null){EventKill(n);switch(n.which){case 38:v(-1);break;case 40:v(1);break;case 9:case 13:rt();break;case 27:i.hide();o()}}else n.which==40&&!i.isVisible()&&r.length>0?(i.show("block"),v(1)):n.which==13?(EventKill(n),a()):(c&&clearTimeout(c),c=setTimeout(tt,t.Delay))}function g(){o(this.Index)}function nt(){p(this);i.hide();o()}function y(){var n=h.offset(),t=h.width(),r=h.height();i.style.width=ppx(t);i.style.top=px(n.top+r);i.style.left=px(n.left)}function l(){i!=null&&i.isVisible()&&y()}function a(){e.Hidden.value=f.GetValue();e.submit()}function tt(){var n=f.GetValue();f.oldValue!=n&&n.length>=t.MinChars&&(f.oldValue=n,AjaxForm(t.HandlerUrl,{text:n},function(n){n&&n.Data&&n.Status==1&&(i.hide(),o(),i.empty(),it(n.Data),y(),i.show("block"))}))}function it(n){var h,e,t,s,c,l,o,f,a;if(r=[],u=null,n)for(h=n.length,e=0;e<h;e++)if(t=n[e],t.Items!=null&&t.Items.length!=0)for(s=i.append("div",{cls:t.CssClass}),t.Caption&&s.append("h6",{txt:t.Caption}),c=s.append("ul"),l=t.Items.length,o=0;o<l;o++)f=t.Items[o],a=c.append("li",{html:f.Html||f.Text,Text:f.Text,Url:f.Url,Index:r.length,onmouseover:g,onclick:nt}),r.push(a)}function o(n){var f,i;if(r)for(u=typeof n=="undefined"?null:n,f=r.length,i=0;i<f;i++)r[i].toggleClass(t.SC,u==i)}function rt(){u!=null&&(p(r[u]),i.hide(),o())}function p(n){n.Url?window.location.href=n.Url:(f.SetValue(n.Text),f.oldValue=n.Text,a())}function v(n){var i=r.length-1,t=u==null?-1:u;n>=0?t++:t--;t>i&&(t=0);t<0&&(t=i);o(t)}var s,i,f,w;if(t=OptExtend({SearchUrl:"/hladanie",Focus:!1,Method:"get",HandlerUrl:"/handler/suggest.ashx",Delay:200,SC:"suggest_over",MinChars:2},t),s=this[0],s){var h=n("> table",s),r=[],u=null,c=null,e=document.SearchForm;e||(e=document.body.append("form",{action:t.SearchUrl,method:t.Method}),e.Hidden=e.append("input",{type:"hidden",name:"text"}),document.SearchForm=e);i=document.SearchBox;i||(i=document.body.append("div",{cls:"suggest",style:{position:"absolute",display:"none"}}),document.SearchBox=i);f=FE("input",s,{attr:{autocomplete:"off"},onblur:k,onkeydown:d});t.Focus&&f.focus();w=FE("button",s,{onclick:b});n(window).bind({load:l,resize:l,scroll:l})}}}(jQuery),function(n){n.fn.ressum=function(t){function f(n){var f=n.target,u=f.closest("a.NodeIcon",i),t;u&&(t=u.parentNode,t.exp=u,t.exp.img=FE("img",t.exp),t.IsLoaded?s(t)&&(t.IsExpanded=!t.IsExpanded,t.Body.toggle(t.IsExpanded),r(t)):e(t))}function e(n){l("Sum",{DocId:n.attrI("data-docid"),SliceId:n.attrI("data-sliceid"),FragId:n.attrI("data-f")},function(t){t.Status==1&&(n.IsLoaded=!0,n.IsExpanded=!0,u(n,t.Data))})}function u(n,t){for(var i,e,f=0;f<t.length;f++)i=t[f],e=h(n,i[0]),e||(e=o(n,i)),i[7]&&u(e,i[7]);r(n)}function o(n,t){var i=CE("div",{cls:"Node1",attr:{"data-f":t[0],"data-docid":t[1]}}),u=t[2];return u!=null&&i.attr("data-sliceid",u),i.Url=t[3],i.Name=t[4],i.Note=t[5],i.HasChild=t[6],i.IsExpanded=!1,i.IsLoaded=!1,n.HasChild=!0,i.exp=i.append("a",{cls:"NodeIcon"}),i.exp.img=i.exp.append("img"),i.Url!=null?i.append("a",{cls:"NodeLink",title:i.Name,href:i.Url,html:i.Name}):i.append("span",{cls:"NodeName",title:i.Name,html:i.Name}),i.Note!=null&&i.append("span",{cls:"NodeNote",html:"("+i.Note+")"}),r(i),n.Body||(n.Body=n.after("div",{cls:"NodeBody",style:{display:n.IsExpanded?"":"none"}})),n.Body.append(i),i}function s(n){return n.Body&&n.Body.hasChildren()}function h(n,t){var r,i,u;if(!n.Body)return null;for(r=n.Body.children,i=0;i<r.length;i++)if(u=r[i],u.attrI("data-f")==t)return u;return null}function r(n){if(n.exp&&n.exp.img){var t=n.HasChild?n.IsLoaded?n.IsExpanded?-1:1:1:0;c(n,t)}}function c(n,t){if(n.exp&&n.exp.img){var r=n.exp,i=n.exp.img;switch(t){case-1:i.src="/res/minus0.png";r.title=i.alt=rs("Zpl.Pack");break;case 0:i.src="/res/none.png";r.title=i.alt=rs("Zpl.Nochildren");break;case 1:i.src="/res/plus0.png";r.title=i.alt=rs("Zpl.Unpack")}}}function l(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}var i;(t=OptExtend({HandlerUrl:"/handler/rule.ashx"},t),i=this[0],i)&&n(i).click(f)}}(jQuery),function(n){n.fn.facet=function(n){function e(){t.Body=t.append("div");t.Name="ROOT";t.IsLoaded=!0;i(t,n.Data)}function i(n,t){var u,r,f;if(t)for(u=0;u<t.length;u++)r=t[u],f=s(n,r[0]),f||(f=o(n,r[0],r[1],r[2],r[3],r[4],r[5],r[6])),r[7]&&i(f,r[7])}function o(t,i,r,u,f,e,o,s){var l=CE("div",{cls:"FacN",NodeId:i,IsExpanded:e,IsChecked:o,IsLoaded:n.CanLoad,HasChild:s}),v;return l.exp=l.append("img",{cls:"FacE",src:"/res/"+(l.HasChild?l.IsExpanded?"facc.png":"face.png":"trans16.png"),onclick:c}),v=r,f&&f>0&&(v+=" ("+f+")"),l.append("a",{cls:o?"FacT2":"FacT",txt:r,title:v,onclick:a}),f&&f>0&&l.append("span",{cls:"FacC",txt:"("+f+")"}),h(t,l),l}function s(n,t){var r,i,u;if(!n.Body)return null;for(r=n.Body.children,i=0;i<r.length;i++)if(u=r[i],u.NodeId==t)return u}function h(n,t){var i=f(n);i.append(t);r(n)}function u(n){return n.Body&&n.Body.hasChildren()}function f(n){return n.Body||(n.Body=n.after("div",{cls:"FacB",style:{display:n.IsExpanded?"":"none"}})),n.Body}function c(){var t=this.parentNode;!t.IsLoaded&&n.CanLoad?v(t):u(t)&&(t.IsExpanded=!t.IsExpanded,t.Body.toggle(t.IsExpanded),r(t))}function r(n){n.exp&&(n.exp.src="/res/"+l(n))}function l(n){return n.IsLoaded?u(n)?n.IsExpanded?"facc.png":"face.png":"trans16.png":n.IsExpanded?n.HasChild?"face.png":"facc.png":"face.png"}function a(){var t=this.parentNode;__doPostBack("facet",n.TreeId+","+t.NodeId)}function v(t){t.IsLoaded||(t.HasChild==!1?!0:!1)||y("Load",{TreeId:n.TreeId,NodeId:t.NodeId},function(n){n.Status==1&&(t.IsLoaded=!0,t.IsExpanded=!0,f(t),t.Body.toggle(t.IsExpanded),r(t),i(t,n.Data))})}function y(t,i,r,u){var f=n.HandlerUrl+"?Cmd="+t;AjaxForm(f,i,r,u)}n=OptExtend({TreeId:null,CanLoad:null,Data:null,HandlerUrl:"/handler/facet.ashx"},n);var t=this[0];e()}}(jQuery),function(n){n.fn.toolbar=function(){}}(jQuery),function(n){n.fn.docctn=function(t){function h(n){var r=n.closest(".dc",i),t;return r?(t=FE("> s > a:last",r),!t)?null:t.id:null}function v(n){var r=n.Elem1,f=n.Elem2,i,u;if(c(),!r){w(n.Id1,n.Id2);return}i=l(r);i!=null&&(u=l(f),y(i,u),t.Trail&&Uap.IsAuthenticated&&_AjaxFormBmark("Trail_IU",{ItemId:i.attrI("data-f"),SliceId:t.SliceId},function(n){n.Status==1&&(eman.Trail.Fire(n.Trails),eman.Bmark.Fire(n.Bmarks))}))}function c(){n("."+t.HL,i).removeClass(t.HL);f!=null&&(f.remove(),f=null)}function y(n,r){var e,u;if(n!=null){if(r==null&&(r=n),n.addClass(t.HL),e=FE(".dc",n),e!=null&&(f=e.prepend("b"),f.append("u",{cls:"Eraser",onclick:c})),n.rowIndex<r.rowIndex)for(u=n.rowIndex;u<=r.rowIndex;u++)i.children[u].addClass(t.HL);p(r)}}function p(n){for(var u,f=a(n),e=i.children.length,r=n.rowIndex+1;r<e;r++){if(u=i.children[r],a(u)<=f)break;u.addClass(t.HL)}}function l(n){return n==null||!i.contains(n)?null:n.closest("tr[data-f]",i)}function a(n){var t=FE(".dc,.bc",n);return t!=null?parseLevel(t.className):0}function w(i,u){var f,e;r&&(r.empty(),r.show("block"),r.append("strong",{html:rs("Zpl.WasEarlierMissing")}),f=r.append("div",{cls:"wait"}),f.append("img",{src:"/res/loading.gif",alt:""}),f.append("span",{txt:rs("Zpl.WasEarlierWorking")}),e=n(r).offset().top-200,s.scrollTop(e),b("WasEarlier",{ItemId:t.DocId,SliceId:t.SliceId,Id1:i,Id2:u},function(n){var o,i,h,t,u;if(f.remove(),n.Status==1)if(n.Items&&n.Items.length>0){for(r.append("p",{txt:rs("Zpl.WasEarlier1")}),o=r.append("div",{cls:"Items"}),i=0,h=n.Items.length;i<h;i++)t=n.Items[i],u=rs("Zpl.TextVersion")+" "+t[1],t[2]!=null&&(u+=" - "+t[2]),o.append("a",{html:u,href:t[3]});s.scrollTop(e)}else r.append("p",{txt:rs("Zpl.WasEarlier0")});else r.append("p",{txt:rs("Zpl.ServerError")})}))}function b(n,i,r,u){var f=t.RuleHandler+"?Cmd="+n;AjaxForm(f,i,r,u)}var e,r,u;if(t=OptExtend({DocId:null,SliceId:null,IsFull:!1,RuleHandler:"/handler/rule.ashx",EffectClazz:"EFFECT",PickClazz:"PICK",NovelClazz:"NOVEL",GotoClazz:"GOTO",HL:"HL",Trail:!1},t),e=this[0],e){var i=FE(".Frags",e),s=n(window),o=null,f=null;n(i).click(function(n){var e=n.target,s=e.closest(".dc"),t,r,u,f;if(s&&(t=e.closest("a",s),t))if(t.className=="linknote")o=t;else if(t.className=="linkppc"){if(r=h(t),!r)return;if(u=o!=null&&o.attr("href")=="#"+r?o:FE("a.linknote[href='#"+r+"']",i),!u)return;if(f=h(u),!f)return;window.location.hash="#"+f}});r=t.IsFull?null:FE(".was-earlier",e);eman.Hash.Change(v);u=eman.Tools;u.AddExpire(function(){i.toggleClass(t.EffectClazz,u.EffectClazz());i.toggleClass(t.PickClazz,u.PickClazz());i.toggleClass(t.NovelClazz,u.NovelClazz());i.toggleClass(t.AimClazz,u.AimClazz());i.toggleClass(t.GotoClazz,u.GotoClazz())})}}}(jQuery),function(n){n.fn.xtable=function(){function l(){e==null&&(e=a());n("table",f).each(function(){if(s=n(this),r=s.parent(),t=r.parent(),r.attr("style",null),t.attr("style",null),h=s.outerWidth(),c=t.width(),!(h<=c)){u=Math.round(c/h*100)/100;switch(e){case 1:r.css({transform:"scale("+u+")","transform-origin":"0 0"});t.css("max-height",Math.round(t.height()*u)+10);break;case 2:r.css({zoom:u});v()&&t.css("max-height",Math.round(t.height()*u)+10)}}})}function a(){return typeof i.zoom!="undefined"?2:typeof i.transform!="undefined"||typeof i.WebkitTransform!="undefined"||typeof i.MozTransform!="undefined"||typeof i.msTransform!="undefined"||typeof i.OTransform!="undefined"?1:0}function v(){return o==null&&(o=document.documentElement.hasClass("ie8")),o}var f=this[0];if(f){var e=null,o=null,s=null,r=null,t=null,h=null,c=null,u=null,i=document.body.style;l();f.ZoomTables=l}}}(jQuery),function(n){n.fn.fragnotes=function(t){function p(){n("a.linknote",a).bind({mouseenter:b,mouseleave:k});l=Wgm.Add({Close:function(){e();o();i!=null&&(i.hide(),h.empty())},Level:1})}function w(){i=document.body.append("div",{cls:"Pop N",style:{display:"none",width:"600px"}});h=i.append("div",{cls:"Bd"});s=n(i);s.bind({mouseenter:d,mouseleave:g})}function b(){r=this;u=n(this);e();c=setTimeout(nt,t.D1);o()}function k(){r=null;u=null;e();o();f=setTimeout(y,t.D2)}function d(){r=null;u=null;e();o()}function g(){r=null;u=null;e();o();f=setTimeout(y,t.D2)}function nt(){r&&(i||w(),it(r))}function v(n,t){i&&(l.CloseOthers(),l.Enable(),h.innerHTML=t,i.show("block"),tt())}function y(){i&&(i.hide(),h.empty(),l.Disable())}function tt(){if(i&&r){var n=u.offset();i.css({top:px(n.top-s.outerHeight()-t.Aro),left:px(n.left+u.outerWidth()/2-s.outerWidth()/2)})}}function it(n){var i="CacheAssistant",r=ut(n),u=r!=null?r.attrI("data-s"):null;n[i]==null?rt("Assistant",{DocId:t.DocId,SliceId:u!=null?u:t.SliceId,Href:n.attr("href")},function(t){t.Status==1?(n[i]=t.Html,v(n,t.Html)):n[i]=""}):v(n,n[i])}function rt(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxHtml(f,i,r,u)}function ut(n){return n==null||!a.contains(n)?null:n.closest("tr[data-f]",a)}function e(){c!=null&&(clearTimeout(c),c=null)}function o(){f!=null&&(clearTimeout(f),f=null)}t=OptExtend({DocId:null,SliceId:null,HandlerUrl:"/handler/rule.ashx",D1:400,D2:400,Aro:12},t);var a=this[0],i=null,s=null,h=null,r=null,u=null,c=null,f=null,l=null;p()}}(jQuery),function(n){n.fn.toolsum=function(t){function c(){if(i!=null&&r!=null)u.scrollTop(r);else if(window.location.hash==t.AnSum){var f=n(t.AnSum);u.scrollTop(f.offset().top+f.outerHeight()-100)}else window.location.hash=t.AnSum;o()}function l(n){if(n.keyCode==8){var t=n.target;t.closest("input,textarea",document.body)||o()}}function o(){if(n("div.Last",e).removeClass("Last"),i!=null&&r!=null){switch(f){case 0:var t=FE("div.Node[data-f="+i.attrI("data-f",0)+"]",e);t&&t.addClass("Last");break;case 1:i.focus();i.select()}i==null}}t=OptExtend({Sum:".doc-sum",AnSum:"#Sum"},t);var s=this[0],e=FE(t.Sum),h=FE(".Switch",s),i=null,f=0,r=null,u=n(window);n(h).click(c);n(document).keyup(l);eman.NavSum.Add(function(n){i=n;f=0;r=u.scrollTop()});eman.NavGo.Add(function(n){i=n;f=1;r=u.scrollTop()})}}(jQuery),function(n){n.fn.toolanchor=function(t){function k(){eman.Tools.AddHandler("anchor",function(){f();v(!1)});o=Wgm.Add({Close:f,Level:1});Setup.ValueB0(t.Key)&&(n(h).bind("click",l),eman.Tools.Set("anchor"),w.title=rs("Zpl.AnchorPinTitle2"))}function l(t){var i,u,e;if((f(),i=t.target,r.contains(i))&&i.closest(".dc",r)&&!i.closest("a",r)&&(u=i.closest("tr[data-f]",r),u&&u.hasClass("GO")&&(e=i.closest(".dc",r),e!=null))){if(!e.hasChildren()||i.closest("a",r))return;n(".THIS",r).removeClass("THIS");u.addClass("THIS");y(e)}}function d(){c&&(u=!u,this.toggleClass("Active",u),y(c))}function g(){f();var n=e.toggleClass("ON");StandStill(r,function(){v(n)})}function v(i){i?(n(h).bind("click",l),eman.Tools.Enable("anchor"),e.addClass("ON"),Setup.Update(t.Key,!0)):(n(h).unbind("click",l),eman.Tools.Disable("anchor"),e.removeClass("ON"),Setup.Update(t.Key,!1))}function nt(){i=document.body.append("div",{cls:"Pop N",style:{display:"none",width:"700px"}});var r=i.append("div",{cls:"Hd"});r.append("a",{cls:"Close",onclick:f});tt(r);i.header=r.append("ul");i.body=i.append("div",{cls:"Bd"});s=n(i);a=new PopupTabs({Popup:i,Header:i.header,Body:i.body,Key:t.TabKey})}function tt(n){var u=n.append("table",{cls:"AnchorBar"}),f=u.append("tbody"),t=f.append("tr"),r;t.append("td",{cls:"c1",html:rs("Zpl.ToolAnchor")});r=t.append("td",{cls:"c2"});i.float=r.append("a",{cls:"FloatSw",onclick:d,style:{display:"none"}});i.float.append("i");i.float.append("span",{html:rs("Zpl.FloatedVersion"),title:rs("Zpl.FloatedVersionT")})}function y(n){var f,e;if(i||nt(),f="CacheAnchor",n[f]==null||n[f].IsFloating!=u){if(e=n.closest("tr[data-f]",r),!e)return;it("Anchor",{FragId:e.attrI("data-f"),SliceId:t.IsFull?null:t.SliceId,IsFull:t.IsFull,IsFloating:u},function(t){t.Status==1?(n[f]=t,p(n,t)):n[f]={}})}else p(n,n[f])}function p(r,u){i&&(o.CloseOthers(),o.Enable(),c=r,i.body.innerHTML=u.Html||"",i.float.toggle(u.AllowFloating),a.Init(),b.attach(".ZC",i.body),setTimeout(function(){var e=n(r),u=e.offset(),f;i.style.top=px(u.top-s.outerHeight()-t.AroH);i.style.left=px(u.left+(e.outerWidth()-s.outerWidth())/2);i.show("block");f=u.top-s.outerHeight()-t.AroH-100;f<n(window).scrollTop()&&n("html, body").animate({scrollTop:f},500)},100))}function f(){i&&(o.Disable(),i.hide(),i.body.empty(),n(".THIS",r).removeClass("THIS"))}function it(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}t=OptExtend({HandlerUrl:"/handler/rule.ashx",SliceId:null,IsFull:!1,Key:"anchor",TabKey:"anchor_tab",AroH:12},t);var e=this[0],w=FE(".Switch",e,{onclick:g}),r=FE(".Frags"),h=FE("form#Main",document.body),o=null,i=null,s=null,a=null,b=new CopyWrapper,u=!1,c=null;k()}}(jQuery),function(n){n.fn.tooldiff=function(t){function nt(){eman.Tools.AddHandler("diff",function(){r.removeClass("ON");v();window.location.href=PageUrl()});c=Wgm.Add({Close:h,Level:1});var t=y();t!=null&&t.length>0&&(r.addClass("ON"),eman.Tools.Set("diff"),s||o==null||(s=n.find(".DIF",o)));n(window).resize(function(){i&&i.isVisible()&&d(i.num==1?f:e)})}function l(){var i,r;if(s!=null&&(i=s.length-1,i>-1)){if(this.hasClass("First"))u=0;else if(this.hasClass("Next")){if(u+1>i&&!confirm(rs("Zpl.DiffAgainFirst")))return;u++}else if(this.hasClass("Prev")){if(u-1<0&&!confirm(rs("Zpl.DiffAgainLast")))return;u--}else this.hasClass("Last")&&(u=i);u>i&&(u=0);u<0&&(u=i);r=n(s[u]).offset();r!=null&&n("html,body").animate({scrollTop:r.top-10-t.MnT},"slow")}}function y(){return Setup.ValueS(t.Key)}function p(n){Setup.Update(t.Key,n)}function v(){Setup.Update(t.Key,null)}function tt(){var n,t;Wgm.Close();n=y();n!=null&&n.length>0?(eman.Tools.Disable("diff"),v(),ShowSplash2()):(eman.Tools.Enable("diff"),p("y"),ShowSplash2());o!=null&&o.ZoomTables&&o.ZoomTables();t=PageUrl();window.location.href=t}function it(){Wgm.Close();eman.Tools.Disable("diff");v();ShowSplash2();window.location.href=PageUrl()}function w(n,r){t.SlicesCount!=1&&(i!=null&&i.isVisible()?i.num==r?h():b(n,r):b(n,r))}function rt(n){var s,u,r,l,o,c;if((n=EventFix(n),s=n.target,u=s.closest("tbody",this),u)&&(r=s.closest("tr",u),r)){if(r.hasClass(t.DC)||r.hasClass(t.OC))return;if(r.hasClass(t.AC)){h();return}for(l=u.children.length,o=0;o<l;o++)c=u.children[o],c.toggleClass(t.AC,c==r);i.num==1?f.prop({html:FE("td",r).html(),attr:{"data-version":r.attr("data-version"),"data-id":r.attr("data-id"),"data-url":r.attr("data-url")}}):i.num==2&&e.prop({html:FE("td",r).html(),attr:{"data-version":r.attr("data-version"),"data-id":r.attr("data-id")}});h();p(t.DocId+","+f.attr("data-id")+"-"+e.attr("data-id"));window.location.href=f.attr("data-url")}}function ut(){i=document.body.append("div",{cls:"Pop W",style:{display:"none",width:"300px",position:"fixed"}});i.append("div",{cls:"Aro"});var t=i.append("div",{cls:"Hz"});t.append("a",{cls:"Close",onclick:h});i.cap=t.append("div",{cls:"DslCap"});i.body=i.append("div",{cls:"DslGrid",onclick:rt});a=n(i);n(i.body).wheelnobubble()}function b(n,r){i||ut();i.num=r;n.cache==null?ft("DiffSlices",{DocId:t.DocId,SliceId:r==1?f.attr("data-id"):e.attr("data-id"),OccupiedId:r==1?e.attr("data-id"):f.attr("data-id"),AddUrl:r==1},function(t){t.Status==1?(n.cache=t.Html,k(n,t.Html)):n.cache=""}):k(n,n.cache)}function k(r,u){i&&(c.CloseOthers(),c.Enable(),i.body.innerHTML=u,setTimeout(function(){var u;if(i.cap.txt(i.num==1?rs("Zpl.DiffSlice1"):rs("Zpl.DiffSlice2")),d(r),i.show("block"),u=FE("tr."+t.AC,i.body),u!=null){var o=n(u),s=n(i.body),h=o.position().top-o.height()+s.scrollTop();s.scrollTop(h)}f.toggleClass(t.AC,i.num==1);e.toggleClass(t.AC,i.num!=1)},100))}function d(r){if(i){var u=n(r),f=u.offset();i.style.top=px(f.top+u.outerHeight()/2-a.outerHeight()/2-n(window).scrollTop());i.style.left=px(f.left-a.outerWidth()-t.AroW)}}function h(){i&&(c.Disable(),i.hide(),i.body.empty(),f.removeClass(t.AC),e.removeClass(t.AC))}function ft(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxHtml(f,i,r,u)}var r,g;t=OptExtend({DocId:null,SlicesCount:null,Key:"diff",AC:"active",DC:"disabled",OC:"occupied",HandlerUrl:"/handler/rule.ashx",AroW:12,MnT:56},t);r=this[0];FE(".Close",r,{onclick:it});g=FE(".Switch",r,{onclick:function(){tt()}});FE("a.First",r,{onclick:l});FE("a.Prev",r,{onclick:l});FE("a.Next",r,{onclick:l});FE("a.Last",r,{onclick:l});var f=FE(".Slice1",r,{onclick:function(){w(this,1)}}),e=FE(".Slice2",r,{onclick:function(){w(this,2)}}),o=FE(".Frags"),u=-1,s=null,c=null,i=null,a=null;t.SlicesCount==null&&(t.SlicesCount=1);nt()}}(jQuery),function(n){n.fn.toolcomment=function(t){function g(){eman.Tools.AddHandler(t.Key,function(){Setup.Update(t.Key,!1);r.removeClass("ON");s(!1);o(!1)});e(t.Data);Setup.ValueB0(t.Key)&&(eman.Tools.Set(t.Key),r.addClass("ON"),l(!0))}function e(n){f.empty();n==null||n.length==0?f.append("p",{html:rs("Zpl.CommentEmpty")}):nt(n)}function nt(n){for(var t,r,u=n.length,i=0;i<u;i++)t=n[i],r=f.append("a",{BaseId:t[0],FID:t[1],title:t[2],href:t[4]}),r.append("strong",{txt:t[2]}),r.append("span",{txt:t[3]})}function tt(){var n=r.toggleClass("ON");eman.Tools.Toggle(t.Key,n);Setup.Update(t.Key,n);n||o(!1);StandStill(i,function(){s(n)})}function it(){r.removeClass("ON");eman.Tools.Disable(t.Key);Setup.Update(t.Key,!1);s(!1);o(!1)}function rt(){o()}function o(n){typeof n=="undefined"&&(n=!r.hasClass("AddItemActive"));r.toggleClass("AddItemActive",n);i.toggleClass("AddCm",n)}function s(t){i!=null&&(n(".THIS",i).removeClass("THIS"),i.toggleClass("ShowCm",t),l(t))}function l(t){t?(n(i).bind({click:a,dblclick:v}),n(document).bind({keyup:p,keydown:y})):(n(i).unbind("click",a).unbind("dblclick",v),n(document).unbind("keyup",p).unbind("keydown",y))}function ut(n){var a=k(n),v=ht(n),r=n.before("tr",{cls:t.CB,attr:{"data-b":a,"data-new":1}}),i,o,h,e,c,l;if(ft(n,r),i=FE(".bc",r),i){o=i.append("s");o.append("a",{id:"c"+v});var f=i.append("div",{cls:"body"}),s=f.append("div",{cls:"edit-bar"}),y=s.append("a",{cls:"edit",title:rs("Zpl.FragCommentEditT")});y.append("i");h=s.append("a",{cls:"delete",title:rs("Zpl.FragCommentDelT")});h.append("i");e=f.append("div",{cls:"save-bar"});c=e.append("a",{cls:"save",title:rs("Zpl.FragCommentSaveT")});c.append("span",{txt:rs("Zpl.FragCommentSave")});l=e.append("a",{cls:"cancel",title:rs("Zpl.FragCommentCancelT")});l.append("span",{txt:rs("Zpl.FragCommentCancel")});f.append("div",{cls:"value"});u(r,!1,!0)}}function ft(n,t){for(var i,u=n.children.length,r=0;r<u;r++)i=n.children[r],i.hasClass("dc")?t.append("td",{cls:"bc L"+parseLevel(i.className)}):t.append(i.tagName.toLowerCase(),{cls:i.className})}function a(n){var u=n.target,f,r,e;if(i.hasClass("AddCm")&&(f=u.closest(".CC",i),f)){e=k(f);r=ct(e);r!=null?r.hasClass(t.EM)?et(r):h(r):ut(f);return}if(r=u.closest("."+t.CB,i),r){if(u.closest(".edit",r)){h(r);return}if(u.closest(".delete",r)){ot(r);return}if(u.closest(".save",r)){w(r);return}if(u.closest(".cancel",r)){b(r);return}}}function v(n){var u=n.target,r=u.closest("."+t.CB,i);r&&(r.hasClass(t.EM)||(h(r),EventKill(n)))}function y(r){!r.ctrlKey||r.shiftKey||r.altKey||(r.keyCode==83||r.keyCode==115)&&(n("."+t.CB,i).each(function(){this.hasClass(t.EM)&&w(this)}),EventKill(r))}function p(r){r.keyCode==27&&n("."+t.CB+"."+t.EM,i).each(function(){b(this)})}function u(i,r,u){var e=FE(".value",i),f,o;e&&(f=FE("textarea",i),f||(o=e.before("div",{cls:"editor"}),f=o.append("textarea"),n(f).tar()),i.toggleClass(t.EM,u),u?(r&&n(f).val(n(e).text()),f.Resize(),lt(),at(f),f.focus()):r&&n(e).text(n(f).val()))}function et(n){u(n,!1,!0)}function h(n){u(n,!0,!0)}function w(i){var f=FE("textarea",i),r;f&&(r=n.trim(f.value),r?c("Save",{BaseId:i.attrI("data-b"),DocId:t.DocId,SliceId:t.SliceId,Value:r},function(n){n.Status==1&&(i.attr("data-new",null),u(i,!0,!1),e(n.Data))}):i.attrB("data-new",!1)?i.remove():c("Delete",{BaseId:i.attrI("data-b"),DocId:t.DocId,SliceId:t.SliceId},function(n){n.Status==1&&(i.remove(),e(n.Data))}))}function ot(n){var i=FE(".value",n),r=rs("Zpl.DelConfirm")+"\n"+st(i.txt(),20,"...");confirm(r)&&(n.attrB("data-new",!1)?n.remove():c("Delete",{BaseId:n.attrI("data-b"),DocId:t.DocId,SliceId:t.SliceId},function(t){t.Status==1&&(n.remove(),e(t.Data))}))}function b(n){n.attrB("data-new",!1)?n.remove():u(n,!1,!1)}function c(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}function st(n,t,i){return(typeof i=="undefined"&&(i="..."),n==null||n.length==0)?n:t>=n.length?n:n.substr(0,t)+i}function ht(n){var i=n.hasClass(t.CB)?FE(".bc > s a:last",n):FE(".dc > s a:last",n);return i!=null?ToInt(i.id.substr(1)):null}function k(n){return n.attr("data-b")||n.attr("data-f")}function ct(n){return FE("."+t.CB+"[data-b='"+n+"']",i)}function lt(){try{typeof getSelection!="undefined"?window.getSelection().removeAllRanges():typeof document.selection!="undefined"&&document.selection.empty()}catch(n){}}function at(n){if(typeof n.selectionStart!="undefined")n.selectionStart=0,n.selectionEnd=0,n.focus();else{var t=n.createTextRange();t.moveStart("character",0);t.moveEnd("character",0);t.collapse();t.select()}}var r,d,f,i;(t=OptExtend({HandlerUrl:"/handler/comment.ashx",DocId:null,SliceId:null,Key:"comment",Data:null,CB:"comment-bubble",EM:"edit-mode"},t),r=this[0],r!=null)&&(d=FE(".Switch",r,{onclick:function(n){n=EventFix(n);tt()}}),FE(".Close",r,{onclick:it}),f=FE(".Items",r),FE(".AddItem",r,{onclick:rt}),i=FE(".Frags"),g())}}(jQuery),function(n){n.fn.doctabs=function(t){function f(r){var o=r.target,u=o.closest("a",i),f;return u&&(f=e(u),n.cookie(t.Cookie,f)),!0}function e(n){var t=new Date;return n.attr("href")+"|"+n.attr("data-large")+"|"+t.toISOString()+"|"+(r.offset().top-u.scrollTop())}function o(n){if(n==null||n.length==0)return null;var t=n.split("|");return t==null||t.length!=4?null:{Url:t[0],IsLarge:ToBool(t[1],!1),Date:new Date(t[2]),PageY:ToInt(t[3],0)}}function s(){var c=n.cookie(t.Cookie),i,h,f;if(n.cookie(t.Cookie,null),i=o(c),i!=null){var e=window.location.href,l=new Date,s=e.indexOf(i.Url);s<0||s+i.Url.length!=e.length||(h=l-i.Date,h>5e3)||(f=r.offset().top-i.PageY,i.IsLarge?n("html, body").animate({scrollTop:f},300):u.scrollTop(f))}}var i,r,u;(t=OptExtend({Cookie:"SD"},t),i=this[0],i)&&(r=n(i),r.mousedown(f),u=n(window),s())}}(jQuery),function(n){n.fn.docsum=function(t){function o(){e("SumAll",{DocId:t.DocId,SliceId:t.SliceId,IsFloating:t.IsFloating||!1},function(n){var u,t;if(n.Status==1&&n.Data!=null)for(u=n.Data.length,t=0;t<u;t++){var f=n.Data[t],s=f[0],e=f[9],o=FE(".Node[data-f='"+s+"']",i);o&&e!=null&&r(o,e)}})}function s(){var r=n.find(".Node[data-f]",i),f,t,e;if(r)for(f=r.length,t=0;t<f;t++)e=r[t],u(e,!1)}function h(n){var f=n.target,e=f.closest("a.Icon",i),t,r,o;if(e){if(t=e.parentNode,!t.attrB("data-dbchild"))return;t.IsLoaded?a(t)&&u(t,!t.IsExpanded):c(t);return}if(r=f.closest("a.Name",i),r){o=r.closest("div.Node",i);eman.NavSum.Fire(o);return}}function c(n){e("Sum",{DocId:n.attrI("data-docid",t.DocId),SliceId:n.attrI("data-sliceid",t.SliceId),IsFloating:t.IsFloating||!1,FragId:n.attrI("data-f")},function(t){t.Status==1&&r(n,t.Data)})}function r(n,t){for(var i,f,o=t.length,e=0;e<o;e++)i=t[e],f=v(n,i[0]),f||(f=l(n,i)),i[9]&&r(f,i[9]);n.IsLoaded=!0;u(n,!0)}function l(n,i){var r=CE("div",{cls:"Node",attr:{"data-f":i[0]}});return t.DocId==null&&r.attr("data-docid",i[1]),t.SliceId==null&&r.attr("data-sliceid",i[2]),r.Url=i[3],r.Name=i[4],r.Note=i[5],r.attr("data-dbchild",i[6]),r.IsExpanded=!1,r.IsLoaded=!1,r.bTrail=i[7],r.bBmark=i[8],typeof n.Level=="undefined"&&(n.Level=0),r.Level=n.Level+1,r.style.paddingLeft=px(r.Level*t.LevelW),n.attr("data-dbchild",!0),r.exp=r.append("a",{cls:"Icon"}),r.exp.append("img"),r.append("a",{cls:"Name",title:r.Name,href:r.Url,html:r.Name}),r.Note!=null&&r.append("span",{cls:"Note",html:"("+r.Note+")"}),r.bTrail&&w(r),r.bBmark&&b(r),f(r),n.Body||(n.Body=n.after("div",{cls:"Body",style:{display:n.IsExpanded?"":"none"}})),n.Body.append(r),r}function a(n){return n.Body&&n.Body.hasChildren()}function v(n,t){var r,i,u;if(!n.Body)return null;for(r=n.Body.children,i=0;i<r.length;i++)if(u=r[i],u.attrI("data-f")==t)return u;return null}function u(n,t){n.Body&&(n.IsExpanded=t,n.Body.toggle(t),f(n))}function f(n){var t=n.attrB("data-dbchild")?n.IsLoaded?n.IsExpanded?-1:1:1:0;y(n,t)}function y(n,t){var r=p(n),i;if(r){i=n.exp.first();switch(t){case-1:i.src="/res/minus0.png";r.title=i.alt=rs("Zpl.Pack");break;case 0:i.src="/res/none.png";r.title=i.alt=rs("Zpl.Nochildren");break;case 1:i.src="/res/plus0.png";r.title=i.alt=rs("Zpl.Unpack")}}}function p(n){return n.exp||(n.exp=FE("a.Icon",n)),n.exp}function w(n){var t=FE("img.SigT",n);t||n.append("img",{cls:"SigT",src:"/res/trail1.png"});n.addClass("Trail")}function b(n){var t=FE("img.SigB",n);t||n.append("img",{cls:"SigB",src:"/res/bmark1.png"});n.addClass("Bmark")}function e(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}t=OptExtend({DocId:null,SliceId:null,IsFloating:null,LevelW:20,HandlerUrl:"/handler/rule.ashx",ExpandAll:".ExpandAll",CollapseAll:".CollapseAll",Exp:"Exp",HasGrandchild:!0},t);var i=this[0];i&&(t.HasGrandchild&&(FE(t.ExpandAll,i,{onclick:o}),FE(t.CollapseAll,i,{onclick:s})),n(i).click(h))}}(jQuery),function(n){n.fn.branch=function(t){function f(n){var f=n.target,u=f.closest("a.Icon",i),t;u&&(t=u.parentNode,t.exp=u,t.exp.img=FE("img",t.exp),t.IsLoaded?t.Body&&t.Body.hasChildren()&&(t.IsExpanded=!t.IsExpanded,t.Body.toggle(t.IsExpanded),r(t)):e(t))}function e(n){c("Branch",{TreeId:t.TreeId,GroupId:n.attrI("data-groupid")},function(t){t.Status==1&&(n.IsLoaded=!0,n.IsExpanded=!0,u(n,t.Data))})}function u(n,t){for(var i,e,f=0,h=t.length;f<h;f++)i=t[f],e=s(n,i[0]),e||(e=o(n,i)),i[5]&&u(e,i[5]);r(n)}function o(n,t){var i=CE("div",{cls:"Node1",Url:t[1],Name:t[2],Note:t[3],HasChild:t[4],IsExpanded:!1,IsLoaded:!1,attr:{"data-groupid":t[0]}});return n.HasChild=!0,i.exp=i.append("a",{cls:"Icon"}),i.exp.img=i.exp.append("img"),i.Url!=null?i.append("a",{cls:"Link",href:i.Url,html:i.Name}):i.append("span",{cls:"Name",title:i.Name,html:i.Name}),i.Note!=null&&i.append("span",{cls:"Note",html:"("+i.Note+")"}),r(i),n.Body||(n.Body=n.after("div",{cls:"Bd",style:{display:n.IsExpanded?"":"none"}})),n.Body.append(i),i}function s(n,t){var i=n.Body,r,f,u;if(!i||i.children.length==0)return null;for(r=0,f=i.children.length;r<f;r++)if(u=i.children[r],u.attrI("data-groupid")==t)return u;return null}function r(n){var t=n.exp,i;t&&t.img&&(i=n.HasChild?n.IsLoaded?n.IsExpanded?-1:1:1:0,h(n,i))}function h(n,t){if(n.exp&&n.exp.img){var r=n.exp,i=n.exp.img;switch(t){case-1:i.src="/res/minus0.png";r.title=i.alt=rs("Zpl.Pack");break;case 0:i.src="/res/none.png";r.title=i.alt=rs("Zpl.Nochildren");break;case 1:i.src="/res/plus0.png";r.title=i.alt=rs("Zpl.Unpack")}}}function c(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}var i;(t=OptExtend({TreeId:null,HandlerUrl:"/handler/rule.ashx"},t),i=this[0],i)&&n(i).click(f)}}(jQuery),function(n){n.fn.captcha=function(t){function r(t){var u=this,r=n.event.fix(t||window.event);r.keyCode==i.EnterNum&&(r.preventDefault(),r.stopPropagation(),SubmitForm(i.EventTarget,"",i.ValidationGroup))}function u(t){var r=this,i=n.event.fix(t||window.event);i.preventDefault();i.stopPropagation();f(r.image)}function f(n){var t=n.src,i=t.indexOf("?"),r;i>=0&&(t=t.substr(0,i),r=new Date,n.src=t+"?_"+r.getTime())}function e(n){var t=this;return t.ValidationGroup!=n&&n?!0:t.input.value?(t.msg.innerHTML="",t.msg.style.display="none",!0):(t.msg.innerHTML=t.MsgEmpty,t.msg.style.display="block",!1)}var i=n.extend({EventTarget:null,ValidationGroup:null,EchoKey:"captcha-echo",MsgEmpty:null,MsgFail:null,HashKey:"captcha-hash",EnterNum:13,CSSImg:"Image",CSSInput:"Input",CSSReload:"Reload",CSSValid:"Valid",MsgSpan:!1},t);ExtendValidation();this.each(function(){var t=this,h,f,o,s;t.Validate=e;t.MsgEmpty=i.MsgEmpty;t.MsgFail=i.MsgFail;t.EventTarget=i.EventTarget;t.ValidationGroup=i.ValidationGroup;h=n.find("."+i.CSSImg+" img",t)[0];f=n.find("."+i.CSSInput+" input",t)[0];f.onkeypress=r;i.Focus&&f.focus();t.input=f;o=n.find("."+i.CSSReload+" a",t)[0];o.onclick=u;o.image=h;s=i.MsgSpan?n.find("."+i.CSSValid+" span",t)[0]:n.find("."+i.CSSValid+" p",t)[0];s.style.display="none";t.msg=s;i.MsgFail&&(t.msg.innerHTML=i.MsgFail,t.msg.style.display="block")})}}(jQuery),function(n){n.fn.placeholder=function(t){function r(n){i(n)}function u(){i(this,this.hasClass(t.Cls),"")}function f(){i(this)}function i(n,i,r){typeof i=="undefined"&&(i=n.value.length>0);i?(n.removeClass(t.Cls),typeof r!="undefined"&&(n.value=r)):(n.addClass(t.Cls),n.value=n.attr("placeholder"))}t=OptExtend({Cls:"AP"},t);this.each(function(){var e=this;if(e&&e.hasAttribute("placeholder")){if(typeof e.placeholder!="undefined"){e.HasPlaceHolder=function(){return!1};e.GetValue=function(){return n.trim(e.value)};e.SetValue=function(t){e.value=n.trim(ToStr(t,""))};return}e.HasPlaceHolder=function(){return e.hasClass(t.Cls)};e.GetValue=function(){return e.hasClass(t.Cls)?"":n.trim(e.value)};e.SetValue=function(t){t=n.trim(ToStr(t,""));i(this,t.length>0,t)};n(e).bind({focus:u,blur:f});r(e)}})}}(jQuery),function(n){n.fn.slidebranches=function(n){function u(){t.hasClass(n.Exp)?(t.removeClass(n.Exp),i.hide()):(t.addClass(n.Exp),i.show())}var t,i,r;(n=OptExtend({Body:null,Btn:null,Exp:"Exp",Duration:500},n),t=this[0],t)&&(i=FE(n.Body,t),r=FE(n.Btn,t),r&&i)&&(r.onclick=u)}}(jQuery),function(n){n.fn.slideenotes=function(t){function h(){i.hasClass(t.Exp)?(r.style.height=px(s.height()),i.style.overflow="hidden",n(r).animate({height:e},t.Duration,function(){r.style.height="";i.style.overflow="";f.html(o);i.removeClass(t.Exp);u.html(rs("Zpl.ShowMore"))})):(o==null&&(o=f.innerHTML),e==null&&(e=s.height()),r.style.height=px(e),i.style.overflow="hidden",f.html(r.attr("data-note")),n(r).animate({height:s.height()},t.Duration,function(){r.style.height="";i.style.overflow="";i.addClass(t.Exp);u.html(rs("Zpl.ShowLess"))}))}var i;if(t=OptExtend({Note:null,Btn:null,Exp:null,Duration:500},t),i=this[0],i){var r=FE(t.Note,i),u=FE(t.Btn,i),f=FE("p",r),o=null,e=null,s=n(f);u&&r&&(u.onclick=h)}}}(jQuery),function(n){n.fn.favbtn=function(n){function r(){u("FavBtn",{DocId:n.DocId},function(r){r.Status==1&&(i.txt(r.Exist?rs("Zpl.DocFav1"):rs("Zpl.DocFav0")),t.toggleClass(n.AC,r.Exist))})}function u(t,i,r,u){var f=n.HandlerUrl+"?Cmd="+t;AjaxForm(f,i,r,u)}n=OptExtend({DocId:null,AC:"Active",HandlerUrl:"/handler/rule.ashx"},n);var t=this[0],f=FE("a",t,{onclick:r}),i=FE("span i",t)}}(jQuery),function(n){n.fn.favman=function(t){function f(n){n.which==1&&(i=this.closest("table",r),i)&&(i.addClass(t.AC),r.addClass(t.CC),EventKill(n))}function e(t){var f=t.target,i=f.closest("table",r);i&&u("FavDel",{DocId:i.attrI("data-docid")},function(t){t.Status==1&&(n(i).remove(),n("table",r).length==0&&r.append("p",{html:rs("Zpl.FavEmpty")}))})}function o(n){var u,t;i!=null&&(h(n),u=n.target,r.contains(u))&&(t=u.closest("table",r),t?i!=t&&(c(t,n)?t.before(i):t.after(i)):r.last()!=i&&r.append(i),EventKill(n))}function s(n){if(i!=null){i.removeClass(t.AC);r.removeClass(t.CC);var f=i.attrI("data-docid"),e=i.index();(i=null,f!=null&&e!=null)&&(u("FavSort",{DocId:f,Sort:e+1},function(){}),EventKill(n))}}function h(t){var i=n(window),r=40,u=i.height()-r;t.pageY<i.scrollTop()+r&&i.scrollTop(t.pageY-r);t.pageY>i.scrollTop()+u&&i.scrollTop(t.pageY-u)}function c(t,i){var r=n(t),u=r.offset();return i.pageY>=u.top&&i.pageY<u.top+r.height()/2}function u(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}var r,i;t=OptExtend({AC:"Act",CC:"Cur1",HandlerUrl:"/handler/rule.ashx"},t);r=this[0];i=null;n("img.Sort",r).mousedown(f);n("img.Del",r).click(e);n(document).bind({mouseup:s,mousemove:o})}}(jQuery),function(n){n.fn.cookieperm22=function(t){function w(){for(var u,f,i,e=t.DoNotDelete.split(","),o=document.cookie.split(";"),r=0;r<o.length;r++){for(u=o[r].split("=")[0],f=!0,i=0;i<e.length;i++)if(e[i]==u){f=!1;break}f&&n.cookie(u,"",{expires:-1,path:"/"})}}function l(n,t,i){if(n!=null){var r=n.split(i);if(r!=null&&r.length==2&&r[0]==t)return r[1]}return null}function nt(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}function tt(n){return document.getElementsByName(n)}function it(){var t=n("label.label-checkbox[for='"+this.id+"']");t!=null&&(t.text(this.checked?"Povolené":"Zakázané"),t.toggleClass("label-checkbox-checked",this.checked))}function rt(t){var i=document.getElementById(t),r;i&&(r=n("label.label-checkbox[for='"+i.id+"']"),r!=null&&(r.text(i.checked?"Povolené":"Zakázané"),r.toggleClass("label-checkbox-checked",i.checked)))}function a(n,t){for(var r=0,i;i=t[r++];)i.type!="checkbox"||i.disabled||(i.checked=n)}function ut(){s()}function ft(){s()}function k(){n(t.DivIntro).hide();n(t.DivSettings).show()}function et(){a(!0,f);v()}function ot(){a(!1,f);v()}function v(){for(var r,n=0,u=0,i;i=f[u++];)i.type=="checkbox"&&i.checked&&(n=n+Math.pow(2,i.value));n==0&&(n=-1);r=-1;nt("log",{Flag:n,OnlySettings:t.OnlySettings},function(i){if(i.Status==1){if(r=i.CookieId,n=i.Flag,t.OnlySettings&&w(),d(r,n,t.Version),t.OnlySettings){window.location.href=ct();return}document.location.reload(!0)}else r=-1,n=-1});s()}function st(){for(var i,n=0;n<=t.MaxFlagBit;n++)i=Math.pow(2,n),y[n]=(i&e)==i}function s(){n(t.DivIntro).hide();n(t.DivSettings).hide();ht()}function ht(){h.hide()}function ct(){return lt("cp",window.location.href)}function lt(n,t){var u=t.split("?")[0],f,i=[],e=t.indexOf("?")!==-1?t.split("?")[1]:"",r;if(e!==""){for(i=e.split("&"),r=i.length-1;r>=0;r-=1)f=i[r].split("=")[0],f===n&&i.splice(r,1);i.length&&(u=u+"?"+i.join("&"))}return u}function d(n,t){d(n,t,null)}function d(i,r,u){u==null||u*1<220101?n.cookie(t.CookieName,"Id="+i+"&Flag="+r+"&Version=",{raw:!0,expires:730,path:"/"}):n.cookie(t.CookieName,"Id="+i+"&Flag="+r+"&Version="+u,{raw:!0,expires:730,path:"/"})}var h,i,f,b,u;if(t=OptExtend({ChkInputs:"cookiePermInput",BtnCPIntroClose:"#btnCPIntroClose",BtnCPIntroNone:"#btnCPIntroNone",BtnCPIntroOpenSettings:"#btnCPIntroOpenSettings",BtnCPIntroOk:"#btnCPIntroOk",BtnCPSettingsClose:"#btnCPSettingsClose",BtnCPSettingsOk:"#btnCPSettingsOk",DivIntro:".CPIntro",DivSettings:"#cpSettings",HandlerUrl:"/handler/cookieperm.ashx",CookieName:"CookiePerm",CookieId:null,Flag:null,Version:220307,MaxFlagBit:5,DoNotDelete:"ZPL35SK,CookiePerm,.AUTH",OnlySettings:0},t),h=this[0],h){const r={Necessarily:0,Functional:1,Statistics:2,Marketing:3,Analytic:4,External:5};Object.freeze(r);var y={Necessarily:r.Necessarily,0:!0,Functional:r.Functional,1:!1,Statistics:r.Statistics,2:!1,Marketing:r.Marketing,3:!1,Analytic:r.Analytic,4:!1,External:r.External,5:!1},g=null,e=null,o=null,c="=",p=n.cookie(t.CookieName);for(p!=null&&(i=p.split("&"),i!=null&&(i.length==2||i.length==3)&&(g=l(i[0],"Id",c),e=l(i[1],"Flag",c),i.length==3&&(o=l(i[2],"Version",c)),e||(e=1),st())),o!=null&&o!=t.Version?w():o==t.Version&&(t.OnlySettings?k():s()),f=tt(t.ChkInputs),b=0;u=f[b++];)u.type!="checkbox"||u.disabled||(u.checked=y[u.value],FE("#"+u.id,null,{onchange:it}),rt(u.id));var at=FE(t.BtnCPIntroClose,null,{onclick:ut}),vt=FE(t.BtnCPSettingsClose,null,{onclick:ft}),yt=FE(t.BtnCPIntroOpenSettings,null,{onclick:k}),pt=FE(t.BtnCPIntroNone,null,{onclick:ot}),wt=FE(t.BtnCPIntroOk,null,{onclick:et}),bt=FE(t.BtnCPSettingsOk,null,{onclick:v})}}}(jQuery),function(n){n.fn.useragreement=function(n){function u(n){return document.querySelectorAll(n)}function f(){for(var n=0;n<t.length;n++)t[n].type=="checkbox"&&(t[n].checked=r.checked)}var i,t,r;(n=OptExtend({ParentInput:"idAgreementParent",ChildInputs:"[data-agreement-parent]"},n),i=this[0],i)&&(t=u(n.ChildInputs),r=FE("#"+n.ParentInput,null,{onclick:f}))}}(jQuery)