var DOM={WRAPPER:$("WRAPPER"),HEADER:$("HEADER"),MENUSIDE:$("MENU-SIDE"),CONTAINER:$("CONTAINER")},pageManager;api=new APIClass("/api/"); function navSubMenu(a){var c=document.querySelector("#MENU-SIDE > span[data-link="+pageManager.page+'] + div.sub > span[data-sublink="'+pageManager.vars[0]+'"]'),b=null,b=a instanceof Element?a:null,b="string"==typeof a?document.querySelector("#MENU-SIDE > span[data-link="+pageManager.page+'] + div.sub > span[data-sublink="'+a+'"]'):b,b=null==b?document.querySelector("#MENU-SIDE > span[data-link="+pageManager.page+"] + div.sub > span[data-sublink]"):b;if(null==b)return!1;null!=c&&c.remClass("active"); c=document.querySelectorAll("#CONTAINER > section[data-sublink].active");for(a=0;a section[data-sublink="'+b.getData("sublink")+'"]'),a=0;a #MENU-SIDE > span[data-link="'+pageManager.page+'"]'),b=null,b=a instanceof Element?a:null,b="string"==typeof a?document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+a+'"]'):b,b=null==b?document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+pageManager.pagelist[0]+'"]'):b;if(null==b)return!1;null!=c&&c.remClass("active");null!=b&&b.addClass("active");b.getData("link")&&(DOM.HEADER.addClass("loading"),pageManager.setPage(b.getData("link")), pageManager.activeXHR.addEventListener("loadend",function(){1<=pageManager.vars.length&&null!=document.querySelector('#CONTAINER > section[data-sublink="'+pageManager.vars[0]+'"]')?navSubMenu(pageManager.vars[0]):navSubMenu(null);var a=document.querySelector("#MENU-SIDE > span[data-link="+pageManager.page+"] + div.sub");null!=a&&a.addEventListener("click",function(a){for(a=a.target;a!=document.body&&!a.getData("sublink");)a=a.parentNode;a.getData("sublink")&&navSubMenu(a)},!1);DOM.HEADER.remClass("loading")}, !1))}DOM.MENUSIDE.addEventListener("click",function(a){for(a=a.target;a!=document.body&&!a.getData("link");)a=a.parentNode;a.getData("link")&&navMenu(a.getData("link"))},!1);function reload(){navMenu(pageManager.page)}var LOGIN={show:document.getElementById("user-data"),hide:document.getElementById("login-close"),page:document.getElementById("LOGIN")};LOGIN.show.addEventListener("click",function(a){LOGIN.page.className="active"},!1); LOGIN.hide.addEventListener("click",function(a){LOGIN.page.className=""},!1);pageManagerClass.prototype.ajax("/f/json/menu/conf",function(a){var c=[];a=JSON.parse(a);for(var b=0;b