var ie=document.all?true:false;var isEval="";var currFunc="";var backTrace="";var funcLine=0;var ajaxCall="";var executingInner=false;var iDebugLine="none";var headSrcDebug="";var tOutLine="";var funcLines=0;var missingElement="";function newGetElementById(c){var a=document.getElementById(c);if(!a){missingElement=c}return a}function setCurrFunc(e){var d=50;funcLine=0;currFunc=e;if(funcLines==d){var a=backTrace.split("\n");backTrace="";for(var c=a.length-10;c=1){node=cE(A[0]);if(aL>=2){for(var arg in A[1]){if(arg.indexOf("on")==0){node[arg]=A[1][arg]}else{if(arg=="ref"){ref[A[1][arg]]=node;ref.DOM=node;bRef=true}else{if(arg=="style"){node.style.cssText=A[1][arg]}else{if(arg.toLowerCase()=="classname"){node.style.className=A[1][arg]}else{node.setAttribute(arg,A[1][arg])}}}}}}for(var i=2;i=sWidth*6){r=g=b=255-l}else{h=255-l;r=C(height/2)){var base=(height-R)/(height/2);r=r*base;g=g*base;b=b*base}}}return hex(r)+hex(g)+hex(b)}function getVertColor(i,sZ){var n=sZ/6,j=sZ/n,C=i,c=C%n;r=C255?255:x;y=y<0?0:y>255?255:y;var r=Math.round((1-(1-(Base.r/255))*(x/255))*(255-y));var g=Math.round((1-(1-(Base.g/255))*(x/255))*(255-y));var b=Math.round((1-(1-(Base.b/255))*(x/255))*(255-y));return{r:r,g:g,b:b}}function getWebSafeColor(color){var rMod=color.r%51;var gMod=color.g%51;var bMod=color.b%51;if((rMod==0)&&(gMod==0)&&(bMod==0)){return false}var wsColor={};wsColor.r=(rMod<=25?Math.floor(color.r/51)*51:Math.ceil(color.r/51)*51);wsColor.g=(gMod<=25?Math.floor(color.g/51)*51:Math.ceil(color.g/51)*51);wsColor.b=(bMod<=25?Math.floor(color.b/51)*51:Math.ceil(color.b/51)*51);return wsColor}function hColorPickerMouseMove(ev){ev=ev||window.event;var hCPImg=ev.target||ev.srcElement;var mousePos=mouseCoordinates(ev);cp.colorPos=getPosition(hCPImg);var x=mousePos.x-cp.colorPos.x;var y=mousePos.y-cp.colorPos.y;var width=parseInt(hCPImg.offsetWidth);var height=parseInt(hCPImg.offsetHeight);var color=getHorizColor(y*width+x,width,height);cp.hColorDiv.style.backgroundColor=cp.cpColor="#"+color}function hColorPickerMouseDown(){if(cp.cpColor.r||(cp.cpColor.r===0)){cp.cpColor="#"+hex(cp.cpColor.r)+hex(cp.cpColor.g)+hex(cp.cpColor.b)}cp.cpInput.value=cp.cpColor;hideColorPicker()}function attachColorPicker(input,noLg){createColorPicker();document.onmousedown=documentMouseDown;document.onmouseup=documentMouseUp;if(noLg){input.setAttribute("noLg","1")}input.onfocus=showColorPicker;input.onblur=tryHideColorPicker;input.onclick=showColorPicker}function showSmColorPicker(ev){cp.clicked=true;showColorPicker(ev,"s")}function showLgColorPicker(ev){cp.clicked=true;showColorPicker(ev,"l")}function showColorPicker(ev,size){ev=ev||window.event;var input=ev.target||ev.srcElement;size=size||(cp.fColorPicker.style.display=="block"?"l":"s");cp.ColorPicker.style.display="block";if(input.nodeName=="INPUT"){cp.cpInput=input}cp.hColorIcon.style.display=cp.cpInput.getAttribute("noLg")=="1"?"none":"inline";var inpPos=getPosition(cp.cpInput);cp.ColorPicker.style.left=inpPos.x;cp.ColorPicker.style.top=inpPos.y+parseInt(cp.cpInput.offsetHeight);cp.hColorPicker.style.display=cp.fColorPicker.style.display="none";(size=="s"?cp.hColorPicker:cp.fColorPicker)["style"].display="block";if(size!="s"){cp.baseColor=parseColor(cp.cpInput.value);setCPColor(cp.fColorImg.style.backgroundColor=cp.origColor=cp.OrigColorDiv.style.backgroundColor="#"+hex(cp.baseColor.r)+hex(cp.baseColor.g)+hex(cp.baseColor.b));cp.sliderPos=getPosition(cp.colorSlider)}}function tryHideColorPicker(){if(!cp.clicked){hideColorPicker()}}function hideColorPicker(){cp.ColorPicker.style.display="none"}function cpMouseDown(ev){cp.cpPos=getPosition(cp.fColorImg);cp.cpMouseDown=true;return false}function cpMouseUp(ev){cp.cpMouseDown=false}function cpSliderMouseDown(ev){cp.csPos=getPosition(cp.colorSlider);cp.SliderMouseDown=true;return false}function cpSliderMouseUp(ev){cp.SliderMouseDown=false}function cpSliderClick(ev){ev=ev||window.event;var mousePos=mouseCoordinates(ev);var y=mousePos.y-cp.sliderPos.y-4;cpSliderSetColor(y)}function cpMouseClick(ev){ev=ev||window.event;var mousePos=mouseCoordinates(ev);var x=mousePos.x-cp.cpPos.x-1;var y=mousePos.y-cp.cpPos.y-1;setCPColor(getGradientColor(x,y,cp.baseColor))}function cpMouseMove(ev){if(cp.cpMouseDown){cpMouseClick(ev)}if(cp.SliderMouseDown){cpSliderClick(ev)}return false}function cpSliderSetColor(y){y=y<0?0:y>255?255:y;cp.Arrows.style.top=(y+18)+"px";var color=cp.baseColor=getVertColor(y,256);cp.fColorImg.style.backgroundColor="#"+hex(color.r)+hex(color.g)+hex(color.b)}function selectWebSafeColor(){setCPColor(getWebSafeColor(cp.cpColor))}function resetColor(){setCPColor(cp.origColor)}function setCPColor(color){if(color.srcElement||color.target){color=null}if(color&&(!color.r&&(color.r!=0))){color=parseColor(color)}if(!color){color={r:parseInt(cp.rInput.value),g:parseInt(cp.gInput.value),b:parseInt(cp.bInput.value)}}var wsColor=getWebSafeColor(color);if(wsColor&&!cp.websafeCheckbox.checked){cp.websafeImg.style.display="block";cp.websafeImg.style.backgroundColor="#"+hex(wsColor.r)+hex(wsColor.g)+hex(wsColor.b)}else{if(wsColor&&cp.websafeCheckbox.checked){color=wsColor}cp.websafeImg.style.display="none"}cp.rInput.value=color.r;cp.gInput.value=color.g;cp.bInput.value=color.b;cp.cpColor=color;cp.curColorDiv.style.backgroundColor="#"+hex(color.r)+hex(color.g)+hex(color.b)}function parseColor(text){if(colorNames[text.toLowerCase()]){text=colorNames[text.toLowerCase()]}if(/^\#?[0-9A-F]{6}$/i.test(text)){return{r:eval("0x"+text.substr(text.length==6?0:1,2)),g:eval("0x"+text.substr(text.length==6?2:3,2)),b:eval("0x"+text.substr(text.length==6?4:5,2))}}return{r:255,g:0,b:0}}function documentMouseDown(ev){ev=ev||window.event;var target=ev.srcElement||ev.target;while(target){if(target==cp.ColorPicker){return}target=target.parentNode}cp.ColorPicker.style.display="none"}function documentMouseUp(ev){cpMouseUp(ev);cpSliderMouseUp(ev)}window.attachColorPicker=attachColorPicker})();var mouseX=0;var mouseY=0;var dnddndmouseX=0;var dnddndmouseY=0;var DnD=false;var dndObj;var dragStart;var dnddndXdist;var dnddndYdist;var Xdist=0;var Ydist=0;var tmpCursor="";var objIdToMove="";var ie=document.all?true:false;if(!ie){document.captureEvents(Event.MOUSEMOVE)}document.onmousemove=dndgetdndmouseXY;function dndgetdndmouseXY(c){try{if(ie){mouseX=event.clientX+document.body.scrollLeft;mouseY=event.clientY+document.body.scrollTop;dndmouseX=event.clientX+document.body.scrollLeft;dndmouseY=event.clientY+document.body.scrollTop}else{mouseX=c.pageX;mouseY=c.pageY;dndmouseX=c.pageX;dndmouseY=c.pageY}if(mouseX<0){mouseX=0}if(mouseY<0){mouseY=0}if(dndmouseX<0){dndmouseX=0}if(dndmouseY<0){dndmouseY=0}if(DnD){if(dndObj){if(dragStart){var d=dndfindPos(dndObj);dndXdist=dndmouseX-d[0];dndYdist=dndmouseY-d[1];dragStart=false}dndObj.style.top=(dndmouseY-dndYdist)+"px";dndObj.style.left=(dndmouseX-dndXdist)+"px";return false}}else{if(objIdToMove!=""){var a=document.getElementById(objIdToMove);a.style.left=(mouseX-Xdist)+"px";a.style.top=(mouseY-Ydist)+"px"}}}catch(c){}return true}function dndfindPos(a){var c=curtop=0;if(a.offsetParent){c=a.offsetLeft;curtop=a.offsetTop;while(a=a.offsetParent){c+=a.offsetLeft;curtop+=a.offsetTop}}return[c,curtop]}function drag(a){dragStart=true;dndObj=document.getElementById(a);DnD=true;return false}function drop(){DnD=false;return false}function moveBox(d){var a=document.getElementById(d);var c=findPos(d);if(objIdToMove==""){Xdist=mouseX-c[0];Ydist=mouseY-c[1];tmpCursor=a.style.cursor;if(tmpCursor==""||typeof(tmpCursor)=="undefined"){tmpCursor="default"}a.style.cursor="move";objIdToMove=d}else{objIdToMove="";a.style.cursor=tmpCursor}}function stopMoveBox(a){a.style.cursor=tmpCursor;Xdist="undefined";Ydist="undefined";tmpCursor="undefined"}var permissionsPage='
';var settingsWidth="100%";var emptyWidth="100%";var currentPermPage="";var defaultPermTab="Groups";var backToTree="";var transferCheck=new Array;var selectedInTable=new Array;var emails=new Array;var homepages=new Array;var tags=new Array;function setActivePerm(c){currentPermPage=c;c=c.toLowerCase();document.getElementById("content").innerHTML=permissionsPage;document.getElementById("settingsContent").style.width=settingsWidth;if(!ie){settingsWidth=document.getElementById("tabs").offsetWidth-1+"px"}document.getElementById("settingsContent").style.width=settingsWidth;resizeEmptyTab();var d=document.getElementById(c);if(d){var a=d.innerHTML;d.innerHTML=a.replace(/inactive/g,"active")}}function showPermissions(c){ismenucalled=false;if(currentPermPage==""){currentPermPage=defaultPermTab}if(typeof(c)!="undefined"){backToTree=c}if(superadmin){var a=permissionsPage;document.getElementById("content").innerHTML=a;notworking();closePermPage()}else{var a=str_must_login_perms;document.getElementById("content").innerHTML=a;setTimeout("cancelForm()",3000)}}function editGroups(){setActive("Groups");clearTags();var a=new HTTPPost();if(ajaxFolder==false){var c=""}else{var c="ajax/"}a.postData(c+"editGroups.php","",groupsPage,true)}function editUsers(){setActive("Users");clearEmails();var a=new HTTPPost();if(ajaxFolder==false){var c=""}else{var c="ajax/"}a.postData(c+"editUsers.php","",usersPage,true)}function groupsPage(req){if(req.readyState==4){if(req.status==200){document.getElementById("settingsContent").innerHTML=center(req.responseText);document.getElementById("submit_button").style.visibility="hidden";eval(document.getElementById("js").innerHTML);windowResize()}}}function usersPage(req){if(req.readyState==4){if(req.status==200){document.getElementById("settingsContent").innerHTML=center(req.responseText);document.getElementById("submit_button").style.visibility="hidden";eval(document.getElementById("js").innerHTML);windowResize()}}}function waitPermForSubmit(){try{var submitted=document.getElementById("submitTarget").contentWindow.document.getElementById("submitted").innerHTML;if(submitted==""){working();setTimeout("waitPermForSubmit()",1000)}else{notworking();submitted=document.getElementById("submitTarget").contentWindow.document.getElementById("submittedJS").innerHTML;eval(submitted.replace(/</g,"<").replace(/>/g,">"))}}catch(e){working();setTimeout("waitPermForSubmit()",1000)}}function closePermPage(){if(ajaxFolder==false){var c=""}else{var c="ajax/"}var a=document.getElementById("submitTarget");if(a){a.src=c+"empty.html"}setTimeout("edit"+currentPermPage+"()",1)}function submitPermForm(){document.getElementById("ajaxForm").submit();waitPermForSubmit()}function selectToEdit(e){document.getElementById("selectedText").value=e.text;document.getElementById("selectedID").value=e.value;if(document.getElementById("userEmail2")){if(typeof(emails[e.value])=="undefined"){emails[e.value]=""}document.getElementById("userEmail2").value=emails[e.value];var a="";if(homepages[e.value]!=""){a=tree.getItemText(homepages[e.value])}if(a){document.getElementById("userHomeSpan").innerHTML=a}else{var c=new HTTPPost();if(ajaxFolder==false){var d=""}else{var d="ajax/"}c.postData(d+"getPageTitle.php","pageID="+homepages[e.value],defaultUserPageTitle,true)}}if(document.getElementById("tags")){if(typeof(tags[e.value])=="undefined"){tags[e.value]=""}document.getElementById("tags").value=tags[e.value]}document.getElementById("toEdit").style.visibility="visible"}function defaultUserPageTitle(a){if(a.readyState==4){if(a.status==200){document.getElementById("userHomeSpan").innerHTML=a.responseText}}}function addGroup(){if(document.getElementById("addNew").value!=""){document.getElementById("todo").value="addgroup";submitPermForm()}}function renameGroup(){if(document.getElementById("selectedText").value!=""){document.getElementById("todo").value="renamegroup";submitPermForm()}}function deleteGroup(){if(document.getElementById("selectedID").value!=""){if(confirm(str_groupDelete)){document.getElementById("todo").value="deletegroup";submitPermForm()}}}function addUser(){if((document.getElementById("addNew").value!="")&&(document.getElementById("userPassword").value!="")){if(document.getElementById("userPassword").value!=document.getElementById("retypePassword").value){alert(str_passwords_dont_match)}else{document.getElementById("todo").value="adduser";submitPermForm()}}}function renameUser(){if(document.getElementById("selectedText").value!=""){document.getElementById("todo").value="renameuser";submitPermForm()}}function deleteUser(){if(document.getElementById("selectedID").value!=""){if(confirm(str_userDelete)){document.getElementById("todo").value="deleteuser";submitPermForm()}}}function manageUserGroups(){var a=new HTTPPost();if(ajaxFolder==false){var c=""}else{var c="ajax/"}a.postData(c+"manageGroups.php","userid="+document.getElementById("selectedID").value,manageGroupsPage,true)}function manageGroupsPage(a){if(a.readyState==4){if(a.status==200){document.getElementById("settingsContent").innerHTML=center(a.responseText)}}}function _existsinselect(e,d){var a=false;for(var c=0;c";a+='';a+='';if(!((h=="wiki")&&(c[d]["value"]==0))){a+=c[d]["text"]}else{a+=''+c[d]["text"]+""}a+="";for(var e=0;e';a+=""}a+=""}a+="";document.getElementById("count").value=c.length;f.innerHTML=a}function _gettable(){var e=parseInt(document.getElementById("count").value);var a=new Array;for(var c=0;c";return a}function manageHomePage(){window.open(rootURL+"FCKeditor/editor/filemanager/browser/tree/menulist.php?useridfortree="+document.getElementById("selectedID").value,"Tree","location=0,status=0,scrollbars=0,width=500,height=500")}function SetUrl(a,c){a=a.replace("index.php?page=","");document.getElementById("userHomePage").value=a;document.getElementById("todo").value="homepage";submitPermForm()}var settingsPage='
';var buttonTab='
';var settingsWidth="100%";var emptyWidth="100%";var currentPage="";var defaultTab="Site";var backToTree="";var message="";var messageColor="green";var messageTimeout=0;function hide(c){var a=document.getElementById(c);if(a){a.style.display="none"}}function show(e,c){if(!c){c="block"}var a=document.getElementById(e);if(a){a.style.display=c}}function findPos(c){obj=document.getElementById(c);var a=curtop=0;if(obj.offsetParent){a=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){a+=obj.offsetLeft;curtop+=obj.offsetTop}}return[a,curtop]}function center(c){var a=buttonTab+'
';a+=c;a+="
";return a}function setActive(c){currentPage=c;c=c.toLowerCase();document.getElementById("content").innerHTML=settingsPage;document.getElementById("settingsContent").style.width=settingsWidth;if(!ie){settingsWidth=document.getElementById("tabs").offsetWidth-1+"px"}document.getElementById("settingsContent").style.width=settingsWidth;resizeEmptyTab();var d=document.getElementById(c+"Appearance");if(d){var a=d.innerHTML;d.innerHTML=a.replace(/inactive/g,"active")}}function cancelForm(){reloadTree(backToTree)}function resizeEmptyTab(){var d=true;if(document.getElementById("emptytab")){var c=findPos("emptytab");var a=findPos("buttontab");emptyWidth=(a[0]-c[0]);if(parseInt(emptyWidth)>0){d=false;resizeRealEmpty()}}if(d){setTimeout("resizeEmptyTab()",1000)}}function resizeRealEmpty(){if(document.getElementById("emptytab")){document.getElementById("emptytab").style.width=emptyWidth+"px"}}function showSettings(c){try{ismenucalled=false;currentPage=defaultTab;backToTree=c;if(superadmin){var a=settingsPage;document.getElementById("content").innerHTML=a;closePage()}else{var a=str_must_login_settings;document.getElementById("content").innerHTML=a;setTimeout("cancelForm()",3000)}}catch(d){setTimeout("showSettings('"+c+"')",defaultTime)}}function editSite(){setActive("Site");var a=new HTTPPost();if(ajaxFolder==false){var c=""}else{var c="ajax/"}a.postData(c+"editSite.php","",sitePage,true)}function editDatabase(){setActive("Database");var a=new HTTPPost();if(ajaxFolder==false){var c=""}else{var c="ajax/"}a.postData(c+"editDatabase.php","",databasePage,true)}function editHeader(){setActive("Header");var a=new HTTPPost();if(ajaxFolder==false){var c=""}else{var c="ajax/"}a.postData(c+"editHeader.php","",headerPage,true)}function editMenu(){setActive("Menu");var a=new HTTPPost();if(ajaxFolder==false){var c=""}else{var c="ajax/"}a.postData(c+"editMenu.php","",menuPage,true)}function editSettingsPage(){setActive("SettingsPage");var a=new HTTPPost();if(ajaxFolder==false){var c=""}else{var c="ajax/"}a.postData(c+"editPage.php","",pagePage,true)}function editLinks(){setActive("Links");var a=new HTTPPost();if(ajaxFolder==false){var c=""}else{var c="ajax/"}a.postData(c+"editLinks.php","",linksPage,true)}function sitePage(a){if(a.readyState==4){if(a.status==200){document.getElementById("settingsContent").innerHTML=center(a.responseText);document.getElementById("submit_button").style.visibility="visible";document.getElementById("installedSpan").innerHTML=versionNumber.replace("v","");document.getElementById("latestSpan").innerHTML=latestVersion.replace("v","");if(!newerExists(versionNumber,latestVersion)){document.getElementById("updWikiButton").disabled=true}windowResize();attachColorPicker(document.getElementById("searchBoxFontColor"));attachColorPicker(document.getElementById("searchBoxFieldBack"));attachColorPicker(document.getElementById("searchBoxFieldBorder"));attachColorPicker(document.getElementById("searchBoxButtonBack"));attachColorPicker(document.getElementById("searchBoxButtonColor"));attachColorPicker(document.getElementById("signBoxFontColor"));attachColorPicker(document.getElementById("signBoxFieldBack"));attachColorPicker(document.getElementById("signBoxFieldBorder"));attachColorPicker(document.getElementById("signBoxButtonBack"));attachColorPicker(document.getElementById("signBoxButtonColor"))}}}function databasePage(a){if(a.readyState==4){if(a.status==200){document.getElementById("settingsContent").innerHTML=center(a.responseText);document.getElementById("submit_button").style.visibility="visible";windowResize()}}}function headerPage(a){if(a.readyState==4){if(a.status==200){document.getElementById("settingsContent").innerHTML=center(a.responseText);document.getElementById("submit_button").style.visibility="visible";windowResize();attachColorPicker(document.getElementById("headerBackColor"));attachColorPicker(document.getElementById("headerBorderColor"))}}}function menuPage(a){if(a.readyState==4){if(a.status==200){document.getElementById("settingsContent").innerHTML=center(a.responseText);document.getElementById("submit_button").style.visibility="visible";windowResize();attachColorPicker(document.getElementById("menuFontColor"));attachColorPicker(document.getElementById("menuSelectedColor"));attachColorPicker(document.getElementById("menuSelectedFontColor"));attachColorPicker(document.getElementById("menuBackColor"));attachColorPicker(document.getElementById("menuBorderColor"));attachColorPicker(document.getElementById("nodeBackColor"));attachColorPicker(document.getElementById("nodeBorderColor"));attachColorPicker(document.getElementById("nodeOverBackColor"));attachColorPicker(document.getElementById("nodeOverFontColor"));attachColorPicker(document.getElementById("contFontColor"));attachColorPicker(document.getElementById("contBackColor"));attachColorPicker(document.getElementById("cont2FontColor"));attachColorPicker(document.getElementById("cont2BackColor"))}}}function pagePage(a){if(a.readyState==4){if(a.status==200){document.getElementById("settingsContent").innerHTML=center(a.responseText);document.getElementById("submit_button").style.visibility="visible";windowResize();attachColorPicker(document.getElementById("pageFontColor"));attachColorPicker(document.getElementById("pageBackColor"));attachColorPicker(document.getElementById("printLinkFontColor"));attachColorPicker(document.getElementById("printLinkMoFontColor"));attachColorPicker(document.getElementById("printLinkMoBackgroundColor"));attachColorPicker(document.getElementById("bookmarkLinkFontColor"));attachColorPicker(document.getElementById("bookmarkLinkMoFontColor"));attachColorPicker(document.getElementById("bookmarkLinkMoBackgroundColor"));attachColorPicker(document.getElementById("pageSeparatorColor"))}}}function linksPage(a){if(a.readyState==4){if(a.status==200){document.getElementById("settingsContent").innerHTML=center(a.responseText);document.getElementById("submit_button").style.visibility="visible";windowResize();attachColorPicker(document.getElementById("textLinksFontColor"));attachColorPicker(document.getElementById("textLinksMoFontColor"));attachColorPicker(document.getElementById("textLinksMoBackgroundColor"));attachColorPicker(document.getElementById("linksInTextFontColor"));attachColorPicker(document.getElementById("linksInTextMoFontColor"));attachColorPicker(document.getElementById("linksInTextMoBackgroundColor"));attachColorPicker(document.getElementById("versionNumberFontColor"));attachColorPicker(document.getElementById("loginLinkFontColor"));attachColorPicker(document.getElementById("loginLinkMoFontColor"));attachColorPicker(document.getElementById("loginLinkMoBackgroundColor"))}}}function showDetails(c){var d="details_"+c.replace(/ /g,"_");var a=document.getElementById(d);if(a){a.style.display="block"}}function hideDetails(c){var d="details_"+c.replace(/ /g,"_");var a=document.getElementById(d);if(a){a.style.display="none"}}function waitForSubmit(){try{var submitted=document.getElementById("submitTarget").contentWindow.document.getElementById("submitted").innerHTML;if(submitted==""){working();setTimeout("waitForSubmit()",1000)}else{var rld=true;if(submitted=="dont reload"){rld=false}notworking();submitted=document.getElementById("submitTarget").contentWindow.document.getElementById("submittedJS").innerHTML;eval(submitted.replace(/</g,"<").replace(/>/g,">"));if(rld){var qs="?"+new Date().getTime(),l,i=0;while(l=document.getElementsByTagName("link")[i++]){if(l.rel&&"stylesheet"==l.rel.toLowerCase()){if(!l._h){l._h=l.href}l.href=l._h+qs}}}closePage()}}catch(e){working();setTimeout("waitForSubmit()",1000)}}function closePage(){if(ajaxFolder==false){var c=""}else{var c="ajax/"}var a=document.getElementById("submitTarget");if(a){a.src=c+"empty.html"}setTimeout("edit"+currentPage+"()",1)}function updateTreeImages(){var f=document.images;for(var a=0;a'+message+""}document.getElementById("settingsContent").innerHTML=center(c+a.responseText);document.getElementById("submit_button").style.visibility="visible";if(message!=""&&a.responseText.indexOf("messageDiv")!=-1){document.getElementById("messageDiv").innerHTML=message}if(message!=""&&messageTimeout>0){setTimeout('document.getElementById("messageDiv").style.visibility="hidden"',messageTimeout*1000)}message="";messageColor="green";messageTimeout=0;windowResize()}}}function editApps(){setActive("Apps");var a=new HTTPPost();if(ajaxFolder==false){var c=""}else{var c="ajax/"}a.postData(c+"editApps.php","",appsPage,true)}function appsPage(d){if(d.readyState==4){if(d.status==200){document.getElementById("settingsContent").innerHTML=center(d.responseText);document.getElementById("submit_button").style.visibility="hidden";working();if(typeof(showAppLatestVersions)!="function"){var e=document.getElementsByTagName("head");var a=e[0];var c=document.createElement("script");c.type="text/javascript";c.src="http://www.tpsec.net/updated/apps.js";a.appendChild(c)}setTimeout("appLatest()",150);windowResize()}}}function appLatest(){if(typeof(showAppLatestVersions)=="function"){showAppLatestVersions();var e=getElementsByClass("appVersionVal");var a=getElementsByClass("latestAppVersionVal");var f=new Array;for(var d=0;d-1&&(_isChrome=!0);navigator.userAgent.indexOf("Safari")!=-1||navigator.userAgent.indexOf("Konqueror")!=-1?(_KHTMLrv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Safari")+7,5)),_KHTMLrv>525?(_isFF=!0,_FFrv=1.9):_isKHTML=!0):navigator.userAgent.indexOf("Opera")!=-1?(_isOpera=!0,_OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Opera")+6,3))):navigator.appName.indexOf("Microsoft")!=-1?(_isIE=!0,navigator.appVersion.indexOf("MSIE 8.0")!=-1&&document.compatMode!="BackCompat"&&(_isIE=8),navigator.appVersion.indexOf("MSIE 9.0")!=-1&&document.compatMode!="BackCompat"&&(_isIE=8)):(_isFF=!0,_FFrv=parseFloat(navigator.userAgent.split("rv:")[1]));dtmlXMLLoaderObject.prototype.doXPath=function(u,t,s,q){if(_isKHTML||!_isIE&&!window.XPathResult){return this.doXPathOpera(u,t)}if(_isIE){return t||(t=this.xmlDoc.nodeName?this.xmlDoc:this.xmlDoc.responseXML),t||dhtmlxError.throwError("LoadXML","Incorrect XML",[t||this.xmlDoc,this.mainObject]),s!=null&&t.setProperty("SelectionNamespaces","xmlns:xsl='"+s+"'"),q=="single"?t.selectSingleNode(u):t.selectNodes(u)||[]}else{var p=t;t||(t=this.xmlDoc.nodeName?this.xmlDoc:this.xmlDoc.responseXML);t||dhtmlxError.throwError("LoadXML","Incorrect XML",[t||this.xmlDoc,this.mainObject]);t.nodeName.indexOf("document")!=-1?p=t:(p=t,t=t.ownerDocument);var m=XPathResult.ANY_TYPE;if(q=="single"){m=XPathResult.FIRST_ORDERED_NODE_TYPE}var o=[],l=t.evaluate(u,p,function(){return s},m,null);if(m==XPathResult.FIRST_ORDERED_NODE_TYPE){return l.singleNodeValue}for(var k=l.iterateNext();k;){o[o.length]=k,k=l.iterateNext()}return o}};function j(){if(!this.catches){this.catches=[]}return this}j.prototype.catchError=function(d,c){this.catches[d]=c};j.prototype.throwError=function(e,d,f){if(this.catches[e]){return this.catches[e](e,d,f)}if(this.catches.ALL){return this.catches.ALL(e,d,f)}alert("Error type: "+e+"\nDescription: "+d);return null};window.dhtmlxError=new j;dtmlXMLLoaderObject.prototype.doXPathOpera=function(h,f){var m=h.replace(/[\/]+/gi,"/").split("/"),l=null,k=1;if(!m.length){return[]}if(m[0]=="."){l=[f]}else{if(m[0]==""){l=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(m[k].replace(/\[[^\]]*\]/g,"")),k++}else{return[]}}for(;k0;){this.base.removeChild(this.base.childNodes[0])}this.base.className+=" dhtmlxMenu_"+this.skin+"_Middle dir_left";this.base._autoSkinUpdate=!0;if(this.base.oncontextmenu){this.base._oldContextMenuHandler=this.base.oncontextmenu}this.addBaseIdAsContextZone=this.base.id;this.base.onselectstart=function(c){c=c||event;return c.returnValue=!1};this.base.oncontextmenu=function(c){c=c||event;return c.returnValue=!1}}else{this.base=document.body}}this.topId="dhxWebMenuTopId";if(!this.extendedModule){for(var m=function(){alert(this.i18n.dhxmenuextalert)},o="setItemEnabled,setItemDisabled,isItemEnabled,_changeItemState,getItemText,setItemText,loadFromHTML,hideItem,showItem,isItemHidden,_changeItemVisible,setUserData,getUserData,setOpenMode,setWebModeTimeout,enableDynamicLoading,_updateLoaderIcon,getItemImage,setItemImage,clearItemImage,setAutoShowMode,setAutoHideMode,setContextMenuHideAllMode,getContextMenuHideAllMode,setVisibleArea,setTooltip,getTooltip,setHotKey,getHotKey,setItemSelected,setTopText,setRTL,setAlign,setHref,clearHref,getCircuit,_clearAllSelectedSubItemsInPolygon,_checkArrowsState,_addUpArrow,_addDownArrow,_removeUpArrow,_removeDownArrow,_isArrowExists,_doScrollUp,_doScrollDown,_countPolygonItems,setOverflowHeight,_getRadioImgObj,_setRadioState,_radioOnClickHandler,getRadioChecked,setRadioChecked,addRadioButton,_getCheckboxState,_setCheckboxState,_readLevel,_updateCheckboxImage,_checkboxOnClickHandler,setCheckboxState,getCheckboxState,addCheckbox,serialize".split(","),l=0;l0&&this.limit0){this.limitF&&!this._rtl&&(Q=N-I+2);Qz&&this.menuY2!=null&&(O=Math.max(H+M-A+2,2),this.itemPull[Y]!=null&&!this.context&&this.itemPull[Y].parent==this.idPrefix+this.topId&&(O-=this.base.offsetHeight));this.idPull[V].style.left=Q+"px";this.idPull[V].style.top=O+U+"px";if(this.sxDacProc!=null&&this.idPull["sxDac_"+Y]!=null){this.idPull["sxDac_"+Y]._show()}else{this.idPull[V].style.visibility="";if(this.limit>0&&this.limit0;){this._openedPolygons.pop()}var v=this._getSubItemToDeselectByPolygon(f);this._removeSubItemFromSelected(-1,-1);for(var u=0;u0&&(v=t)}}return v};this._getMenuNodes=function(e){var d=[],f;for(f in this.itemPull){this.itemPull[f].parent==e&&(d[d.length]=f)}return d};this._genStr=function(f){for(var e="",t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",s=0;s0;){k._openedPolygons.pop()}for(var a=0;a0;this.dLoad&&v.complex&&(v.loaded="no");this.itemPull[v.id]=v;for(var u=0;u1){s._menuOpenTM=window.setTimeout(function(){k._showPolygon(x,v)},u),t=!0}}}t||k._showPolygon(x,v)}k.itemPull[k.idPrefix+parentId].loaded="yes";k.loaderIcon==!0&&k._updateLoaderIcon(k.idPrefix+parentId,!1)}this.destructor();k.callEvent("onXLE",[])}else{a=this.getXMLTopNode("menu"),k._buildMenu(a,null),k.init(),k.callEvent("onXLE",[]),k._doOnLoad()}};this._xmlLoader=new dtmlXMLLoaderObject(this._xmlParser,window);this._showSubLevelItem=function(d,c){if(document.getElementById("arrow_"+this.idPrefix+d)!=null){document.getElementById("arrow_"+this.idPrefix+d).style.display=c?"none":""}if(document.getElementById("image_"+this.idPrefix+d)!=null){document.getElementById("image_"+this.idPrefix+d).style.display=c?"none":""}if(document.getElementById(this.idPrefix+d)!=null){document.getElementById(this.idPrefix+d).style.display=c?"":"none"}};this._hideSubLevelItem=function(c){this._showSubLevelItem(c,!0)};this.idPrefix=this._genStr(12);this._bodyClick=function(a){a=a||event;a.button==2||_isOpera&&a.ctrlKey==!0||(k.context?k.contextAutoHide&&(!_isOpera||k._isContextMenuVisible()&&_isOpera)&&k._hideContextMenu():k._clearAndHide())};this._bodyContext=function(a){var a=a||event,t=(a.srcElement||a.target).className;if(!(t.search("dhtmlxMenu")!=-1&&t.search("SubLevelArea")!=-1)){var s=!0,f=a.target||a.srcElement;f.id!=null&&k.isContextZone(f.id)&&(s=!1);f==document.body&&(s=!1);s&&k.hideContextMenu()}};_isIE?(document.body.attachEvent("onclick",this._bodyClick),document.body.attachEvent("oncontextmenu",this._bodyContext)):(window.addEventListener("click",this._bodyClick,!1),window.addEventListener("contextmenu",this._bodyContext,!1));this._UID=this._genStr(32);dhtmlxMenuObjectLiveInstances[this._UID]=this;dhtmlxEventable(this);return this}dhtmlXMenuObject.prototype.init=function(){if(this._isInited!=!0){this.dLoad?(this.callEvent("onXLS",[]),this._xmlLoader.loadXML(this.dLoadUrl+this.dLoadSign+"action=loadMenu&etc="+(new Date).getTime())):(this._initTopLevelMenu(),this._isInited=!0)}};dhtmlXMenuObject.prototype._countVisiblePolygonItems=function(e){var m=0,h;for(h in this.itemPull){var l=this.itemPull[h].parent,k=this.itemPull[h].type;this.idPull[h]!=null&&l==e&&(k=="item"||k=="radio"||k=="checkbox")&&this.idPull[h].style.display!="none"&&m++}return m};dhtmlXMenuObject.prototype._redefineComplexState=function(a){if(this.idPrefix+this.topId!=a&&this.idPull["polygon_"+a]!=null&&this.idPull[a]!=null){var d=this._countVisiblePolygonItems(a);d>0&&!this.itemPull[a].complex&&this._updateItemComplexState(a,!0,!1);d==0&&this.itemPull[a].complex&&this._updateItemComplexState(a,!1,!1)}};dhtmlXMenuObject.prototype._updateItemComplexState=function(e,k){if(!this.context&&this._getItemLevelType(e.replace(this.idPrefix,""))=="TopLevel"){this.itemPull[e].complex=k}else{if(!(this.idPull[e]==null||this.itemPull[e]==null)){if(this.itemPull[e].complex=k,e!=this.idPrefix+this.topId){var f=null,h=this.idPull[e].childNodes[this._rtl?0:2];h.childNodes[0]&&String(h.childNodes[0].className).search("complex_arrow")===0&&(f=h.childNodes[0]);if(this.itemPull[e].complex){if(f==null){f=document.createElement("DIV");f.className="complex_arrow";for(f.id="arrow_"+e;h.childNodes.length>0;){h.removeChild(h.childNodes[0])}h.appendChild(f)}if(this.dLoad&&this.itemPull[e].loaded=="get"&&this.loaderIcon){if(f.className!="complex_arrow_loading"){f.className="complex_arrow_loading"}}else{f.className="complex_arrow"}}else{!this.itemPull[e].complex&&f!=null&&(h.removeChild(f),this.itemPull[e].hotkey_backup!=null&&this.setHotKey&&this.setHotKey(e.replace(this.idPrefix,""),this.itemPull[e].hotkey_backup))}}}}};dhtmlXMenuObject.prototype._getItemLevelType=function(a){return this.itemPull[this.idPrefix+a].parent==this.idPrefix+this.topId?"TopLevel":"SubLevelArea"};dhtmlXMenuObject.prototype._redistribTopLevelSelection=function(d){var f=this._getSubItemToDeselectByPolygon("parent");this._removeSubItemFromSelected(-1,-1);for(var e=0;e0){p.title=this.itemPull[h].tip}if(this.itemPull[h].imgen!=""||this.itemPull[h].imgdis!=""){var o=this.itemPull[h][this.itemPull[h].state=="enabled"?"imgen":"imgdis"];if(o){var l=document.createElement("IMG");l.border="0";l.id="image_"+h;l.src=this.imagePath+o;l.className="dhtmlxMenu_TopLevel_Item_Icon";p.childNodes.length>0&&!this._rtl?p.insertBefore(l,p.childNodes[0]):p.appendChild(l)}}p.onselectstart=function(c){c=c||event;return c.returnValue=!1};p.oncontextmenu=function(c){c=c||event;return c.returnValue=!1};if(!this.cont){this.cont=document.createElement("DIV"),this.cont.dir="ltr",this.cont.className=this._align=="right"?"align_right":"align_left",this.base.appendChild(this.cont)}q!=null&&(q++,q<0&&(q=0),q>this.cont.childNodes.length-1&&(q=null));q!=null?this.cont.insertBefore(p,this.cont.childNodes[q]):this.cont.appendChild(p);this.idPull[p.id]=p;this.itemPull[h].complex&&!this.dLoad&&this._addSubMenuPolygon(this.itemPull[h].id,this.itemPull[h].id);p.onmouseover=function(){k.menuMode=="web"&&window.clearTimeout(k.menuTimeoutHandler);var a=k._getSubItemToDeselectByPolygon("parent");k._removeSubItemFromSelected(-1,-1);for(var t=0;t0){if(l!=null){l.src=this.imagePath+o}else{if(t){l=document.createElement("IMG"),l.className="dhtmlxMenu_TopLevel_Item_Icon",l.src=this.imagePath+o,l.border="0",l.id="image_"+k,!this._rtl&&this.idPull[k].childNodes.length>0?this.idPull[k].insertBefore(l,this.idPull[k].childNodes[0]):this.idPull[k].appendChild(l)}else{l=document.createElement("IMG");l.className="sub_icon";l.src=this.imagePath+o;l.border="0";l.id="image_"+k;for(var m=this.idPull[k].childNodes[this._rtl?2:0];m.childNodes.length>0;){m.removeChild(m.childNodes[0])}m.appendChild(l)}}}else{l!=null&&l.parentNode.removeChild(l)}};dhtmlXMenuObject.prototype.removeItem=function(x,w,y){w||(x=this.idPrefix+x);var v=null;if(x!=this.idPrefix+this.topId){if(this.itemPull[x]==null){return}var t=this.itemPull[x].type;if(t=="separator"){var u=this.idPull["separator_"+x];this.itemPull[x].parent==this.idPrefix+this.topId?(u.onclick=null,u.onselectstart=null,u.id=null):(u.childNodes[0].childNodes[0].onclick=null,u.childNodes[0].childNodes[0].onselectstart=null,u.childNodes[0].childNodes[0].id=null,u.childNodes[0].removeChild(u.childNodes[0].childNodes[0]),u.removeChild(u.childNodes[0]));u.parentNode.removeChild(u);this.idPull["separator_"+x]=null;this.itemPull[x]=null;delete this.idPull["separator_"+x]}else{v=this.itemPull[x].parent;u=this.idPull[x];u.onclick=null;u.oncontextmenu=null;u.onmouseover=null;u.onmouseout=null;u.onselectstart=null;for(u.id=null;u.childNodes.length>0;){u.removeChild(u.childNodes[0])}u.parentNode.removeChild(u);this.idPull[x]=null;this.itemPull[x]=null;delete this.idPull[x]}delete this.itemPull[x];t=u=null}for(var s in this.itemPull){this.itemPull[s].parent==x&&this.removeItem(s,!0,!0)}var q=Array(x);v!=null&&!y&&this.idPull["polygon_"+v]!=null&&this.idPull["polygon_"+v].tbd.childNodes.length==0&&(q.push(v),this._updateItemComplexState(v,!1,!1));for(var p=0;p0&&!this.itemPull[D].complex){var o=document.createElement("DIV");o.className="sub_item_hk";o.innerHTML=this.itemPull[D].hotkey;q.appendChild(o)}else{q.innerHTML=" "}}y.appendChild(this._rtl?q:w);y.appendChild(t);y.appendChild(this._rtl?w:q);y.id=this.itemPull[D].id;y.parent=this.itemPull[D].parent;if(this.itemPull[D].tip.length>0){y.title=this.itemPull[D].tip}y.onselectstart=function(c){c=c||event;return c.returnValue=!1};y.onmouseover=function(){E.menuMode=="web"&&window.clearTimeout(E.menuTimeoutHandler);E._redistribSubLevelSelection(this.id,this.parent)};if(E.menuMode=="web"){y.onmouseout=function(){window.clearTimeout(E.menuTimeoutHandler);E.menuTimeoutHandler=window.setTimeout(function(){E._clearAndHide()},E.menuTimeoutMsec,"JavaScript")}}y.onclick=function(a){if(E.checkEvent("onClick")||!E.itemPull[this.id].complex){a=a||event;a.cancelBubble=!0;a.returnValue=!1;tc=E.itemPull[this.id].complex?"c":"-";td=E.itemPull[this.id].state=="enabled"?"-":"d";var d={ctrl:a.ctrlKey,alt:a.altKey,shift:a.shiftKey};switch(E.itemPull[this.id].type){case"checkbox":E._checkboxOnClickHandler(this.id.replace(E.idPrefix,""),tc+td+"n",d);break;case"radio":E._radioOnClickHandler(this.id.replace(E.idPrefix,""),tc+td+"n",d);break;case"item":E._doOnClick(this.id.replace(E.idPrefix,""),tc+td+"n",d)}return !1}};var l=this.idPull["polygon_"+this.itemPull[D].parent];C!=null&&(C++,C<0&&(C=0),C>l.tbd.childNodes.length-1&&(C=null));C!=null&&l.tbd.childNodes[C]!=null?l.tbd.insertBefore(y,l.tbd.childNodes[C]):l.tbd.appendChild(y);this.idPull[y.id]=y};dhtmlXMenuObject.prototype._renderSeparator=function(t,s){var u=this.context?"SubLevelArea":this.itemPull[t].parent==this.idPrefix+this.topId?"TopLevel":"SubLevelArea";if(!(u=="TopLevel"&&this.context)){var q=this;if(u!="TopLevel"){var o=document.createElement("TR");o.className="sub_sep";var p=document.createElement("TD");p.colSpan="3";o.appendChild(p)}var m=document.createElement("DIV");m.id="separator_"+t;m.className=u=="TopLevel"?"top_sep":"sub_sep";m.onselectstart=function(c){c=c||event;c.returnValue=!1};m.onclick=function(d){d=d||event;d.cancelBubble=!0;var c={ctrl:d.ctrlKey,alt:d.altKey,shift:d.shiftKey};q._doOnClick(this.id.replace("separator_"+q.idPrefix,""),"--s",c)};if(u=="TopLevel"){if(s!=null){s++,s<0&&(s=0),this.cont.childNodes[s]!=null?this.cont.insertBefore(m,this.cont.childNodes[s]):this.cont.appendChild(m)}else{var l=this.cont.childNodes[this.cont.childNodes.length-1];String(l).search("TopLevel_Text")==-1?this.cont.appendChild(m):this.cont.insertBefore(m,l)}this.idPull[m.id]=m}else{var k=this.idPull["polygon_"+this.itemPull[t].parent];s!=null&&(s++,s<0&&(s=0),s>k.tbd.childNodes.length-1&&(s=null));s!=null&&k.tbd.childNodes[s]!=null?k.tbd.insertBefore(o,k.tbd.childNodes[s]):k.tbd.appendChild(o);p.appendChild(m);this.idPull[m.id]=o}}};dhtmlXMenuObject.prototype.addNewSeparator=function(d,f){var f=this.idPrefix+(f!=null?f:this._genStr(24)),e=this.idPrefix+this.getParentId(d);this._addItemIntoGlobalStrorage(f,e,"","separator",!1,"","");this._renderSeparator(f,this.getItemPosition(d))};dhtmlXMenuObject.prototype.hide=function(){this._clearAndHide()};dhtmlXMenuObject.prototype.clearAll=function(){this.removeItem(this.idPrefix+this.topId,!0);this._isInited=!1;this.idPrefix=this._genStr(12)};dhtmlXMenuObject.prototype.unload=function(){_isIE?(document.body.detachEvent("onclick",this._bodyClick),document.body.detachEvent("oncontextmenu",this._bodyContext)):(window.removeEventListener("click",this._bodyClick,!1),window.removeEventListener("contextmenu",this._bodyContext,!1));this._bodyContext=this._bodyClick=null;this.removeItem(this.idPrefix+this.topId,!0);this.idPull=this.itemPull=null;if(this.context){for(var a in this.contextZones){this.removeContextZone(a)}}if(this.cont!=null){this.cont.className="",this.cont.parentNode.removeChild(this.cont),this.cont=null}if(this.base!=null){this.base.className="";if(!this.context){this.base.oncontextmenu=this.base._oldContextMenuHandler||null}this.base=this.base.onselectstart=null}this.setSkin=null;this.detachAllEvents();if(this._xmlLoader){this._xmlLoader.destructor(),this._xmlLoader=null}this.extendedModule=this.serialize=this.addCheckbox=this.getCheckboxState=this.setCheckboxState=this.addRadioButton=this.setRadioChecked=this.getRadioChecked=this.userData=this.setOverflowHeight=this.contextZones=this.getCircuit=this.clearHref=this.setHref=this.setAlign=this.setRTL=this.setTopText=this.setItemSelected=this.getHotKey=this.setHotKey=this.getTooltip=this.setTooltip=this.setVisibleArea=this.getContextMenuHideAllMode=this.setContextMenuHideAllMode=this.setAutoHideMode=this.setAutoShowMode=this.clearItemImage=this.setItemImage=this.getItemImage=this.enableDynamicLoading=this.setWebModeTimeout=this.setOpenMode=this.getUserData=this.setUserData=this.isItemHidden=this.showItem=this.hideItem=this.loadFromHTML=this.setItemText=this.getItemText=this.isItemEnabled=this.setItemDisabled=this.setItemEnabled=this._removeArrow=this._checkboxOnClickHandler=this._updateCheckboxImage=this._readLevel=this._setCheckboxState=this._getCheckboxState=this._radioOnClickHandler=this._setRadioState=this._getRadioImgObj=this._countPolygonItems=this._doScrollDown=this._doScrollUp=this._isArrowExists=this._removeDownArrow=this._removeUpArrow=this._addDownArrow=this._addUpArrow=this._checkArrowsState=this._clearAllSelectedSubItemsInPolygon=this._updateLoaderIcon=this._changeItemVisible=this._changeItemState=this.hideContextMenu=this.showContextMenu=this.hide=this.detachAllEvents=this.radio=this.items=this.unload=this.dhx_Event=this.detachEvent=this.eventCatcher=this.checkEvent=this.callEvent=this.attachEvent=this.addNewSeparator=this.addNewChild=this.addNewSibling=this.getParentId=this.setItemPosition=this.getItemPosition=this.clearAll=this._hideContextMenu=this._renderSeparator=this._renderSublevelItem=this._renderSublevelPolygon=this._addSubMenuPolygon=this._addItemIntoGlobalStrorage=this._autoDetectVisibleArea=this._doOnContextBeforeCall=this._showContextMenu=this._isContextMenuVisible=this.isContextZone=this.removeContextZone=this.addContextZone=this.renderAsContextMenu=this._getAllParents=this.removeItem=this._updateItemImage=this.setIconPath=this.setIconsPath=this.setImagePath=this._renderToplevelItem=this._initTopLevelMenu=this._redistribTopLevelSelection=this._getItemLevelType=this._updateItemComplexState=this._redefineComplexState=this._countVisiblePolygonItems=this._hideSubLevelItem=this._showSubLevelItem=this._xmlParser=this._buildMenu=this.loadXMLString=this.loadXML=this.init=this.forEachItem=this.getItemType=this._doOnLoad=this._clearAndHide=this._genStr=this._getMenuNodes=this._searchMenuNode=this._doOnTouchMenu=this._doOnClick=this._redistribSubLevelSelection=this._showPolygon=this._hidePolygon=this._getSubItemToDeselectByPolygon=this._removeSubItemFromSelected=this._addSubItemToSelected=this._openedPolygons=this._selectedSubItems=this._enableDacSupport=this.zIndStep=this.zIndInit=this.zInd=this.dacSpeedIE=this.dacSpeed=this.dacCyclesIE=this.dacCycles=this.topId=this.skin=this.userDataTagName=this.itemTipTagName=this.itemTextTagName=this.itemTagName=this.itemHrefTagName=this.itemHotKeyTagName=this.isDhtmlxMenuObject=this.menuTouched=this.menuTimeoutMsec=this.menuTimeoutHandler=this.menuModeTopLevelTimeoutTime=this.menuModeTopLevelTimeout=this.menuMode=this.imagePath=this.idPrefix=this.menuLastClicked=this.menuSelected=this.limit=this.dirTopLevel=this.dirSubLevel=this.fixedPosition=this.loaderIcon=this.dLoadUrl=this.dLoadSign=this.dLoad=this.contextMenuZoneId=this.contextHideAllMode=this.contextAutoShow=this.contextAutoHide=this.context=this.addBaseIdAsContextZone=this._topLevelRightMargin=this._topLevelBottomMargin=this._topLevelOffsetLeft=this._topLevelBottomMargin=this._scrollUpTMTime=this._scrollUpTMStep=this._scrollDownTMTime=this._scrollDownTMStep=this._rtl=this._isInited=this._isIE6=this._arrowFFFix=this._align=null;dhtmlxMenuObjectLiveInstances[this._UID]=null;try{delete dhtmlxMenuObjectLiveInstances[this._UID]}catch(d){}this._UID=null};var dhtmlxMenuObjectLiveInstances={};dhtmlXMenuObject.prototype.i18n={dhxmenuextalert:"dhtmlxmenu_ext.js required"};(function(){dhtmlx.extend_api("dhtmlXMenuObject",{_init:function(a){return[a.parent,a.skin]},align:"setAlign",top_text:"setTopText",context:"renderAsContextMenu",icon_path:"setIconsPath",open_mode:"setOpenMode",rtl:"setRTL",skin:"setSkin",dynamic:"enableDynamicLoading",xml:"loadXML",items:"items",overflow:"setOverflowHeight"},{items:function(h,p){for(var k=100000,o=null,l=0;l0?this.idPull[h].insertBefore(f,this.idPull[h].childNodes[0]):this.idPull[h].appendChild(f)}f.innerHTML=this.itemPull[h].title}}else{f=null;for(l=0;l=0)){var e=this._rtl?0:2;if(this.idPull[f].childNodes[e]&&this.idPull[f].childNodes[e].childNodes[0]){var h=this.idPull[f].childNodes[e].childNodes[0];if(String(h.className).search("complex_arrow")===0){h.className="complex_arrow"+(k?"_loading":"")}}}};dhtmlXMenuObject.prototype.getItemImage=function(d){var e=[null,null],d=this.idPrefix+d;if(this.itemPull[d].type=="item"){e[0]=this.itemPull[d].imgen,e[1]=this.itemPull[d].imgdis}return e};dhtmlXMenuObject.prototype.setItemImage=function(e,f,d){if(this.itemPull[this.idPrefix+e].type=="item"){this.itemPull[this.idPrefix+e].imgen=f,this.itemPull[this.idPrefix+e].imgdis=d,this._updateItemImage(e,this._getItemLevelType(e))}};dhtmlXMenuObject.prototype.clearItemImage=function(c){this.setItemImage(c,"","")};dhtmlXMenuObject.prototype.setAutoShowMode=function(c){this.contextAutoShow=c==!0?!0:!1};dhtmlXMenuObject.prototype.setAutoHideMode=function(c){this.contextAutoHide=c==!0?!0:!1};dhtmlXMenuObject.prototype.setContextMenuHideAllMode=function(c){this.contextHideAllMode=c==!0?!0:!1};dhtmlXMenuObject.prototype.getContextMenuHideAllMode=function(){return this.contextHideAllMode};dhtmlXMenuObject.prototype.setVisibleArea=function(f,k,e,h){this._isVisibleArea=!0;this.menuX1=f;this.menuX2=k;this.menuY1=e;this.menuY2=h};dhtmlXMenuObject.prototype.setTooltip=function(d,e){d=this.idPrefix+d;if(this.itemPull[d]!=null&&this.idPull[d]!=null){this.idPull[d].title=e.length>0?e:null,this.itemPull[d].tip=e}};dhtmlXMenuObject.prototype.getTooltip=function(c){return this.itemPull[this.idPrefix+c]==null?null:this.itemPull[this.idPrefix+c].tip};dhtmlXMenuObject.prototype.setHotKey=function(k,p){k=this.idPrefix+k;if(this.itemPull[k]!=null&&this.idPull[k]!=null&&(this.itemPull[k].parent!=this.idPrefix+this.topId||this.context)&&!this.itemPull[k].complex){var h=this.itemPull[k].type;if(h=="item"||h=="checkbox"||h=="radio"){var o=null;try{if(this.idPull[k].childNodes[this._rtl?0:2].childNodes[0].className=="sub_item_hk"){o=this.idPull[k].childNodes[this._rtl?0:2].childNodes[0]}}catch(m){}if(p.length==0){this.itemPull[k].hotkey_backup=this.itemPull[k].hotkey,this.itemPull[k].hotkey="",o!=null&&o.parentNode.removeChild(o)}else{this.itemPull[k].hotkey=p;this.itemPull[k].hotkey_backup=null;if(o==null){o=document.createElement("DIV");o.className="sub_item_hk";for(var l=this.idPull[k].childNodes[this._rtl?0:2];l.childNodes.length>0;){l.removeChild(l.childNodes[0])}l.appendChild(o)}o.innerHTML=p}}}};dhtmlXMenuObject.prototype.getHotKey=function(c){return this.itemPull[this.idPrefix+c]==null?null:this.itemPull[this.idPrefix+c].hotkey};dhtmlXMenuObject.prototype.setItemSelected=function(c){if(this.itemPull[this.idPrefix+c]==null){return null}};dhtmlXMenuObject.prototype.setTopText=function(c){if(!this.context){if(this._topText==null){this._topText=document.createElement("DIV"),this._topText.className="dhtmlxMenu_TopLevel_Text_"+(this._rtl?"left":this._align=="left"?"right":"left"),this.base.appendChild(this._topText)}this._topText.innerHTML=c}};dhtmlXMenuObject.prototype.setAlign=function(c){if(this._align!=c&&(c=="left"||c=="right")){this._align=c;if(this.cont){this.cont.className=this._align=="right"?"align_right":"align_left"}if(this._topText!=null){this._topText.className="dhtmlxMenu_TopLevel_Text_"+(this._align=="left"?"right":"left")}}};dhtmlXMenuObject.prototype.setHref=function(e,f,d){if(this.itemPull[this.idPrefix+e]!=null){this.itemPull[this.idPrefix+e].href_link=f,d!=null&&(this.itemPull[this.idPrefix+e].href_target=d)}};dhtmlXMenuObject.prototype.clearHref=function(c){this.itemPull[this.idPrefix+c]!=null&&(delete this.itemPull[this.idPrefix+c].href_link,delete this.itemPull[this.idPrefix+c].href_target)};dhtmlXMenuObject.prototype.getCircuit=function(d){for(var e=Array(d);this.getParentId(d)!=this.topId;){d=this.getParentId(d),e[e.length]=d}return e.reverse()};dhtmlXMenuObject.prototype._clearAllSelectedSubItemsInPolygon=function(e){for(var f=this._getSubItemToDeselectByPolygon(e),d=0;d
";d.style.display="none";d.over=!1;d.onselectstart=function(c){c=c||event;return c.returnValue=!1};d.oncontextmenu=function(c){c=c||event;return c.returnValue=!1};d.onmouseover=function(){f.menuMode=="web"&&window.clearTimeout(f.menuTimeoutHandler);f._clearAllSelectedSubItemsInPolygon(this.pId);if(this.className!="dhtmlxMenu_"+f.skin+"_SubLevelArea_ArrowUp_Disabled"){this.className="dhtmlxMenu_"+f.skin+"_SubLevelArea_ArrowUp_Over",this.over=!0,f._canScrollUp=!0,f._doScrollUp(this.pId,!0)}};d.onmouseout=function(){if(f.menuMode=="web"){window.clearTimeout(f.menuTimeoutHandler),f.menuTimeoutHandler=window.setTimeout(function(){f._clearAndHide()},f.menuTimeoutMsec,"JavaScript")}this.over=!1;f._canScrollUp=!1;if(this.className!="dhtmlxMenu_"+f.skin+"_SubLevelArea_ArrowUp_Disabled"){this.className="dhtmlxMenu_"+f.skin+"_SubLevelArea_ArrowUp",window.clearTimeout(f._scrollUpTM)}};d.onclick=function(c){c=c||event;c.returnValue=!1;c.cancelBubble=!0;return !1};document.body.insertBefore(d,document.body.firstChild);this.idPull[d.id]=d};dhtmlXMenuObject.prototype._addDownArrow=function(e){var f=this,d=document.createElement("DIV");d.pId=this.idPrefix+e;d.id="arrowdown_"+this.idPrefix+e;d.className="dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowDown";d.innerHTML="
";d.style.display="none";d.over=!1;d.onselectstart=function(c){c=c||event;return c.returnValue=!1};d.oncontextmenu=function(c){c=c||event;return c.returnValue=!1};d.onmouseover=function(){f.menuMode=="web"&&window.clearTimeout(f.menuTimeoutHandler);f._clearAllSelectedSubItemsInPolygon(this.pId);if(this.className!="dhtmlxMenu_"+f.skin+"_SubLevelArea_ArrowDown_Disabled"){this.className="dhtmlxMenu_"+f.skin+"_SubLevelArea_ArrowDown_Over",this.over=!0,f._canScrollDown=!0,f._doScrollDown(this.pId,!0)}};d.onmouseout=function(){if(f.menuMode=="web"){window.clearTimeout(f.menuTimeoutHandler),f.menuTimeoutHandler=window.setTimeout(function(){f._clearAndHide()},f.menuTimeoutMsec,"JavaScript")}this.over=!1;f._canScrollDown=!1;if(this.className!="dhtmlxMenu_"+f.skin+"_SubLevelArea_ArrowDown_Disabled"){this.className="dhtmlxMenu_"+f.skin+"_SubLevelArea_ArrowDown",window.clearTimeout(f._scrollDownTM)}};d.onclick=function(c){c=c||event;c.returnValue=!1;c.cancelBubble=!0;return !1};document.body.insertBefore(d,document.body.firstChild);this.idPull[d.id]=d};dhtmlXMenuObject.prototype._removeUpArrow=function(d){var e="arrowup_"+this.idPrefix+d;this._removeArrow(e)};dhtmlXMenuObject.prototype._removeDownArrow=function(d){var e="arrowdown_"+this.idPrefix+d;this._removeArrow(e)};dhtmlXMenuObject.prototype._removeArrow=function(e){var f=this.idPull[e];f.onselectstart=null;f.oncontextmenu=null;f.onmouseover=null;f.onmouseout=null;f.onclick=null;f.parentNode&&f.parentNode.removeChild(f);f=null;this.idPull[e]=null;try{delete this.idPull[e]}catch(d){}};dhtmlXMenuObject.prototype._isArrowExists=function(c){return this.idPull["arrowup_"+c]!=null&&this.idPull["arrowdown_"+c]!=null?!0:!1};dhtmlXMenuObject.prototype._doScrollUp=function(k,p){var h=this.idPull["polygon_"+k];if(this._canScrollUp&&h.scrollTop>0){var o=!1,m=h.scrollTop-this._scrollUpTMStep;m<0&&(o=!0,m=0);h.scrollTop=m;if(!o){var l=this;this._scrollUpTM=window.setTimeout(function(){l._doScrollUp(k,!1)},this._scrollUpTMTime)}}else{this._canScrollUp=!1,this._checkArrowsState(k)}p&&this._checkArrowsState(k)};dhtmlXMenuObject.prototype._doScrollDown=function(k,p){var h=this.idPull["polygon_"+k];if(this._canScrollDown&&h.scrollTop+h.offsetHeight<=h.scrollHeight){var o=!1,m=h.scrollTop+this._scrollDownTMStep;m+h.offsetHeight>h.scollHeight&&(o=!0,m=h.scollHeight-h.offsetHeight);h.scrollTop=m;if(!o){var l=this;this._scrollDownTM=window.setTimeout(function(){l._doScrollDown(k,!1)},this._scrollDownTMTime)}}else{this._checkArrowsState(k)}p&&this._checkArrowsState(k)};dhtmlXMenuObject.prototype._countPolygonItems=function(h){var m=0,f;for(f in this.itemPull){var l=this.itemPull[f].parent,k=this.itemPull[f].type;l==this.idPrefix+h&&(k=="item"||k=="radio"||k=="checkbox")&&m++}return m};dhtmlXMenuObject.prototype.setOverflowHeight=function(e){if(!(this.limit==0&&e<=0)){if(this._clearAndHide(),this.limit>=0&&e>0){this.limit=e}else{if(this.limit>0&&e<=0){for(var f in this.itemPull){if(this._isArrowExists(f)){var d=String(f).replace(this.idPrefix,"");this._removeUpArrow(d);this._removeDownArrow(d);this.idPull["polygon_"+f].style.height=""}}this.limit=0}}}};dhtmlXMenuObject.prototype._getRadioImgObj=function(e){try{var f=this.idPull[this.idPrefix+e].childNodes[this._rtl?2:0].childNodes[0]}catch(d){f=null}return f};dhtmlXMenuObject.prototype._setRadioState=function(f,k){var e=this._getRadioImgObj(f);if(e!=null){var h=this.itemPull[this.idPrefix+f];h.checked=k;h.imgen="rdbt_"+(h.checked?"1":"0");h.imgdis=h.imgen;e.className="sub_icon "+h.imgen}};dhtmlXMenuObject.prototype._radioOnClickHandler=function(f,k,e){if(!(k.charAt(1)=="d"||this.itemPull[this.idPrefix+f].group==null)){var h=this.itemPull[this.idPrefix+f].group;this.checkEvent("onRadioClick")?this.callEvent("onRadioClick",[h,this.getRadioChecked(h),f,this.contextMenuZoneId,e])&&this.setRadioChecked(h,f):this.setRadioChecked(h,f);this.checkEvent("onClick")&&this.callEvent("onClick",[f])}};dhtmlXMenuObject.prototype.getRadioChecked=function(k){for(var p=null,h=0;h"));this.itemPull[v].type=="separator"?m=' type="separator"':this.itemPull[v].state=="disabled"&&(p=' enabled="false"');this.itemPull[v].type=="checkbox"&&(m=' type="checkbox"'+(this.itemPull[v].checked?' checked="true"':""));this.itemPull[v].type=="radio"&&(m=' type="radio" group="'+this.itemPull[v].group+'" '+(this.itemPull[v].checked?' checked="true"':""));u+="";u+=q;this.itemPull[v].complex&&(u+=this._readLevel(v));u+=""}}return u};dhtmlXMenuObject.prototype.serialize=function(){var c=""+this._readLevel(this.idPrefix+this.topId)+"";return c};function xmlPointer(c){this.d=c}xmlPointer.prototype={text:function(){if(!_isFF){return this.d.xml}var c=new XMLSerializer;return c.serializeToString(this.d)},get:function(c){return this.d.getAttribute(c)},exists:function(){return !!this.d},content:function(){return this.d.firstChild?this.d.firstChild.data:""},each:function(k,h,p,o){var m=this.d.childNodes,l=new xmlPointer;if(m.length){for(o=o||0;o0){F={},F.tr=N.childNodes[0].tr.previousSibling}N._has_top=!0;for(z=D;z>0;z--){C[z]=C[z-1]}D=0}}}var A;if(!(A=this._idpull[M])||A.span!=-1){A=C[D]=new dhtmlXTreeItemObject(M,L,N,this,K,1),M=C[D].id,N.childsCount++}if(!A.htmlNode){A.label=L,A.htmlNode=this._createItem(this.checkBoxOff?1:0,A),A.htmlNode.objBelong=A}J&&(A.images[0]=J);I&&(A.images[1]=I);H&&(A.images[2]=H);var x=this._drawNewTr(A.htmlNode);if(this.XMLloadingWarning||this._hAdI){A.htmlNode.parentNode.parentNode.style.display="none"}F&&F.tr.nextSibling?N.htmlNode.childNodes[0].insertBefore(x,F.tr.nextSibling):this.parsingOn==N.id?this.parsedArray[this.parsedArray.length]=x:N.htmlNode.childNodes[0].appendChild(x);F&&!F.span&&(F=null);if(this.XMLsource){A.XMLload=E&&E!=0?0:1}A.tr=x;x.nodem=A;if(N.itemId==0){x.childNodes[0].className="hiddenRow"}(N._r_logic||this._frbtr)&&this._setSrc(A.htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0],this.imPath+this.radioArray[0]);if(G){v=G.split(",");for(y=0;y=2&&(this._correctPlus(C[N.childsCount-2]),this._correctLine(C[N.childsCount-2])),N.childsCount!=2&&this._correctPlus(C[0]),this.tscheck&&this._correctCheckStates(N),this._onradh)){if(this.xmlstate==1){var u=this.onXLE;this.onXLE=function(c){this._onradh(M);u&&u(c)}}else{this._onradh(M)}}return A};dhtmlXTreeObject.prototype.enableContextMenu=function(c){if(c){this.cMenu=c}};dhtmlXTreeObject.prototype.setItemContextMenu=function(h,f){for(var m=h.toString().split(this.dlmtr),l=0;l=0;s--){u.childNodes[s]._dmark&&this.deleteItem(u.childNodes[s].id)}}for(var p=this._globalIdStorageFind(this.parsingOn),s=0;s1){(m[1].style.display!="none"||f==1)&&f!=2?(this.allTree.childNodes[0].border="1",this.allTree.childNodes[0].border="0",nodestyle="none"):nodestyle="";for(var k=1;k7){p.style.width="999999px"}else{if(!window._KHTMLrv){p.style.width="100%"}}A.span.innerHTML=A.label;p.appendChild(A.span);p.parentObject=A;v.parentObject=A;p.onclick=this.onRowSelect;v.onclick=this.onRowClick;p.ondblclick=this.onRowClick2;if(this.ettip){w.title=A.label}if(this.dragAndDropOff){if(this._aimgs){this.dragger.addDraggableItem(o,this),o.parentObject=A}this.dragger.addDraggableItem(p,this)}A.span.style.paddingLeft="5px";A.span.style.paddingRight="5px";p.style.verticalAlign="";p.style.fontSize="10pt";p.style.cursor=this.style_pointer;w.appendChild(v);w.appendChild(s);w.appendChild(o);w.appendChild(p);x.appendChild(w);y.appendChild(x);if(this.ehlt||this.checkEvent("onMouseIn")||this.checkEvent("onMouseOut")){w.onmousemove=this._itemMouseIn,w[_isIE?"onmouseleave":"onmouseout"]=this._itemMouseOut}return y};dhtmlXTreeObject.prototype.setImagePath=function(c){this.iconURL=this.imPath=c};dhtmlXTreeObject.prototype.setIconPath=function(c){this.iconURL=c};dhtmlXTreeObject.prototype._getLeafCount=function(e){for(var d=0,f=0;fthis._getNodeLevel(l,0)?this.dropLower?l.id!=this.rootId?this._moveNodeTo(k,l.parentObject,l):this._moveNodeTo(k,this.htmlNode,null):this._moveNodeTo(k,m.parentObject):this._moveNodeTo(k,l.parentObject,l)}else{return this._moveNodeTo(k,h)}};dhtmlXTreeObject.prototype._fixNodesCollection=function(l,k){var t=0,s=0,q=l.childNodes,p=l.childsCount-1;if(k!=q[p]){for(var o=0;o=2&&(this._correctPlus(t[A.childsCount-2]),this._correctLine(t[A.childsCount-2]));this._correctPlus(t[A.childsCount-1]);this.tscheck&&this._correctCheckStates(A);x.tscheck&&x._correctCheckStates(v)}w>1&&(x._correctPlus(v.childNodes[w-2]),x._correctLine(v.childNodes[w-2]));x._correctPlus(v);x._correctLine(v);this._fixChildCountLabel(A);x._fixChildCountLabel(v);this.callEvent("onDrop",[B.id,A.id,z?z.id:null,x,A.treeNod]);return B.id};dhtmlXTreeObject.prototype._clearStyles=function(f){if(f.htmlNode){var e=f.htmlNode.childNodes[0].childNodes[0].childNodes[1],k=e.nextSibling.nextSibling;f.span.innerHTML=f.label;f.i_sel=!1;f._aimgs&&this.dragger.removeDraggableItem(e.nextSibling);this.checkBoxOff?(e.childNodes[0].style.display="",e.childNodes[0].onclick=this.onCheckBoxClick,this._setSrc(e.childNodes[0],this.imPath+this.checkArray[f.checkstate])):e.childNodes[0].style.display="none";e.childNodes[0].treeNod=this;this.dragger.removeDraggableItem(k);this.dragAndDropOff&&this.dragger.addDraggableItem(k,this);this._aimgs&&this.dragger.addDraggableItem(e.nextSibling,this);k.childNodes[0].className="standartTreeRow";k.onclick=this.onRowSelect;k.ondblclick=this.onRowClick2;e.previousSibling.onclick=this.onRowClick;this._correctLine(f);this._correctPlus(f);for(var h=0;h0){var h=f.childNodes[k].unParsed?this._getAllScraggyItemsXML(f.childNodes[k].unParsed,1):this._getAllScraggyItems(f.childNodes[k]);h&&(e?e+=this.dlmtr+h:e=h)}else{e?e+=this.dlmtr+f.childNodes[k].id:e=f.childNodes[k].id}}return e};dhtmlXTreeObject.prototype._getAllFatItems=function(f){for(var e="",k=0;k0){e?e+=this.dlmtr+f.childNodes[k].id:e=f.childNodes[k].id;var h=f.childNodes[k].unParsed?this._getAllFatItemsXML(f.childNodes[k].unParsed,1):this._getAllFatItems(f.childNodes[k]);h&&(e+=this.dlmtr+h)}}return e};dhtmlXTreeObject.prototype._getAllSubItems=function(k,h,p){var o=p?p:this._globalIdStorageFind(k);if(!o){return 0}for(var h="",m=0;m=f.childsCount?null:f.childNodes[d].id};dhtmlXTreeObject.prototype.getChildItemIdByIndex=function(e,d){var f=this._globalIdStorageFind(e);return !f||d>=f.childsCount?null:f.childNodes[d].id};dhtmlXTreeObject.prototype.setDragHandler=function(c){this.attachEvent("onDrag",c)};dhtmlXTreeObject.prototype._clearMove=function(){if(this._lastMark){this._lastMark.className=this._lastMark.className.replace(/dragAndDropRow/g,""),this._lastMark=null}this.selectionBar.style.display="none";this.allTree.className=this.allTree.className.replace(" selectionBox","")};dhtmlXTreeObject.prototype.enableDragAndDrop=function(d,c){d=="temporary_disabled"?(this.dADTempOff=!1,d=!0):this.dADTempOff=!0;(this.dragAndDropOff=convertStringToBoolean(d))&&this.dragger.addDragLanding(this.allTree,this);if(arguments.length>1){this._ddronr=!convertStringToBoolean(c)}};dhtmlXTreeObject.prototype._setMove=function(k,h,q){if(k.parentObject.span){var p=getAbsoluteTop(k),o=getAbsoluteTop(this.allTree)-this.allTree.scrollTop;this.dadmodec=this.dadmode;this.dadmodefix=0;if(this.dadmode==2){var m=q-p+(document.body.scrollTop||document.documentElement.scrollTop)-2-k.offsetHeight/2;if(Math.abs(m)-k.offsetHeight/6>0){if(this.dadmodec=1,m<0){this.dadmodefix=0-k.offsetHeight}}else{this.dadmodec=0}}if(this.dadmodec==0){var l=k.parentObject.span;l.className+=" dragAndDropRow";this._lastMark=l}else{this._clearMove();this.selectionBar.style.top=p-o+((parseInt(k.parentObject.span.parentNode.previousSibling.childNodes[0].style.height)||18)-1)+this.dadmodefix+"px";this.selectionBar.style.left="5px";if(this.allTree.offsetWidth>20){this.selectionBar.style.width=this.allTree.offsetWidth-(_isFF?30:25)+"px"}this.selectionBar.style.display=""}this._autoScroll(null,p,o)}};dhtmlXTreeObject.prototype._autoScroll=function(e,d,f){if(this.autoScroll){e&&(d=getAbsoluteTop(e),f=getAbsoluteTop(this.allTree));if(d-f-parseInt(this.allTree.scrollTop)>parseInt(this.allTree.offsetHeight)-50){this.allTree.scrollTop=parseInt(this.allTree.scrollTop)+20}if(d-f"+this._selected[l].span.innerHTML+""}}else{m=this.getSelectedItemText().split(this.dlmtr)}o.innerHTML=m.join("");o.style.position="absolute";o.className="dragSpanDiv";this._dragged=[].concat(this._selected);return o};dhtmlXTreeObject.prototype._focusNode=function(d){var c=getAbsoluteTop(d.htmlNode)-getAbsoluteTop(this.allTree);if(c>this.allTree.offsetHeight-30||c<0){this.allTree.scrollTop=c+this.allTree.scrollTop}};dhtmlXTreeObject.prototype._preventNsDrag=function(c){c&&c.preventDefault&&c.preventDefault();return !1};dhtmlXTreeObject.prototype._drag=function(l,k,t){this._autoOpenTimer&&clearTimeout(this._autoOpenTimer);if(!t.parentObject){t=this.htmlNode.htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0],this.dadmodec=0}this._clearMove();var s=l.parentObject.treeNod;s&&s._clearMove&&s._clearMove("");if(!this.dragMove||this.dragMove()){for(var q=!s||!s._clearMove||!s._dragged?Array(l.parentObject):s._dragged,p=t.parentObject,o=0;o2?f.checkstate-3:f.checkstate,this._setCheck(f),f.dscheck<3)){f.dscheck=!1}};dhtmlXTreeObject.prototype.smartRefreshBranch=function(d,c){this._branchUpdate=1;this.smartRefreshItem(d,c)};dhtmlXTreeObject.prototype.smartRefreshItem=function(f,e){for(var k=this._globalIdStorageFind(f),h=0;h0){var h=f.childNodes[k].unParsed?this._getAllScraggyItemsXML(f.childNodes[k].unParsed,1):this._getAllScraggyItems(f.childNodes[k]);h&&(e?e+=this.dlmtr+h:e=h)}else{e?e+=this.dlmtr+f.childNodes[k].id:e=f.childNodes[k].id}}return e};dhtmlXTreeObject.prototype._getAllFatItems=function(f){for(var e="",k=0;k0){e?e+=this.dlmtr+f.childNodes[k].id:e=f.childNodes[k].id;var h=f.childNodes[k].unParsed?this._getAllFatItemsXML(f.childNodes[k].unParsed,1):this._getAllFatItems(f.childNodes[k]);h&&(e+=this.dlmtr+h)}}return e};dhtmlXTreeObject.prototype.getAllItemsWithKids=function(){return this._getAllFatItems(this.htmlNode)};dhtmlXTreeObject.prototype.getAllFatItems=dhtmlXTreeObject.prototype.getAllItemsWithKids;dhtmlXTreeObject.prototype.getAllChecked=function(){return this._getAllChecked("","",1)};dhtmlXTreeObject.prototype.getAllUnchecked=function(c){c&&(c=this._globalIdStorageFind(c));return this._getAllChecked(c,"",0)};dhtmlXTreeObject.prototype.getAllPartiallyChecked=function(){return this._getAllChecked("","",2)};dhtmlXTreeObject.prototype.getAllCheckedBranches=function(){var d=[this._getAllChecked("","",1)],c=this._getAllChecked("","",2);c&&d.push(c);return d.join(this.dlmtr)};dhtmlXTreeObject.prototype._getAllChecked=function(h,f,m){if(!h){h=this.htmlNode}if(h.checkstate==m&&!h.nocheckbox){f?f+=this.dlmtr+h.id:f=h.id}for(var l=h.childsCount,k=0;k