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(f){var d=50;funcLine=0;currFunc=f;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)}}}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)}}}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(f){document.getElementById("selectedText").value=f.text;document.getElementById("selectedID").value=f.value;if(document.getElementById("userEmail2")){if(typeof(emails[f.value])=="undefined"){emails[f.value]=""}document.getElementById("userEmail2").value=emails[f.value];var a="";if(homepages[f.value]!=""){a=tree.getItemText(homepages[f.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[f.value],defaultUserPageTitle,true)}}if(document.getElementById("tags")){if(typeof(tags[f.value])=="undefined"){tags[f.value]=""}document.getElementById("tags").value=tags[f.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(f,d){var a=false;for(var c=0;c";a+='';a+='';if(!((tmpID=="wiki")&&(c[d]["value"]==0))){a+=c[d]["text"]}else{a+=''+c[d]["text"]+""}a+="";for(var f=0;f';a+=""}a+=""}a+="";document.getElementById("count").value=c.length;h.innerHTML=a}function _gettable(){var f=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(f,c){if(!c){c="block"}var a=document.getElementById(f);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 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}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 headerPage(a){if(a.readyState==4){if(a.status==200){document.getElementById("settingsContent").innerHTML=center(a.responseText);document.getElementById("submit_button").style.visibility="visible";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";attachColorPicker(document.getElementById("menuFontColor"));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";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"))}}}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";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 h=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}}}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 f=document.getElementsByTagName("head");var a=f[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)}}}function appLatest(){if(typeof(showAppLatestVersions)=="function"){showAppLatestVersions();var f=getElementsByClass("appVersionVal");var a=getElementsByClass("latestAppVersionVal");var h=new Array;for(var d=0;d0){this.base.removeChild(this.base.childNodes[0])}this.base.className+=" dhtmlxMenu_"+this.skin+"_Middle";this.base._autoSkinUpdate=true;this.addBaseIdAsContextZone=c}else{this.base=document.body}}this.topId="dhxWebMenuTopId";this.menu=new Array();this.subMenuData=new Array();this.menuSelected=-1;this.menuLastClicked=-1;this.idPrefix="";this.itemTagName="item";this.itemTextTagName="itemtext";this.userDataTagName="userdata";this.itemTipTagName="tooltip";this.itemHotKeyTagName="hotkey";this.dirTopLevel="bottom";this.dirSubLevel="right";this.menuX1=null;this.menuX2=null;this.menuY1=null;this.menuY2=null;this.menuMode="web";this.menuTimeoutMsec=400;this.menuTimeoutHandler=null;this.idPull={};this.itemPull={};this.userData={};this.radio={};this.menuTouched=false;this.zIndInit=1200;this.zInd=this.zIndInit;this.zIndStep=50;this.menuModeTopLevelTimeout=true;this.menuModeTopLevelTimeoutTime=200;this.topLevelItemPaddingIconExists=27;this.topLevelItemPaddingIconNotExists=6;this._topLevelBottomMargin=1;this._topLevelRightMargin=0;this._arrowFFFix=(_isIE?0:-4);this.setSkin=function(h){var j=this.skin;this.skin=h;switch(this.skin){case"standard":this._topLevelBottomMargin=1;this._arrowFFFix=(_isIE?0:-4);break;case"clear_blue":case"clear_green":case"clear_silver":this._topLevelBottomMargin=3;this._arrowFFFix=(_isIE?0:-4);break;case"aqua_orange":case"aqua_sky":case"aqua_dark":this._topLevelBottomMargin=1;this._arrowFFFix=(_isIE?0:-2);break;case"modern_blue":case"modern_red":case"modern_black":this._topLevelBottomMargin=3;this._arrowFFFix=(_isIE?0:-2);break;case"glassy_blue":this._topLevelBottomMargin=0;break;case"dhx_black":case"dhx_blue":this._topLevelBottomMargin=2;this._topLevelRightMargin=1;break}if(this.base._autoSkinUpdate){this.base.className=this.base.className.replace("dhtmlxMenu_"+j+"_Middle","")+" dhtmlxMenu_"+this.skin+"_Middle"}};this.setSkin(this.skin);this.dLoad=false;this.dLoadUrl="";this.loaderIcon=false;this.limit=0;this._scrollUpTM=null;this._scrollUpTMTime=20;this._scrollUpTMStep=3;this._scrollDownTM=null;this._scrollDownTMTime=20;this._scrollDownTMStep=3;this.context=false;this.contextZones={};this.contextMenuZoneId=false;this.contextAutoShow=true;this.contextAutoHide=true;this.sxDacProc=null;this.dacSpeed=30;this.dacCycles=[];for(var d=0;d<10;d++){this.dacCycles[d]=d}this.dacSpeedIE=60;this.dacCyclesIE=[];for(var d=0;d<3;d++){this.dacCyclesIE[d]=d*2+1}this._enableDacSupport=function(h){this.sxDacProc=h};this._selectedSubItems=new Array();this._openedPolygons=new Array();this._addSubItemToSelected=function(k,j){var h=true;for(var l=0;l0&&this.limit0&&this.limitB){s=j-t+2}if(q+F>A&&this.menuY2!=null){q=K+m-F+2}this.idPull[D].style.left=s+"px";this.idPull[D].style.top=q+E+"px";if((this.sxDacProc!=null)&&(this.idPull["sxDac_"+C]!=null)){this.idPull["sxDac_"+C]._show()}else{this.idPull[D].style.visibility="";if(this.limit>0&&this.limit0){this._openedPolygons.pop()}var h=this._getSubItemToDeselectByPolygon(l);this._removeSubItemFromSelected(-1,-1);for(var k=0;k0){h=k}}}return h};this._getMenuNodes=function(k){var h=new Array;for(var j in this.itemPull){if(this.itemPull[j]["parent"]==k){h[h.length]=j}}return h};this._genStr=function(h){var j="";var l="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";for(var k=0;k0){a._openedPolygons.pop()}for(var h=0;h0));if(this.dLoad&&s.complex){s.loaded="no"}this.itemPull[s.id]=s;for(var o=0;o1){o._menuOpenTM=window.setTimeout(function(){a._showPolygon(l,p)},j);h=true}}}if(!h){a._showPolygon(l,p)}}a.itemPull[a.idPrefix+parentId]["loaded"]="yes";if(a.loaderIcon==true){a._updateLoaderIcon(a.idPrefix+parentId,false)}}this.destructor();a.callEvent("onXLE",[])}else{var m=this.getXMLTopNode("menu");a._buildMenu(m,null);a.init();a.callEvent("onXLE",[]);a._doOnLoad()}};this._xmlLoader=new dtmlXMLLoaderObject(this._xmlParser,window);this._showSubLevelItem=function(j,h){if(document.getElementById("arrow_"+this.idPrefix+j)!=null){document.getElementById("arrow_"+this.idPrefix+j).style.display=(h?"none":"")}if(document.getElementById("image_"+this.idPrefix+j)!=null){document.getElementById("image_"+this.idPrefix+j).style.display=(h?"none":"")}if(document.getElementById(this.idPrefix+j)!=null){document.getElementById(this.idPrefix+j).style.display=(h?"":"none")}};this._hideSubLevelItem=function(h){this._showSubLevelItem(h,true)};this.idPrefix=this._genStr(12);dhtmlxEvent(document.body,"click",function(){if(a.context){a._hideContextMenu()}else{a._clearAndHide()}});dhtmlxEvent(document.body,"contextmenu",function(j){if(a._skip_hide){a._skip_hide=false;return}j=j||event;var h=true;var k=j.target||j.srcElement;if(k.id!=null){if(a.isContextZone(k.id)){h=false}}if(h){a.hideContextMenu()}});this.dhx_Event();return this}dhtmlXMenuObject.prototype.init=function(){if(this._isInited==true){return}if(this.dLoad){this.callEvent("onXLS",[]);this._xmlLoader.loadXML(this.dLoadUrl+"?action=loadMenu&etc="+new Date().getTime())}else{this._initTopLevelMenu();this._isInited=true}};dhtmlXMenuObject.prototype._initTopLevelMenu=function(){this.dirTopLevel="bottom";this.dirSubLevel="right";if(this.context){this.idPull[this.idPrefix+this.topId]=new Array(0,0);this._addSubMenuPolygon(this.idPrefix+this.topId,this.idPrefix+this.topId);this._attachEvents()}else{var a=this._getMenuNodes(this.idPrefix+this.topId);for(var c=0;c0)&&(!this.itemPull[c]["complex"])){this._updateItemComplexState(c,true,false)}if((a==0)&&(this.itemPull[c]["complex"])){this._updateItemComplexState(c,false,false)}}};dhtmlXMenuObject.prototype._updateItemComplexState=function(k,h,j){if((!this.context)&&(this._getItemLevelType(k.replace(this.idPrefix,""))=="TopLevel")){this.itemPull[k]["complex"]=h;return}if((this.idPull[k]==null)||(this.itemPull[k]==null)){return}this.itemPull[k]["complex"]=h;var a=null;if(k==this.idPrefix+this.topId){return}for(var f=0;f";c.style.display="none";c.over=false;c.onmouseover=function(){if(a.menuMode=="web"){window.clearTimeout(a.menuTimeoutHandler)}a._clearAllSelectedSubItemsInPolygon(this.pId);if(this.className=="dhtmlxMenu_"+a.skin+"_SubLevelArea_ArrowUp_Disabled"){return}this.className="dhtmlxMenu_"+a.skin+"_SubLevelArea_ArrowUp_Over";this.over=true;a._canScrollUp=true;a._doScrollUp(this.pId,true)};c.onmouseout=function(){if(a.menuMode=="web"){window.clearTimeout(a.menuTimeoutHandler);a.menuTimeoutHandler=window.setTimeout(function(){a._clearAndHide()},a.menuTimeoutMsec,"JavaScript")}this.over=false;a._canScrollUp=false;if(this.className=="dhtmlxMenu_"+a.skin+"_SubLevelArea_ArrowUp_Disabled"){return}this.className="dhtmlxMenu_"+a.skin+"_SubLevelArea_ArrowUp";window.clearTimeout(a._scrollUpTM)};document.body.appendChild(c);this.idPull[c.id]=c};dhtmlXMenuObject.prototype._addDownArrow=function(d){var a=this;var c=document.createElement("DIV");c.pId=this.idPrefix+d;c.id="arrowdown_"+this.idPrefix+d;c.className="dhtmlxMenu_"+this.skin+"_SubLevelArea_ArrowDown";c.innerHTML="
";c.style.display="none";c.over=false;c.onmouseover=function(){if(a.menuMode=="web"){window.clearTimeout(a.menuTimeoutHandler)}a._clearAllSelectedSubItemsInPolygon(this.pId);if(this.className=="dhtmlxMenu_"+a.skin+"_SubLevelArea_ArrowDown_Disabled"){return}this.className="dhtmlxMenu_"+a.skin+"_SubLevelArea_ArrowDown_Over";this.over=true;a._canScrollDown=true;a._doScrollDown(this.pId,true)};c.onmouseout=function(){if(a.menuMode=="web"){window.clearTimeout(a.menuTimeoutHandler);a.menuTimeoutHandler=window.setTimeout(function(){a._clearAndHide()},a.menuTimeoutMsec,"JavaScript")}this.over=false;a._canScrollDown=false;if(this.className=="dhtmlxMenu_"+a.skin+"_SubLevelArea_ArrowDown_Disabled"){return}this.className="dhtmlxMenu_"+a.skin+"_SubLevelArea_ArrowDown";window.clearTimeout(a._scrollDownTM)};document.body.appendChild(c);this.idPull[c.id]=c};dhtmlXMenuObject.prototype._removeUpArrow=function(a){};dhtmlXMenuObject.prototype._removeDownArrow=function(a){};dhtmlXMenuObject.prototype._isArrowExists=function(a){if(this.idPull["arrowup_"+a]!=null&&this.idPull["arrowdown_"+a]!=null){return true}return false};dhtmlXMenuObject.prototype._doScrollUp=function(j,f){var a=this.idPull["polygon_"+j];if(this._canScrollUp&&a.scrollTop>0){var d=false;var h=a.scrollTop-this._scrollUpTMStep;if(h<0){d=true;h=0}a.scrollTop=h;if(!d){var c=this;this._scrollUpTM=window.setTimeout(function(){c._doScrollUp(j,false)},this._scrollUpTMTime)}}else{this._canScrollUp=false;this._checkArrowsState(j)}if(f){this._checkArrowsState(j)}};dhtmlXMenuObject.prototype._doScrollDown=function(j,f){var a=this.idPull["polygon_"+j];if(this._canScrollDown&&a.scrollTop+a.offsetHeight<=a.scrollHeight){var d=false;var h=a.scrollTop+this._scrollDownTMStep;if(h+a.offsetHeight>a.scollHeight){d=true;h=a.scollHeight-a.offsetHeight}a.scrollTop=h;if(!d){var c=this;this._scrollDownTM=window.setTimeout(function(){c._doScrollDown(j,false)},this._scrollDownTMTime)}}else{this._canScrollDown;this._checkArrowsState(j)}if(f){this._checkArrowsState(j)}};dhtmlXMenuObject.prototype._countPolygonItems=function(j){var f=0;for(var c in this.itemPull){var d=this.itemPull[c]["parent"];var h=this.itemPull[c]["type"];if(d==this.idPrefix+j&&(h=="item"||h=="radio"||h=="checkbox")){f++}}return f};dhtmlXMenuObject.prototype.setOverflowHeight=function(f){if(this.limit==0&&f<=0){return}if(this.limit==0&&f>0){var c=true;for(var d in this.idPull){if(d.match(/^polygon_/gi)!=null){var j=d.replace("polygon_"+this.idPrefix,"");var h=this._countPolygonItems(j);if(h>f){this._addDownArrow(j);this._addUpArrow(j)}}}this.limit=f;return}if(this.limit>0&&f>0){for(var d in this.idPull){if(d.match(/^polygon_/gi)!=null){var j=d.replace("polygon_"+this.idPrefix,"");var h=this._countPolygonItems(j);if(this._isArrowExists&&h<=f){this._removeDownArrow(j);this._removeUpArrow(j)}if(!this._isArrowExists&&h>f){this._addDownArrow(j);this._addUpArrow(j)}}}this.limit=f}if(this.limit>0&&f<=0){return}};dhtmlXMenuObject.prototype._redistribTopLevelPositions=function(){var a=0;for(var c=0;c0){if(c!=null){c.src=(this.itemPull[this.idPrefix+k]["type"]=="checkbox"||this.itemPull[this.idPrefix+k]["type"]=="radio"?this.skinPath:this.imagePath)+f}else{var d=document.createElement("IMG");d.className="dhtmlxMenu_"+this.skin+"_"+a+"_Item_Icon";d.src=this.imagePath+f;d.id="image_"+this.idPrefix+k;d.border=0;this.idPull[this.idPrefix+k].appendChild(d);if(a=="TopLevel"){this.idPull[this.idPrefix+k].style.paddingLeft=this.topLevelItemPaddingIconExists+"px"}}}else{if(c!=null){this.idPull[this.idPrefix+k].removeChild(c);if(a=="TopLevel"){this.idPull[this.idPrefix+k].style.paddingLeft=this.topLevelItemPaddingIconNotExists+"px"}}}};dhtmlXMenuObject.prototype.getItemImage=function(c){var a=new Array(null,null);c=this.idPrefix+c;if(this.itemPull[c]["type"]=="item"){a[0]=this.itemPull[c]["imgen"];a[1]=this.itemPull[c]["imgdis"]}return a};dhtmlXMenuObject.prototype.setItemImage=function(d,a,c){if(this.itemPull[this.idPrefix+d]["type"]!="item"){return}this.itemPull[this.idPrefix+d]["imgen"]=a;this.itemPull[this.idPrefix+d]["imgdis"]=c;this._updateItemImage(d,this._getItemLevelType(d));this._redistribTopLevelPositions()};dhtmlXMenuObject.prototype.clearItemImage=function(a){this.setItemImage(a,"","")};dhtmlXMenuObject.prototype.setWebModeTimeout=function(a){this.menuTimeoutMsec=(!isNaN(a)?a:400)};dhtmlXMenuObject.prototype._getRadioImgObj=function(f){var a=null;for(var d=0;d0){a.title=this.itemPull[k]["tip"]}if((this.itemPull[k]["imgen"]!="")||(this.itemPull[k]["imgdis"]!="")){var f=this.itemPull[k][(this.itemPull[k]["state"]=="enabled")?"imgen":"imgdis"];if(f){var f="";a.innerHTML=f+a.innerHTML;a.style.paddingLeft=this.topLevelItemPaddingIconExists+"px"}}a.onselectstart=function(l){l=l||event;l.returnValue=false};var d=0;for(var h=0;hthis.base.childNodes.length-1){j=null}}if(j!=null){this.base.insertBefore(a,this.base.childNodes[j]);this._redistribTopLevelPositions()}else{this.base.appendChild(a)}this.idPull[a.id]=a;if(this.itemPull[k]["complex"]&&(!this.dLoad)){this._addSubMenuPolygon(this.itemPull[k]["id"],this.itemPull[k]["id"])}a.onmouseover=function(){if(c.menuMode=="web"){window.clearTimeout(c.menuTimeoutHandler)}var l=c._getSubItemToDeselectByPolygon("parent");c._removeSubItemFromSelected(-1,-1);for(var p=0;p"}else{var s=""}if(j_icon.length>0){j_icon=""}j.innerHTML=j_icon+this.itemPull[d]["title"]+s;if(this.itemPull[d]["hotkey"].length>0&&!this.itemPull[d]["complex"]){var f="";for(var c=0;c"+this.itemPull[d]["hotkey"]+""+f+""}j.id=this.itemPull[d]["id"];j.parent=this.itemPull[d]["parent"];if(this.itemPull[d]["tip"].length>0){j.title=this.itemPull[d]["tip"]}j.onselectstart=function(k){k=k||event;k.returnValue=false};j.onmouseover=function(){if(a.menuMode=="web"){window.clearTimeout(a.menuTimeoutHandler)}a._redistribSubLevelSelection(this.id,this.parent)};if(a.menuMode=="web"){j.onmouseout=function(){window.clearTimeout(a.menuTimeoutHandler);a.menuTimeoutHandler=window.setTimeout(function(){a._clearAndHide()},a.menuTimeoutMsec,"JavaScript")}}j.onclick=function(k){if(!a.checkEvent("onClick")&&a.itemPull[this.id]["complex"]){return}k=k||event;k.cancelBubble=true;tc=(a.itemPull[this.id]["complex"]?"c":"-");td=(a.itemPull[this.id]["state"]=="enabled"?"-":"d");switch(a.itemPull[this.id]["type"]){case"checkbox":a._checkboxOnClickHandler(this.id.replace(a.idPrefix,""),tc+td+"n");break;case"radio":a._radioOnClickHandler(this.id.replace(a.idPrefix,""),tc+td+"n");break;case"item":a._doOnClick(this.id.replace(a.idPrefix,""),tc+td+"n");break}};var o=this.idPull["polygon_"+this.itemPull[d]["parent"]];if(m!=null){m++;if(m<0){m=0}if(m>o.childNodes.length-1){m=null}}if(m!=null){o.insertBefore(j,o.childNodes[m])}else{o.appendChild(j)}this.idPull[j.id]=j};dhtmlXMenuObject.prototype._renderSeparator=function(h,f){var a=this;var c=document.createElement("DIV");c.id="separator_"+h;c.className="dhtmlxMenu_"+this.skin+"_SubLevelArea_Separator";c.onselectstart=function(j){j=j||event;j.returnValue=false};c.onclick=function(j){j=j||event;j.cancelBubble=true;a._doOnClick(this.id.replace("separator_"+a.idPrefix,""),"--s")};var d=this.idPull["polygon_"+this.itemPull[h]["parent"]];if(f!=null){f++;if(f<0){f=0}if(f>d.childNodes.length-1){f=null}}if(f!=null){d.insertBefore(c,d.childNodes[f])}else{d.appendChild(c)}this.idPull[c.id]=c};dhtmlXMenuObject.prototype.hide=function(){this._clearAndHide()};dhtmlXMenuObject.prototype.setTooltip=function(c,a){c=this.idPrefix+c;if(!(this.itemPull[c]!=null&&this.idPull[c]!=null)){return}this.idPull[c].title=(a.length>0?this.itemPull[c]["tip"]:null);this.itemPull[c]["tip"]=a};dhtmlXMenuObject.prototype.getTooltip=function(a){if(this.itemPull[this.idPrefix+a]==null){return null}return this.itemPull[this.idPrefix+a]["tip"]};dhtmlXMenuObject.prototype.setHotKey=function(j,a){j=this.idPrefix+j;if(!(this.itemPull[j]!=null&&this.idPull[j]!=null)){return}if(this.itemPull[j]["parent"]==this.idPrefix+this.topId){return}if(this.itemPull[j]["complex"]){return}if(this.itemPull[j]["type"]!="item"){return}var h=null;var c=null;for(var d=0;d0){q=new Object;q.tr=k.childNodes[0].tr.previousSibling}k._has_top=true;for(h=o;h>0;h--){z[h]=z[h-1]}o=0;break}}}var p;if(!(p=this._idpull[j])||p.span!=-1){p=z[o]=new dhtmlXTreeItemObject(j,f,k,this,l,1);j=z[o].id;k.childsCount++}if(!p.htmlNode){p.label=f;p.htmlNode=this._createItem((this.checkBoxOff?1:0),p);p.htmlNode.objBelong=p}if(y){p.images[0]=y}if(x){p.images[1]=x}if(w){p.images[2]=w}var c=this._drawNewTr(p.htmlNode);if((this.XMLloadingWarning)||(this._hAdI)){p.htmlNode.parentNode.parentNode.style.display="none"}if((q)&&(q.tr.nextSibling)){k.htmlNode.childNodes[0].insertBefore(c,q.tr.nextSibling)}else{if(this.parsingOn==k.id){this.parsedArray[this.parsedArray.length]=c}else{k.htmlNode.childNodes[0].appendChild(c)}}if((q)&&(!q.span)){q=null}if(this.XMLsource){if((d)&&(d!=0)){p.XMLload=0}else{p.XMLload=1}}p.tr=c;c.nodem=p;if(k.itemId==0){c.childNodes[0].className="hiddenRow"}if((k._r_logic)||(this._frbtr)){this._setSrc(p.htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0],this.imPath+this.radioArray[0])}if(m){var t=m.split(",");for(var u=0;u=2){this._correctPlus(z[k.childsCount-2]);this._correctLine(z[k.childsCount-2])}if(k.childsCount!=2){this._correctPlus(z[0])}if(this.tscheck){this._correctCheckStates(k)}if(this._onradh){if(this.xmlstate==1){var a=this.onXLE;this.onXLE=function(A){this._onradh(j);if(a){a(A)}}}else{this._onradh(j)}}}return p};dhtmlXTreeObject.prototype.enableContextMenu=function(a){if(a){this.cMenu=a}};dhtmlXTreeObject.prototype.setItemContextMenu=function(h,f){var a=h.toString().split(this.dlmtr);for(var d=0;d=0;h--){if(q.childNodes[h]._dmark){this.deleteItem(q.childNodes[h].id)}}}var m=this._globalIdStorageFind(this.parsingOn);for(var h=0;h1){if(((f[1].style.display!="none")||(h==1))&&(h!=2)){this.allTree.childNodes[0].border="1";this.allTree.childNodes[0].border="0";nodestyle="none"}else{nodestyle=""}for(var d=1;dthis._getNodeLevel(d,0)){if(!this.dropLower){return this._moveNodeTo(a,f.parentObject)}else{if(d.id!=this.rootId){return this._moveNodeTo(a,d.parentObject,d)}else{return this._moveNodeTo(a,this.htmlNode,null)}}}else{return this._moveNodeTo(a,d.parentObject,d)}}else{return this._moveNodeTo(a,c)}};dhtmlXTreeObject.prototype._fixNodesCollection=function(l,j){var c=0;var f=0;var k=l.childNodes;var a=l.childsCount-1;if(j==k[a]){return}for(var h=0;h=2){this._correctPlus(s[t.childsCount-2]);this._correctLine(s[t.childsCount-2])}}this._correctPlus(s[t.childsCount-1]);if(this.tscheck){this._correctCheckStates(t)}if(d.tscheck){d._correctCheckStates(o)}}if(m>1){d._correctPlus(o.childNodes[m-2]);d._correctLine(o.childNodes[m-2])}d._correctPlus(o);d._correctLine(o);this._fixChildCountLabel(t);d._fixChildCountLabel(o);this.callEvent("onDrop",[q.id,t.id,(p?p.id:null),d,t.treeNod]);return q.id};dhtmlXTreeObject.prototype._clearStyles=function(a){if(!a.htmlNode){return}var f=a.htmlNode.childNodes[0].childNodes[0].childNodes[1];var c=f.nextSibling.nextSibling;a.span.innerHTML=a.label;a.i_sel=false;if(a._aimgs){this.dragger.removeDraggableItem(f.nextSibling)}if(this.checkBoxOff){f.childNodes[0].style.display="";f.childNodes[0].onclick=this.onCheckBoxClick;this._setSrc(f.childNodes[0],this.imPath+this.checkArray[a.checkstate])}else{f.childNodes[0].style.display="none"}f.childNodes[0].treeNod=this;this.dragger.removeDraggableItem(c);if(this.dragAndDropOff){this.dragger.addDraggableItem(c,this)}if(this._aimgs){this.dragger.addDraggableItem(f.nextSibling,this)}c.childNodes[0].className="standartTreeRow";c.onclick=this.onRowSelect;c.ondblclick=this.onRowClick2;f.previousSibling.onclick=this.onRowClick;this._correctLine(a);this._correctPlus(a);for(var d=0;d0)){if(d.childNodes[c].unParsed){var a=this._getAllScraggyItemsXML(d.childNodes[c].unParsed,1)}else{var a=this._getAllScraggyItems(d.childNodes[c])}if(a){if(f){f+=this.dlmtr+a}else{f=a}}}else{if(!f){f=d.childNodes[c].id}else{f+=this.dlmtr+d.childNodes[c].id}}}return f};dhtmlXTreeObject.prototype._getAllFatItems=function(d){var f="";for(var c=0;c0)){if(!f){f=d.childNodes[c].id}else{f+=this.dlmtr+d.childNodes[c].id}if(d.childNodes[c].unParsed){var a=this._getAllFatItemsXML(d.childNodes[c].unParsed,1)}else{var a=this._getAllFatItems(d.childNodes[c])}if(a){f+=this.dlmtr+a}}}return f};dhtmlXTreeObject.prototype._getAllSubItems=function(j,h,f){if(f){c=f}else{var c=this._globalIdStorageFind(j)}if(!c){return 0}h="";for(var d=0;dc.childsCount)){return null}return c.childNodes[a].id};dhtmlXTreeObject.prototype.getChildItemIdByIndex=function(d,a){var c=this._globalIdStorageFind(d);if((!c)||(a>=c.childsCount)){return null}return c.childNodes[a].id};dhtmlXTreeObject.prototype.setDragHandler=function(a){this.attachEvent("onDrag",a)};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(c,a){if(c=="temporary_disabled"){this.dADTempOff=false;c=true}else{this.dADTempOff=true}this.dragAndDropOff=convertStringToBoolean(c);if(this.dragAndDropOff){this.dragger.addDragLanding(this.allTree,this)}if(arguments.length>1){this._ddronr=(!convertStringToBoolean(a))}};dhtmlXTreeObject.prototype._setMove=function(h,d,k){if(h.parentObject.span){var f=getAbsoluteTop(h);var c=getAbsoluteTop(this.allTree);this.dadmodec=this.dadmode;this.dadmodefix=0;if(this.dadmode==2){var j=k-f+this.allTree.scrollTop+(document.body.scrollTop||document.documentElement.scrollTop)-2-h.offsetHeight/2;if((Math.abs(j)-h.offsetHeight/6)>0){this.dadmodec=1;if(j<0){this.dadmodefix=0-h.offsetHeight}}else{this.dadmodec=0}}if(this.dadmodec==0){var a=h.parentObject.span;a.className+=" dragAndDropRow";this._lastMark=a}else{this._clearMove();this.selectionBar.style.top=(f-c+((parseInt(h.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,f,c)}};dhtmlXTreeObject.prototype._autoScroll=function(d,c,a){if(this.autoScroll){if(d){c=getAbsoluteTop(d);a=getAbsoluteTop(this.allTree)}if((c-a-parseInt(this.allTree.scrollTop))>(parseInt(this.allTree.offsetHeight)-50)){this.allTree.scrollTop=parseInt(this.allTree.scrollTop)+20}if((c-a)<(parseInt(this.allTree.scrollTop)+30)){this.allTree.scrollTop=parseInt(this.allTree.scrollTop)-20}}};dhtmlXTreeObject.prototype._createDragNode=function(h,f){if(!this.dADTempOff){return null}var d=h.parentObject;if(!this.callEvent("onBeforeDrag",[d.id])){return null}if(!d.i_sel){this._selectItem(d,f)}this._checkMSelectionLogic();var c=document.createElement("div");var j=new Array();if(this._itim_dg){for(var a=0;a"+this._selected[a].span.innerHTML+""}}else{j=this.getSelectedItemText().split(this.dlmtr)}c.innerHTML=j.join("");c.style.position="absolute";c.className="dragSpanDiv";this._dragged=(new Array()).concat(this._selected);return c};dhtmlXTreeObject.prototype._focusNode=function(a){var c=getAbsoluteTop(a.htmlNode)-getAbsoluteTop(this.allTree);if((c>(this.allTree.scrollTop+this.allTree.offsetHeight-30))||(c-1){this._openItem(a._pageData[0])}a._pageData=null};dhtmlXTreeObject.prototype._prevPageCall=function(a){tree.deleteChildItems(a._pageData[0].id);a.parentNode.removeChild(a);var d=this._getOpenState(a._pageData[0]);var c=a._pageData[1]-this._epgpsC;if(c<0){c=0}this._parseXMLTree(this,a._pageData[3],a._pageData[0].id,a._pageData[2],null,c);this._redrawFrom(this,a._pageData[0],0);if(d>-1){this._openItem(a._pageData[0])}a._pageData=null};dhtmlXTreeObject.prototype.enableTextSigns=function(a){this._txtimg=convertStringToBoolean(a)};dhtmlXTreeObject.prototype.preventIECaching=function(a){this.no_cashe=convertStringToBoolean(a);this.XMLLoader.rSeed=this.no_cashe};dhtmlXTreeObject.prototype.preventIECashing=dhtmlXTreeObject.prototype.preventIECaching;dhtmlXTreeObject.prototype.disableCheckbox=function(d,c){if(typeof(d)!="object"){var a=this._globalIdStorageFind(d,0,1)}else{var a=d}if(!a){return}a.dscheck=convertStringToBoolean(c)?(((a.checkstate||0)%3)+3):((a.checkstate>2)?(a.checkstate-3):a.checkstate);this._setCheck(a);if(a.dscheck<3){a.dscheck=false}};dhtmlXTreeObject.prototype.smartRefreshBranch=function(c,a){this._branchUpdate=1;this.smartRefreshItem(c,a)};dhtmlXTreeObject.prototype.smartRefreshItem=function(f,d){var a=this._globalIdStorageFind(f);for(var c=0;c0)){if(d.childNodes[c].unParsed){var a=this._getAllScraggyItemsXML(d.childNodes[c].unParsed,1)}else{var a=this._getAllScraggyItems(d.childNodes[c])}if(a){if(f){f+=this.dlmtr+a}else{f=a}}}else{if(!f){f=d.childNodes[c].id}else{f+=this.dlmtr+d.childNodes[c].id}}}return f};dhtmlXTreeObject.prototype._getAllFatItems=function(d){var f="";for(var c=0;c0)){if(!f){f=d.childNodes[c].id}else{f+=this.dlmtr+d.childNodes[c].id}if(d.childNodes[c].unParsed){var a=this._getAllFatItemsXML(d.childNodes[c].unParsed,1)}else{var a=this._getAllFatItems(d.childNodes[c])}if(a){f+=this.dlmtr+a}}}return f};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(a){if(a){a=this._globalIdStorageFind(a)}return this._getAllChecked(a,"",0)};dhtmlXTreeObject.prototype.getAllPartiallyChecked=function(){return this._getAllChecked("","",2)};dhtmlXTreeObject.prototype.getAllCheckedBranches=function(){var a=this._getAllChecked("","",1);if(a!=""){a+=this.dlmtr}return a+this._getAllChecked("","",2)};dhtmlXTreeObject.prototype._getAllChecked=function(f,d,h){if(!f){f=this.htmlNode}if(f.checkstate==h){if(!f.nocheckbox){if(d){d+=this.dlmtr+f.id}else{d=f.id}}}var a=f.childsCount;for(var c=0;cm.span.innerHTML.toUpperCase())?1:((o.span.innerHTML.toUpperCase()==m.span.innerHTML.toUpperCase())?0:-1))})}}else{if(this._csfunca){a.sort(function(o,m){return d._csfunca(m.id,o.id)})}else{a.sort(function(o,m){return((o.span.innerHTML.toUpperCase()j.getAttribute("text"))?1:((m.getAttribute("text")==j.getAttribute("text"))?0:-1))})}else{a.sort(function(m,j){return((m.getAttribute("text")",">"]];dhtmlXTreeObject.prototype.registerXMLEntity=function(a,c){this._serEnts[this._serEnts.length]=[a,c,new RegExp(a,"g")]};dhtmlXTreeObject.prototype.setSerializationLevel=function(a,c,h,j,d){this._xuserData=convertStringToBoolean(a);this._xfullXML=convertStringToBoolean(c);this._dtd=d;this._xescapeEntities=convertStringToBoolean(h);if(convertStringToBoolean(j)){this._apreUC=""}else{}for(var f=0;f'}a+='';if((this._xuserData)&&(this._idpull[this.rootId]._userdatalist)){var d=this._idpull[this.rootId]._userdatalist.split(",");for(var c=0;c'+this._apreUC+this._idpull[this.rootId].userData["t_"+d[c]]+this._apstUC+""}}for(var c=0;c";return a};dhtmlXTreeObject.prototype._serializeItem=function(k){if(k.unParsed){if(document.all){return k.unParsed.d.xml}else{var a=new XMLSerializer();return a.serializeToString(k.unParsed.d)}}var c="";if(this._selected.length){var f=this._selected[0].id}else{f='"'}var j=k.span.innerHTML;if(this._xescapeEntities){for(var d=0;d"}else{c='"}if((this._xuserData)&&(k._userdatalist)){var h=k._userdatalist.split(",");for(var d=0;d'+this._apreUC+k.userData["t_"+h[d]]+this._apstUC+""}}for(var d=0;d";return c};dhtmlXTreeObject.prototype.saveSelectedItem=function(c,a){c=c||"";this.setCookie("treeStateSelected"+c,this.getSelectedItemId(),a)};dhtmlXTreeObject.prototype.restoreSelectedItem=function(a){a=a||"";var c=this.getCookie("treeStateSelected"+a);this.selectItem(c,false)};dhtmlXTreeObject.prototype.enableAutoSavingSelected=function(a,c){this.assMode=convertStringToBoolean(a);if((this.assMode)&&(!this.oldOnSelect)){this.oldOnSelect=this.onRowSelect;this.onRowSelect=function(f,d,h){if(!d){d=this}d.parentObject.treeNod.oldOnSelect(f,d,h);if(d.parentObject.treeNod.assMode){d.parentObject.treeNod.saveSelectedItem(d.parentObject.treeNod.assCookieName)}}}this.assCookieName=c};dhtmlXTreeObject.prototype.saveState=function(d,c){var h=this._escape(this.serializeTree());var a=4000;if(h.length>a){if(navigator.appName.indexOf("Microsoft")!=-1){return false}this.setCookie("treeStatex"+d,Math.ceil(h.length/a));for(var f=0;f0){var f=document.cookie.indexOf(d);if(f!=-1){f+=d.length;var a=document.cookie.indexOf(";",f);if(a==-1){a=document.cookie.length}return document.cookie.substring(f,a)}}};dhtmlXTreeObject.prototype.saveOpenStates=function(c,a){var f=[];for(var d=0;d0){var f=document.cookie.indexOf(d);if(f!=-1){f+=d.length;var a=document.cookie.indexOf(";",f);if(a==-1){a=document.cookie.length}return(document.cookie.substring(f,a))}}}dhtmlXTreeObject.prototype.openAllItemsDynamic=function(a){this.ClosedElem=new Array();this.G_node=null;var c=this._globalIdStorageFind(a||this.rootId);if(c.id!=this.rootId&&this.getOpenState(c.id)!=0){this.openItem(a)}this._openAllNodeChilds(c,0);if(this.ClosedElem.length>0){this.onLoadReserve=this.onXLE;this.onXLE=this._loadAndOpen;this._loadAndOpen(this)}};dhtmlXTreeObject.prototype._openAllNodeChilds=function(c){if((c.XMLload==0)||(c.unParsed)){this.ClosedElem.push(c)}for(var a=0;a0){this._openAllNodeChilds(c.childNodes[a])}if((c.childNodes[a].XMLload==0)||(c.childNodes[a].unParsed)){this.ClosedElem.push(c.childNodes[a])}}};dhtmlXTreeObject.prototype._loadAndOpen=function(a){if(a.G_node){a._openItem(a.G_node);a._openAllNodeChilds(a.G_node);a.G_node=null}if(a.ClosedElem.length>0){a.G_node=a.ClosedElem.shift()}if(a.G_node){if(a.G_node.unParsed){a.reParse(a.G_node)}else{window.setTimeout(function(){a._loadDynXML(a.G_node.id)},100)}}else{a.onXLE=a.onLoadReserve;if(a.onXLE){a.onXLE(a)}a.callEvent("onAllOpenDynamic",[a])}};dhtmlXTreeObject.prototype.openItemsDynamic=function(c,a){this._opnItmsDnmcFlg=convertStringToBoolean(a);this.onLoadReserve=this.onXLE;this.onXLE=this._stepOpen;this.ClosedElem=c.split(",").reverse();this._stepOpen(this)};dhtmlXTreeObject.prototype._stepOpen=function(c){if(!c.ClosedElem.length){c.onXLE=c.onLoadReserve;if(c._opnItmsDnmcFlg){c.selectItem(c.G_node,true)}if((c.onXLE)&&(arguments[1])){c.onXLE.apply(c,arguments)}c.callEvent("onOpenDynamicEnd",[]);return}c.G_node=c.ClosedElem.pop();var a=c._globalIdStorageFind(c.G_node);if(a.XMLload===0){c.openItem(c.G_node)}else{c.openItem(c.G_node);c._stepOpen(c)}};