function dtmlXMLLoaderObject(b,e,d,a){this.xmlDoc="";if(typeof(d)!="undefined"){this.async=d;}else{this.async=true;}this.onloadAction=b||null;this.mainObject=e||null;this.waitCall=null;this.rSeed=a||false;return this;}dtmlXMLLoaderObject.prototype.waitLoadFunction=function(b){var a=true;this.check=function(){if((b)&&(b.onloadAction!=null)){if((!b.xmlDoc.readyState)||(b.xmlDoc.readyState==4)){if(!a){return;}a=false;b.onloadAction(b.mainObject,null,null,null,b);if(b.waitCall){b.waitCall();b.waitCall=null;}}}};return this.check;};dtmlXMLLoaderObject.prototype.getXMLTopNode=function(d,a){if(this.xmlDoc.responseXML){var b=this.xmlDoc.responseXML.getElementsByTagName(d);var f=b[0];}else{var f=this.xmlDoc.documentElement;}if(f){this._retry=false;return f;}if((_isIE)&&(!this._retry)){var e=this.xmlDoc.responseText;var a=this.xmlDoc;this._retry=true;this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=false;this.xmlDoc.loadXML(e);return this.getXMLTopNode(d,a);}dhtmlxError.throwError("LoadXML","Incorrect XML",[(a||this.xmlDoc),this.mainObject]);return document.createElement("DIV");};dtmlXMLLoaderObject.prototype.loadXMLString=function(b){if(_isKHTML){var d=document.createElement("div");d.innerHTML=b;this.xmlDoc=d;d.responseXML=d;}else{try{var f=new DOMParser();this.xmlDoc=f.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,null,null,null,this);if(this.waitCall){this.waitCall();this.waitCall=null;}};dtmlXMLLoaderObject.prototype.loadXML=function(d,b,a,e){if(this.rSeed){d+=((d.indexOf("?")!=-1)?"&":"?")+"a_dhx_rSeed="+(new Date()).valueOf();}this.filePath=d;if((!_isIE)&&(window.XMLHttpRequest)){this.xmlDoc=new XMLHttpRequest();}else{if(document.implementation&&document.implementation.createDocument){this.xmlDoc=document.implementation.createDocument("","",null);this.xmlDoc.onload=new this.waitLoadFunction(this);this.xmlDoc.load(d);return;}else{this.xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");}}this.xmlDoc.open(b?"POST":"GET",d,this.async);if(e){this.xmlDoc.setRequestHeader("User-Agent","dhtmlxRPC v0.1 ("+navigator.userAgent+")");this.xmlDoc.setRequestHeader("Content-type","text/xml");}else{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(d){if(!d){d=window.event;}a(d,b);return true;};return this.handler;}function getAbsoluteLeft(b){var d=b.offsetLeft;var a=b.offsetParent;while(a!=null){d+=a.offsetLeft;a=a.offsetParent;}return d;}function getAbsoluteTop(d){var b=d.offsetTop;var a=d.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(){if(window.dhtmlDragAndDrop){return window.dhtmlDragAndDrop;}this.lastLanding=0;this.dragNode=0;this.dragStartNode=0;this.dragStartObject=0;this.tempDOMU=null;this.tempDOMM=null;this.waitDrag=0;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(d){if(!d){d=window.event;}dragger=window.dhtmlDragAndDrop;if((d.button==0)&&(_isIE)){return dragger.stopDrag();}if(!dragger.dragNode){dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode,d);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 g=document.createElement("Div");g.innerHTML=dragger.dragNode.outerHTML;dragger.dragNode=g.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=d.clientX+15+(dragger.fx?dragger.fx*(-1):0)+(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";dragger.dragNode.style.top=d.clientY+3+(dragger.fy?dragger.fy*(-1):0)+(document.body.scrollTop||document.documentElement.scrollTop)+"px";if(!d.srcElement){var f=d.target;}else{f=d.srcElement;}dragger.checkLanding(f,d);};dhtmlDragAndDropObject.prototype.calculateFramePosition=function(f){if(window.name){var d=parent.frames[window.name].frameElement.offsetParent;var e=0;var b=0;while(d){e+=d.offsetLeft;b+=d.offsetTop;d=d.offsetParent;}if((parent.dhtmlDragAndDrop)){var a=parent.dhtmlDragAndDrop.calculateFramePosition(1);e+=a.split("_")[0]*1;b+=a.split("_")[1]*1;}if(f){return e+"_"+b;}else{this.fx=e;}this.fy=b;}return"0_0";};dhtmlDragAndDropObject.prototype.checkLanding=function(b,a){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.clientX,a.clientY,a);this.lastLanding_scr=(_isIE?a.srcElement:a.target);}else{if((b)&&(b.tagName!="BODY")){this.checkLanding(b.parentNode,a);}else{if(this.lastLanding){this.lastLanding.dragLanding._dragOut(this.lastLanding,a.clientX,a.clientY,a);}this.lastLanding=0;if(this._onNotFound){this._onNotFound();}}}};dhtmlDragAndDropObject.prototype.stopDrag=function(b,d){dragger=window.dhtmlDragAndDrop;if(!d){dragger.stopFrameRoute();var a=dragger.lastLanding;dragger.lastLanding=null;if(a){a.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,a,(_isIE?event.srcElement:b.target));}}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,d){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)&&(d))&&((!_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||d)?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(d,a){if((_isOpera)||(_isKHTML)){return this.doXPathOpera(d,a);}if(_isIE){if(!a){if(!this.xmlDoc.nodeName){a=this.xmlDoc.responseXML;}else{a=this.xmlDoc;}}return a.selectNodes(d);}else{var f=a;if(!a){if(!this.xmlDoc.nodeName){a=this.xmlDoc.responseXML;}else{a=this.xmlDoc;}}if(a.nodeName.indexOf("document")!=-1){f=a;}else{f=a;a=a.ownerDocument;}var g=new Array();var b=a.evaluate(d,f,null,XPathResult.ANY_TYPE,null);var e=b.iterateNext();while(e){g[g.length]=e;e=b.iterateNext();}return g;}};function _dhtmlxError(b,a,d){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,d){if(this.catches[b]){return this.catches[b](b,a,d);}if(this.catches.ALL){return this.catches.ALL(b,a,d);}alert("Error type: "+arguments[0]+"\nDescription: "+arguments[1]);return null;};window.dhtmlxError=new _dhtmlxError();dtmlXMLLoaderObject.prototype.doXPathOpera=function(d,a){var f=d.replace(/[\/]+/gi,"/").split("/");var e=null;var b=1;if(!f.length){return[];}if(f[0]=="."){e=[a];}else{if(f[0]==""){e=this.xmlDoc.responseXML.getElementsByTagName(f[b].replace(/\[[^\]]*\]/g,""));b++;}else{return[];}}for(b;b<f.length;b++){e=this._getAllNamedChilds(e,f[b]);}if(f[b-1].indexOf("[")!=-1){e=this._filterXPath(e,f[b-1]);}return e;};dtmlXMLLoaderObject.prototype._filterXPath=function(e,d){var g=new Array();var d=d.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,"");for(var f=0;f<e.length;f++){if(e[f].getAttribute(d)){g[g.length]=e[f];}}return g;};dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(e,d){var h=new Array();if(_isKHTML){d=d.toUpperCase();}for(var g=0;g<e.length;g++){for(var f=0;f<e[g].childNodes.length;f++){if(_isKHTML){if(e[g].childNodes[f].tagName&&e[g].childNodes[f].tagName.toUpperCase()==d){h[h.length]=e[g].childNodes[f];}}else{if(e[g].childNodes[f].tagName==d){h[h.length]=e[g].childNodes[f];}}}}return h;};function dhtmlXHeir(e,d){for(c in d){if(typeof(d[c])=="function"){e[c]=d[c];}}return e;}function dhtmlxEvent(b,d,a){if(b.addEventListener){b.addEventListener(d,a,false);}else{if(b.attachEvent){b.attachEvent("on"+d,a);}}}
