function dtmlXMLLoaderObject(B,D,C,A){this.xmlDoc="";if(arguments.length==2){this.async=true}else{this.async=C}this.onloadAction=B||null;this.mainObject=D||null;this.waitCall=null;this.rSeed=A||false;return this}dtmlXMLLoaderObject.prototype.waitLoadFunction=function(A){this.check=function(){if(A.onloadAction!=null){if((!A.xmlDoc.readyState)||(A.xmlDoc.readyState==4)){A.onloadAction(A.mainObject,null,null,null,A);if(A.waitCall){A.waitCall();A.waitCall=null}A=null}}};return this.check};dtmlXMLLoaderObject.prototype.getXMLTopNode=function(B){if(this.xmlDoc.responseXML){var A=this.xmlDoc.responseXML.getElementsByTagName(B);var D=A[0]}else{var D=this.xmlDoc.documentElement}if(D){this._retry=false;return D}if((_isIE)&&(!this._retry)){var C=this.xmlDoc.responseText;this._retry=true;this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=false;this.xmlDoc.loadXML(C);return this.getXMLTopNode(B)}dhtmlxError.throwError("LoadXML","Incorrect XML",[this.xmlDoc,this.mainObject]);return document.createElement("DIV")};dtmlXMLLoaderObject.prototype.loadXMLString=function(B){try{var C=new DOMParser();this.xmlDoc=C.parseFromString(B,"text/xml")}catch(A){this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=this.async;this.xmlDoc.loadXML(B)}this.onloadAction(this.mainObject);if(this.waitCall){this.waitCall();this.waitCall=null}};dtmlXMLLoaderObject.prototype.loadXML=function(C,B,A){if(this.rSeed){C+=((C.indexOf("?")!=-1)?"&":"?")+"a_dhx_rSeed="+(new Date()).valueOf()}this.filePath=C;if(window.XMLHttpRequest){this.xmlDoc=new XMLHttpRequest();this.xmlDoc.open(B?"POST":"GET",C,this.async);if(B){this.xmlDoc.setRequestHeader("Content-type","application/x-www-form-urlencoded")}this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);this.xmlDoc.send(null||A)}else{if(document.implementation&&document.implementation.createDocument){this.xmlDoc=document.implementation.createDocument("","",null);this.xmlDoc.onload=new this.waitLoadFunction(this);this.xmlDoc.load(C)}else{this.xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");this.xmlDoc.open(B?"POST":"GET",C,this.async);if(B){this.xmlDoc.setRequestHeader("Content-type","application/x-www-form-urlencoded")}this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);this.xmlDoc.send(null||A)}}};dtmlXMLLoaderObject.prototype.destructor=function(){this.onloadAction=null;this.mainObject=null;this.xmlDoc=null;return null};function callerFunction(A,B){this.handler=function(C){if(!C){C=event}A(C,B);return true};return this.handler}function getAbsoluteLeft(B){var C=B.offsetLeft;var A=B.offsetParent;while(A!=null){C+=A.offsetLeft;A=A.offsetParent}return C}function getAbsoluteTop(C){var B=C.offsetTop;var A=C.offsetParent;while(A!=null){B+=A.offsetTop;A=A.offsetParent}return B}function convertStringToBoolean(A){if(typeof (A)=="string"){A=A.toLowerCase()}switch(A){case"1":case"true":case"yes":case"y":case 1:case true:return true;break;default:return false}}function getUrlSymbol(A){if(A.indexOf("?")!=-1){return"&"}else{return"?"}}function dhtmlDragAndDropObject(){this.lastLanding=0;this.dragNode=0;this.dragStartNode=0;this.dragStartObject=0;this.tempDOMU=null;this.tempDOMM=null;this.waitDrag=0;if(window.dhtmlDragAndDrop){return window.dhtmlDragAndDrop}window.dhtmlDragAndDrop=this;return this}dhtmlDragAndDropObject.prototype.removeDraggableItem=function(A){A.onmousedown=null;A.dragStarter=null;A.dragLanding=null};dhtmlDragAndDropObject.prototype.addDraggableItem=function(A,B){A.onmousedown=this.preCreateDragCopy;A.dragStarter=B;this.addDragLanding(A,B)};dhtmlDragAndDropObject.prototype.addDragLanding=function(A,B){A.dragLanding=B};dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(A){if(window.dhtmlDragAndDrop.waitDrag){window.dhtmlDragAndDrop.waitDrag=0;document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU;document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM;return false}window.dhtmlDragAndDrop.waitDrag=1;window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;window.dhtmlDragAndDrop.tempDOMM=document.body.onmousemove;window.dhtmlDragAndDrop.dragStartNode=this;window.dhtmlDragAndDrop.dragStartObject=this.dragStarter;document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;if((A)&&(A.preventDefault)){A.preventDefault();return false}return false};dhtmlDragAndDropObject.prototype.callDrag=function(C){if(!C){C=window.event}dragger=window.dhtmlDragAndDrop;if((C.button==0)&&(_isIE)){return dragger.stopDrag()}if(!dragger.dragNode){dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode,C);if(!dragger.dragNode){return dragger.stopDrag()}dragger.gldragNode=dragger.dragNode;document.body.appendChild(dragger.dragNode);document.body.onmouseup=dragger.stopDrag;dragger.waitDrag=0;dragger.dragNode.pWindow=window;dragger.initFrameRoute()}if(dragger.dragNode.parentNode!=window.document.body){var A=dragger.gldragNode;if(dragger.gldragNode.old){A=dragger.gldragNode.old}A.parentNode.removeChild(A);var B=dragger.dragNode.pWindow;if(_isIE){var E=document.createElement("Div");E.innerHTML=dragger.dragNode.outerHTML;dragger.dragNode=E.childNodes[0]}else{dragger.dragNode=dragger.dragNode.cloneNode(true)}dragger.dragNode.pWindow=window;dragger.gldragNode.old=dragger.dragNode;document.body.appendChild(dragger.dragNode);B.dhtmlDragAndDrop.dragNode=dragger.dragNode}dragger.dragNode.style.left=C.clientX+15+(dragger.fx?dragger.fx*(-1):0)+(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";dragger.dragNode.style.top=C.clientY+3+(dragger.fy?dragger.fy*(-1):0)+(document.body.scrollTop||document.documentElement.scrollTop)+"px";if(!C.srcElement){var D=C.target}else{D=C.srcElement}dragger.checkLanding(D,C.clientX,C.clientY)};dhtmlDragAndDropObject.prototype.calculateFramePosition=function(E){if(window.name){var C=parent.frames[window.name].frameElement.offsetParent;var D=0;var B=0;while(C){D+=C.offsetLeft;B+=C.offsetTop;C=C.offsetParent}if((parent.dhtmlDragAndDrop)){var A=parent.dhtmlDragAndDrop.calculateFramePosition(1);D+=A.split("_")[0]*1;B+=A.split("_")[1]*1}if(E){return D+"_"+B}else{this.fx=D}this.fy=B}return"0_0"};dhtmlDragAndDropObject.prototype.checkLanding=function(B,A,C){if((B)&&(B.dragLanding)){if(this.lastLanding){this.lastLanding.dragLanding._dragOut(this.lastLanding)}this.lastLanding=B;this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding,this.dragStartNode,A,C)}else{if((B)&&(B.tagName!="BODY")){this.checkLanding(B.parentNode,A,C)}else{if(this.lastLanding){this.lastLanding.dragLanding._dragOut(this.lastLanding,A,C)}this.lastLanding=0;if(this._onNotFound){this._onNotFound()}}}};dhtmlDragAndDropObject.prototype.stopDrag=function(B,C){dragger=window.dhtmlDragAndDrop;if(!C){dragger.stopFrameRoute();var A=dragger.lastLanding;dragger.lastLanding=null;if(A){A.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,A)}}dragger.lastLanding=null;if((dragger.dragNode)&&(dragger.dragNode.parentNode==document.body)){dragger.dragNode.parentNode.removeChild(dragger.dragNode)}dragger.dragNode=0;dragger.gldragNode=0;dragger.fx=0;dragger.fy=0;dragger.dragStartNode=0;dragger.dragStartObject=0;document.body.onmouseup=dragger.tempDOMU;document.body.onmousemove=dragger.tempDOMM;dragger.tempDOMU=null;dragger.tempDOMM=null;dragger.waitDrag=0};dhtmlDragAndDropObject.prototype.stopFrameRoute=function(B){if(B){window.dhtmlDragAndDrop.stopDrag(1,1)}for(var A=0;A<window.frames.length;A++){if((window.frames[A]!=B)&&(window.frames[A].dhtmlDragAndDrop)){window.frames[A].dhtmlDragAndDrop.stopFrameRoute(window)}}if((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=B)){parent.dhtmlDragAndDrop.stopFrameRoute(window)}};dhtmlDragAndDropObject.prototype.initFrameRoute=function(B,C){if(B){window.dhtmlDragAndDrop.preCreateDragCopy();window.dhtmlDragAndDrop.dragStartNode=B.dhtmlDragAndDrop.dragStartNode;window.dhtmlDragAndDrop.dragStartObject=B.dhtmlDragAndDrop.dragStartObject;window.dhtmlDragAndDrop.dragNode=B.dhtmlDragAndDrop.dragNode;window.dhtmlDragAndDrop.gldragNode=B.dhtmlDragAndDrop.dragNode;window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag;window.waitDrag=0;if(((!_isIE)&&(C))&&((!_isFF)||(_FFrv<1.8))){window.dhtmlDragAndDrop.calculateFramePosition()}}if((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=B)){parent.dhtmlDragAndDrop.initFrameRoute(window)}for(var A=0;A<window.frames.length;A++){if((window.frames[A]!=B)&&(window.frames[A].dhtmlDragAndDrop)){window.frames[A].dhtmlDragAndDrop.initFrameRoute(window,((!B||C)?1:0))}}};var _isFF=false;var _isIE=false;var _isOpera=false;var _isKHTML=false;var _isMacOS=false;if(navigator.userAgent.indexOf("Macintosh")!=-1){_isMacOS=true}if((navigator.userAgent.indexOf("Safari")!=-1)||(navigator.userAgent.indexOf("Konqueror")!=-1)){_isKHTML=true}else{if(navigator.userAgent.indexOf("Opera")!=-1){_isOpera=true;_OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Opera")+6,3))}else{if(navigator.appName.indexOf("Microsoft")!=-1){_isIE=true}else{_isFF=true;var _FFrv=parseFloat(navigator.userAgent.split("rv:")[1])}}}function isIE(){if(navigator.appName.indexOf("Microsoft")!=-1){if(navigator.userAgent.indexOf("Opera")==-1){return true}}return false}dtmlXMLLoaderObject.prototype.doXPath=function(C,A){if((_isOpera)||(_isKHTML)){return this.doXPathOpera(C,A)}if(_isIE){if(!A){if(!this.xmlDoc.nodeName){A=this.xmlDoc.responseXML}else{A=this.xmlDoc}}return A.selectNodes(C)}else{var E=A;if(!A){if(!this.xmlDoc.nodeName){A=this.xmlDoc.responseXML}else{A=this.xmlDoc}}if(A.nodeName.indexOf("document")!=-1){E=A}else{E=A;A=A.ownerDocument}var F=new Array();var B=A.evaluate(C,E,null,XPathResult.ANY_TYPE,null);var D=B.iterateNext();while(D){F[F.length]=D;D=B.iterateNext()}return F}};if((window.Node)&&(!_isKHTML)){Node.prototype.removeNode=function(C){var B=this;if(Boolean(C)){return this.parentNode.removeChild(B)}else{var A=document.createRange();A.selectNodeContents(B);return this.parentNode.replaceChild(A.extractContents(),B)}}}function _dhtmlxError(B,A,C){if(!this.catches){this.catches=new Array()}return this}_dhtmlxError.prototype.catchError=function(B,A){this.catches[B]=A};_dhtmlxError.prototype.throwError=function(B,A,C){if(this.catches[B]){return this.catches[B](B,A,C)}if(this.catches.ALL){return this.catches.ALL(B,A,C)}alert("Error type: "+arguments[0]+"\nDescription: "+arguments[1]);return null};window.dhtmlxError=new _dhtmlxError();dtmlXMLLoaderObject.prototype.doXPathOpera=function(C,A){var E=C.replace(/[\/]+/gi,"/").split("/");var D=null;var B=1;if(!E.length){return[]}if(E[0]=="."){D=[A]}else{if(E[0]==""){D=this.xmlDoc.responseXML.getElementsByTagName(E[B].replace(/\[[^\]]*\]/g,""));B++}else{return[]}}for(B;B<E.length;B++){D=this._getAllNamedChilds(D,E[B])}if(E[B-1].indexOf("[")!=-1){D=this._filterXPath(D,E[B-1])}return D};dtmlXMLLoaderObject.prototype._filterXPath=function(B,A){var D=new Array();var A=A.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,"");for(var C=0;C<B.length;C++){if(B[C].getAttribute(A)){D[D.length]=B[C]}}return D};dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(B,A){var E=new Array();for(var D=0;D<B.length;D++){for(var C=0;C<B[D].childNodes.length;C++){if(B[D].childNodes[C].tagName==A){E[E.length]=B[D].childNodes[C]}}}return E};function dhtmlXHeir(B,A){for(c in A){if(typeof (A[c])=="function"){B[c]=A[c]}}return B}function dhtmlxEvent(B,C,A){if(B.addEventListener){B.addEventListener(C,A,false)}else{if(B.attachEvent){B.attachEvent("on"+C,A)}}};