var a;dhtmlxAjax={get:function(c,b){var d=new dtmlXMLLoaderObject(true);d.async=arguments.length<3;d.waitCall=b;d.loadXML(c);return d},post:function(c,b,d){var f=new dtmlXMLLoaderObject(true);f.async=arguments.length<4;f.waitCall=d;f.loadXML(c,true,b);return f},getSync:function(c){return this.get(c,null,true)},postSync:function(c,b){return this.post(c,b,null,true)}};
function dtmlXMLLoaderObject(c,b,d,f){this.xmlDoc="";this.async=typeof d!="undefined"?d:true;this.onloadAction=c||null;this.mainObject=b||null;this.waitCall=null;this.rSeed=f||false;return this}a=dtmlXMLLoaderObject.prototype;
a.waitLoadFunction=function(c){var b=true;return this.check=function(){if(c&&c.onloadAction!=null)if(!c.xmlDoc.readyState||c.xmlDoc.readyState==4)if(b){b=false;typeof c.onloadAction=="function"&&c.onloadAction(c.mainObject,null,null,null,c);if(c.waitCall){c.waitCall.call(this,c);c.waitCall=null}}}};
a.getXMLTopNode=function(c,b){if(this.xmlDoc.responseXML){var d=this.xmlDoc.responseXML.getElementsByTagName(c);if(d.length==0&&c.indexOf(":")!=-1)d=this.xmlDoc.responseXML.getElementsByTagName(c.split(":")[1]);d=d[0]}else d=this.xmlDoc.documentElement;if(d){this._retry=false;return d}if(_isIE&&!this._retry){d=this.xmlDoc.responseText;b=this.xmlDoc;this._retry=true;this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=false;this.xmlDoc.loadXML(d);return this.getXMLTopNode(c,b)}dhtmlxError.throwError("LoadXML",
"Incorrect XML",[b||this.xmlDoc,this.mainObject]);return document.createElement("DIV")};a.loadXMLString=function(c){try{this.xmlDoc=(new DOMParser).parseFromString(c,"text/xml")}catch(b){this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=this.async;this.xmlDoc.loadXML(c)}this.onloadAction(this.mainObject,null,null,null,this);if(this.waitCall){this.waitCall();this.waitCall=null}};
a.loadXML=function(c,b,d,f){if(this.rSeed)c+=(c.indexOf("?")!=-1?"&":"?")+"a_dhx_rSeed="+(new Date).valueOf();this.filePath=c;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(c);return}else this.xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");if(this.async)this.xmlDoc.onreadystatechange=
new this.waitLoadFunction(this);this.xmlDoc.open(b?"POST":"GET",c,this.async);if(f){this.xmlDoc.setRequestHeader("User-Agent","dhtmlxRPC v0.1 ("+navigator.userAgent+")");this.xmlDoc.setRequestHeader("Content-type","text/xml")}else b&&this.xmlDoc.setRequestHeader("Content-type","application/x-www-form-urlencoded");this.xmlDoc.setRequestHeader("X-Requested-With","XMLHttpRequest");this.xmlDoc.send(d);this.async||(new this.waitLoadFunction(this))()};
a.destructor=function(){return this.xmlDoc=this.mainObject=this.onloadAction=null};a.xmlNodeToJSON=function(c){for(var b={},d=0;d<c.attributes.length;d++)b[c.attributes[d].name]=c.attributes[d].value;b._tagvalue=c.firstChild?c.firstChild.nodeValue:"";for(d=0;d<c.childNodes.length;d++){var f=c.childNodes[d].tagName;if(f){b[f]||(b[f]=[]);b[f].push(this.xmlNodeToJSON(c.childNodes[d]))}}return b};function callerFunction(c,b){return this.handler=function(d){if(!d)d=window.event;c(d,b);return true}}
function getAbsoluteLeft(c){var b=c.offsetLeft;for(c=c.offsetParent;c!=null;){b+=c.offsetLeft;c=c.offsetParent}return b}function getAbsoluteTop(c){var b=c.offsetTop;for(c=c.offsetParent;c!=null;){b+=c.offsetTop;c=c.offsetParent}return b}function convertStringToBoolean(c){if(typeof c=="string")c=c.toLowerCase();switch(c){case "1":case "true":case "yes":case "y":case 1:case true:return true;default:return false}}function getUrlSymbol(c){return c.indexOf("?")!=-1?"&":"?"}
function dhtmlDragAndDropObject(){if(window.dhtmlDragAndDrop)return window.dhtmlDragAndDrop;this.dragStartObject=this.dragStartNode=this.dragNode=this.lastLanding=0;this.tempDOMM=this.tempDOMU=null;this.waitDrag=0;window.dhtmlDragAndDrop=this;return this}a=dhtmlDragAndDropObject.prototype;a.removeDraggableItem=function(c){c.onmousedown=null;c.dragStarter=null;c.dragLanding=null};a.addDraggableItem=function(c,b){c.onmousedown=this.preCreateDragCopy;c.dragStarter=b;this.addDragLanding(c,b)};
a.addDragLanding=function(c,b){c.dragLanding=b};
a.preCreateDragCopy=function(c){if(!(c&&(c||event).button==2)){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(c&&c.preventDefault){c.preventDefault();return false}return false}};
a.callDrag=function(c){if(!c)c=window.event;dragger=window.dhtmlDragAndDrop;if(c.button==0&&_isIE)return dragger.stopDrag();if(!dragger.dragNode&&dragger.waitDrag){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 b=dragger.gldragNode;if(dragger.gldragNode.old)b=dragger.gldragNode.old;b.parentNode.removeChild(b);b=dragger.dragNode.pWindow;if(_isIE){var d=document.createElement("Div");d.innerHTML=dragger.dragNode.outerHTML;dragger.dragNode=d.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";dragger.checkLanding(c.srcElement?c.srcElement:c.target,c)};
a.calculateFramePosition=function(c){if(window.name){for(var b=parent.frames[window.name].frameElement.offsetParent,d=0,f=0;b;){d+=b.offsetLeft;f+=b.offsetTop;b=b.offsetParent}if(parent.dhtmlDragAndDrop){b=parent.dhtmlDragAndDrop.calculateFramePosition(1);d+=b.split("_")[0]*1;f+=b.split("_")[1]*1}if(c)return d+"_"+f;else this.fx=d;this.fy=f}return"0_0"};
a.checkLanding=function(c,b){if(c&&c.dragLanding){this.lastLanding&&this.lastLanding.dragLanding._dragOut(this.lastLanding);this.lastLanding=c;this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding,this.dragStartNode,b.clientX,b.clientY,b);this.lastLanding_scr=_isIE?b.srcElement:b.target}else if(c&&c.tagName!="BODY")this.checkLanding(c.parentNode,b);else{this.lastLanding&&this.lastLanding.dragLanding._dragOut(this.lastLanding,b.clientX,b.clientY,b);this.lastLanding=0;this._onNotFound&&
this._onNotFound()}};
a.stopDrag=function(c,b){dragger=window.dhtmlDragAndDrop;if(!b){dragger.stopFrameRoute();b=dragger.lastLanding;dragger.lastLanding=null;if(b)b.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,b,_isIE?event.srcElement:c.target)}dragger.lastLanding=null;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};a.stopFrameRoute=function(c){c&&window.dhtmlDragAndDrop.stopDrag(1,1);for(var b=0;b<window.frames.length;b++)window.frames[b]!=c&&window.frames[b].dhtmlDragAndDrop&&window.frames[b].dhtmlDragAndDrop.stopFrameRoute(window);parent.dhtmlDragAndDrop&&parent!=window&&parent!=c&&parent.dhtmlDragAndDrop.stopFrameRoute(window)};
a.initFrameRoute=function(c,b){if(c){window.dhtmlDragAndDrop.preCreateDragCopy();window.dhtmlDragAndDrop.dragStartNode=c.dhtmlDragAndDrop.dragStartNode;window.dhtmlDragAndDrop.dragStartObject=c.dhtmlDragAndDrop.dragStartObject;window.dhtmlDragAndDrop.dragNode=c.dhtmlDragAndDrop.dragNode;window.dhtmlDragAndDrop.gldragNode=c.dhtmlDragAndDrop.dragNode;window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag;window.waitDrag=0;if(!_isIE&&b&&(!_isFF||_FFrv<1.8))window.dhtmlDragAndDrop.calculateFramePosition()}parent.dhtmlDragAndDrop&&
parent!=window&&parent!=c&&parent.dhtmlDragAndDrop.initFrameRoute(window);for(var d=0;d<window.frames.length;d++)if(window.frames[d]!=c&&window.frames[d].dhtmlDragAndDrop)window.frames[d].dhtmlDragAndDrop.initFrameRoute(window,!c||b?1:0)};var _isFF=false,_isIE=false,_isOpera=false,_isKHTML=false,_isMacOS=false;if(navigator.userAgent.indexOf("Macintosh")!=-1)_isMacOS=true;
if(navigator.userAgent.indexOf("Safari")!=-1||navigator.userAgent.indexOf("Konqueror")!=-1){var _KHTMLrv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Safari")+7,5));if(_KHTMLrv>525){_isFF=true;var _FFrv=1.9}else _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;_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,b,d,f){if(_isKHTML)return this.doXPathOpera(c,b);if(_isIE){b||(b=this.xmlDoc.nodeName?this.xmlDoc:this.xmlDoc.responseXML);b||dhtmlxError.throwError("LoadXML","Incorrect XML",[b||this.xmlDoc,this.mainObject]);d!=null&&b.setProperty("SelectionNamespaces","xmlns:xsl='"+d+"'");return f=="single"?b.selectSingleNode(c):b.selectNodes(c)||new Array(0)}else{var h=b;b||(b=this.xmlDoc.nodeName?this.xmlDoc:this.xmlDoc.responseXML);b||dhtmlxError.throwError("LoadXML",
"Incorrect XML",[b||this.xmlDoc,this.mainObject]);if(b.nodeName.indexOf("document")!=-1)h=b;else{h=b;b=b.ownerDocument}var i=XPathResult.ANY_TYPE;if(f=="single")i=XPathResult.FIRST_ORDERED_NODE_TYPE;f=[];c=b.evaluate(c,h,function(){return d},i,null);if(i==XPathResult.FIRST_ORDERED_NODE_TYPE)return c.singleNodeValue;for(i=c.iterateNext();i;){f[f.length]=i;i=c.iterateNext()}return f}};function _dhtmlxError(){if(!this.catches)this.catches=[];return this}
_dhtmlxError.prototype.catchError=function(c,b){this.catches[c]=b};_dhtmlxError.prototype.throwError=function(c,b,d){if(this.catches[c])return this.catches[c](c,b,d);if(this.catches.ALL)return this.catches.ALL(c,b,d);alert("Error type: "+c+"\nDescription: "+b);return null};window.dhtmlxError=new _dhtmlxError;
dtmlXMLLoaderObject.prototype.doXPathOpera=function(c,b){c=c.replace(/[\/]+/gi,"/").split("/");var d=null,f=1;if(!c.length)return[];if(c[0]==".")d=[b];else if(c[0]==""){d=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(c[f].replace(/\[[^\]]*\]/g,""));f++}else return[];for(;f<c.length;f++)d=this._getAllNamedChilds(d,c[f]);if(c[f-1].indexOf("[")!=-1)d=this._filterXPath(d,c[f-1]);return d};
dtmlXMLLoaderObject.prototype._filterXPath=function(c,b){var d=[];b=b.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,"");for(var f=0;f<c.length;f++)if(c[f].getAttribute(b))d[d.length]=c[f];return d};
dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(c,b){var d=[];if(_isKHTML)b=b.toUpperCase();for(var f=0;f<c.length;f++)for(var h=0;h<c[f].childNodes.length;h++)if(_isKHTML){if(c[f].childNodes[h].tagName&&c[f].childNodes[h].tagName.toUpperCase()==b)d[d.length]=c[f].childNodes[h]}else if(c[f].childNodes[h].tagName==b)d[d.length]=c[f].childNodes[h];return d};function dhtmlXHeir(c,b){for(var d in b)if(typeof b[d]=="function")c[d]=b[d];return c}
function dhtmlxEvent(c,b,d){if(c.addEventListener)c.addEventListener(b,d,false);else c.attachEvent&&c.attachEvent("on"+b,d)}a=dtmlXMLLoaderObject.prototype;a.xslDoc=null;a.setXSLParamValue=function(c,b,d){if(!d)d=this.xslDoc;if(d.responseXML)d=d.responseXML;c=this.doXPath("/xsl:stylesheet/xsl:variable[@name='"+c+"']",d,"http://www.w3.org/1999/XSL/Transform","single");if(c!=null)c.firstChild.nodeValue=b};
a.doXSLTransToObject=function(c,b){if(!c)c=this.xslDoc;if(c.responseXML)c=c.responseXML;if(!b)b=this.xmlDoc;if(b.responseXML)b=b.responseXML;if(isIE()){d=new ActiveXObject("Msxml2.DOMDocument.3.0");b.transformNodeToObject(c,d)}else{if(!this.XSLProcessor){this.XSLProcessor=new XSLTProcessor;this.XSLProcessor.importStylesheet(c)}var d=this.XSLProcessor.transformToDocument(b)}return d};a.doXSLTransToString=function(c,b){return this.doSerialization(this.doXSLTransToObject(c,b))};
a.doSerialization=function(c){if(!c)c=this.xmlDoc;if(c.responseXML)c=c.responseXML;return isIE()?c.xml:(new XMLSerializer).serializeToString(c)};function dhtmlXWindowsSngl(){}function dhtmlXWindowsBtn(){}
function dhtmlXWindows(){var c=this;this.pathPrefix="dhxwins_";this.imagePath="codebase/imgs/";this.setImagePath=function(b){this.imagePath=b};this.skin="dhx_blue";this.skinParams={standard:{header_height:32,border_left_width:6,border_right_width:7,border_bottom_height:6},aqua_dark:{header_height:31,border_left_width:3,border_right_width:3,border_bottom_height:3},aqua_orange:{header_height:31,border_left_width:3,border_right_width:3,border_bottom_height:3},aqua_sky:{header_height:31,border_left_width:3,
border_right_width:3,border_bottom_height:3},clear_blue:{header_height:32,border_left_width:6,border_right_width:6,border_bottom_height:6},clear_green:{header_height:32,border_left_width:6,border_right_width:6,border_bottom_height:6},clear_silver:{header_height:32,border_left_width:6,border_right_width:6,border_bottom_height:6},glassy_blue:{header_height:26,border_left_width:4,border_right_width:4,border_bottom_height:4},glassy_blue_light:{header_height:26,border_left_width:3,border_right_width:3,
border_bottom_height:3},glassy_caramel:{header_height:26,border_left_width:4,border_right_width:4,border_bottom_height:4},glassy_greenapple:{header_height:26,border_left_width:4,border_right_width:4,border_bottom_height:4},glassy_rainy:{header_height:26,border_left_width:4,border_right_width:4,border_bottom_height:4},glassy_raspberries:{header_height:26,border_left_width:4,border_right_width:4,border_bottom_height:4},glassy_yellow:{header_height:26,border_left_width:4,border_right_width:4,border_bottom_height:4},
modern_black:{header_height:39,border_left_width:2,border_right_width:2,border_bottom_height:2},modern_blue:{header_height:39,border_left_width:2,border_right_width:2,border_bottom_height:2},modern_red:{header_height:39,border_left_width:2,border_right_width:2,border_bottom_height:2},web:{header_height:21,border_left_width:2,border_right_width:2,border_bottom_height:2},vista_blue:{header_height:28,border_left_width:8,border_right_width:8,border_bottom_height:8},dhx_black:{header_height:21,border_left_width:2,
border_right_width:2,border_bottom_height:2},dhx_blue:{header_height:21,border_left_width:2,border_right_width:2,border_bottom_height:2}};this.setSkin=function(b){this.skin=b;this._redrawSkin()};this._redrawSkin=function(){for(var b in this.wins){var d=this.wins[b],f=d._skinParams!=null?d._skinParams:this.skinParams[this.skin];d.childNodes[0].className="dhtmlx_wins_"+this.skin;d.childNodes[1].className="dhtmlx_wins_icon_"+this.skin;this._restoreWindowIcons(d);d.childNodes[2].className="dhtmlx_wins_title_"+
this.skin;d.childNodes[3].className="dhtmlx_wins_buttons_"+this.skin;this._redrawWindow(d)}};this.isWindow=function(b){return this.wins[b]!=null};this.findByText=function(b){var d=[];for(var f in this.wins)if(this.wins[f].getText().search(b,"gi")>=0)d[d.lentgh]=this.wins[f];return d};this.window=function(b){var d=null;if(this.wins[b]!=null)d=this.wins[b];return d};this.forEachWindow=function(b){for(var d in this.wins)b(this.wins[d])};this.getBottommostWindow=function(){var b=this.getTopmostWindow();
for(var d in this.wins)if(this.wins[d].zi<b.zi)b=this.wins[d];return b.zi!=0?b:null};this.getTopmostWindow=function(b){var d={zi:0};for(var f in this.wins)if(this.wins[f].zi>d.zi){if(b==true&&!this._isWindowHidden(this.wins[f]))d=this.wins[f];if(b!=true)d=this.wins[f]}return d.zi!=0?d:null};this.wins={};this.autoViewport=true;this._createViewport=function(){this.vp=document.body;this.modalCoverI=document.createElement("IFRAME");this.modalCoverI.frameBorder="0";this.modalCoverI.className="dhx_modal_cover_ifr";
this.modalCoverI.style.display="none";this.modalCoverI.style.zIndex=0;this.vp.appendChild(this.modalCoverI);this.modalCoverD=document.createElement("DIV");this.modalCoverD.className="dhx_modal_cover_dv";this.modalCoverD.style.display="none";this.modalCoverD.style.zIndex=0;this.vp.appendChild(this.modalCoverD);this._vpcover=document.createElement("DIV");this._vpcover.className="dhx_content_vp_cover";this._vpcover.style.display="none";this.vp.appendChild(this._vpcover);this._carcass=document.createElement("DIV");
this._carcass.className="dhx_carcass_resmove";this._carcass.style.display="none";if(_isIE)this._carcass.innerHTML="<iframe border=0 frameborder=0 style='filter: alpha(opacity=0);width: 100%;height:100%;position: absolute;top: 0px;left: 0px;width: 100%;height: 100%;'></iframe><div style='position: absolute;top: 0px;left: 0px;width: 100%;height: 100%;'></div>";this._carcass.onselectstart=function(b){b=b||event;b.returnValue=false};this.vp.appendChild(this._carcass)};this._autoResizeViewport=function(){for(var b in this.wins){if(this.wins[b]._isFullScreened){this.wins[b]._content.style.width=
document.body.offsetWidth-(_isIE?4:0)+"px";this.wins[b]._content.style.height=document.body.offsetHeight==0?window.innerHeight?window.innerHeight+"px":document.body.scrollHeight+"px":document.body.offsetHeight-(_isIE?4:0)+"px";this.wins[b].layout!=null&&_isOpera&&this.wins[b].layout._fixCellsContentOpera950();this._fixInnerObjs(this.wins[b])}if(this.wins[b]._isMaximized&&this.wins[b].style.display!="none"){this._restoreWindow(this.wins[b]);this._maximizeWindow(this.wins[b])}}if(this.vp!=document.body)if(this.autoViewport!=
false){this.vp.style.width=(_isIE?document.body.offsetWidth-4:window.innerWidth)+"px";this.vp.style.height=(_isIE?document.body.offsetHeight-4:window.innerHeight)+"px";for(b in this.wins){var d=this.wins[b],f=false,h=false;if(d.x>this.vp.offsetWidth-10){d.x=this.vp.offsetWidth-10;f=true}var i=d._skinParams!=null?d._skinParams:this.skinParams[this.skin];if(d.y+i.header_height>this.vp.offsetHeight){d.y=this.vp.offsetHeight-i.header_height;h=true}if(f||h)this._redrawWindow(d)}}};this.enableAutoViewport=
function(b){if(this.vp==document.body){this.autoViewport=b;if(b==false){this.vp=document.createElement("DIV");this.vp.className="dhtmlx_winviewport";this.vp.style.left="0px";this.vp.style.top="0px";document.body.appendChild(this.vp);this.vp.ax=0;this.vp.ay=0;this._autoResizeViewport();this.vp.appendChild(this.modalCoverI);this.vp.appendChild(this.modalCoverD);this.vp.appendChild(this._carcass)}}};this.attachViewportTo=function(b){if(this.autoViewport==false){this.vp!=document.body&&this.vp.parentNode.removeChild(this.vp);
this.vp=document.getElementById(b);this.vp.style.position="relative";this.vp.style.overflow="hidden";this.vp.ax=0;this.vp.ay=0;this.vp.appendChild(this.modalCoverI);this.vp.appendChild(this.modalCoverD);this.vp.appendChild(this._carcass)}};this.setViewport=function(b,d,f,h,i){if(this.autoViewport==false){this.vp.style.left=b+"px";this.vp.style.top=d+"px";this.vp.style.width=f+"px";this.vp.style.height=h+"px";i!=null&&i.appendChild(this.vp);this.vp.ax=getAbsoluteLeft(this.vp);this.vp.ay=getAbsoluteTop(this.vp)}};
this._effects={move:false,resize:false};this.setEffect=function(b,d){if(this._effects[b]!=null&&typeof d=="boolean")this._effects[b]=d};this.getEffect=function(b){return this._effects[b]};this.createWindow=function(b,d,f,h,i){var e=document.createElement("DIV");e.className="dhtmlx_window_inactive";for(var l in this.wins){this.wins[l].zi+=this.zIndexStep;this.wins[l].style.zIndex=this.wins[l].zi}e.zi=this.zIndexStep;e.style.zIndex=e.zi;e.active=false;e._isWindow=true;e.isWindow=true;e.w=h;e.h=i;e.x=
d;e.y=f;this._fixWindowPositionInViewport(e);e.style.width=e.w+"px";e.style.height=e.h+"px";e.style.left=e.x+"px";e.style.top=e.y+"px";e._isModal=false;e._allowResize=true;e.maxW="auto";e.maxH="auto";e.minW=200;e.minH=140;e.iconsPresent=true;e.icons=new Array(this.imagePath+this.pathPrefix+this.skin+"/active/icon_normal.gif",this.imagePath+this.pathPrefix+this.skin+"/inactive/icon_normal.gif");e._allowMove=true;e._allowMoveGlobal=true;e._allowResizeGlobal=true;e._keepInViewport=false;d=this.skinParams[this.skin];
e.idd=b;e._midd="dhxWMNObj_"+this._genStr(12);e._tidd="dhxWTBObj_"+this._genStr(12);e._sidd="dhxSTBObj_"+this._genStr(12);e.innerHTML="<table border='0' cellspacing='0' cellpadding='0' width='100%' height='"+e.h+"' class='dhtmlx_wins_"+this.skin+"'><tr><td class='dhtmlx_wins_td_header_full' clearonselect='yes'><table border='0' cellspacing='0' cellpadding='0' width='100%' class='dhtmlx_wins_header' clearonselect='yes'><tr><td class='dhtmlx_wins_td_header_left' clearonselect='yes'>&nbsp;</td><td class='dhtmlx_wins_td_header_middle' clearonselect='yes'>&nbsp;</td><td class='dhtmlx_wins_td_header_right' clearonselect='yes'>&nbsp;</td></tr></table>"+
(_isIE?"<iframe frameborder='0' class='dhx_ie6_wincover_forsel' onload='this.contentWindow.document.body.style.overflow=\"hidden\";'></iframe>":"")+"</td></tr><tr><td class='dhtmlx_wins_td_body_full' height='"+(e.h-d.header_height)+"'><table border='0' cellspacing='0' cellpadding='0' width='100%' height='"+(e.h-d.header_height)+"' class='dhtmlx_wins_body'><tr><td class='dhtmlx_wins_body_border_middle_left' clearonselect='yes'>&nbsp;</td><td class='dhtmlx_wins_body_content' align='left' valign='top'><div class='dhtmlx_wins_body_content' style='width: "+
(e.w-d.border_left_width-d.border_right_width)+"px;height:"+(e.h-d.header_height-d.border_bottom_height)+"px;'><div id='"+e._midd+"' class='dhtmlxMenuInWin' style='height: 0px;display: none;position: relative;'></div><div id='"+e._tidd+"' class='dhtmlxToolbarInWin' style='height: 0px;display: none;position: relative;'></div><div class='dhtmlxWindowMainContent' style='position: absolute;overflow: hidden;width=100%;top: 0px;bottom: 0px;height=100%;left: 0px;right: 0px;'></div><div id='"+e._sidd+"' style='height: 0px;display: none;'></div><div class='dhx_content_cover_blocker' style='display: none;'></div></div></td><td class='dhtmlx_wins_body_border_middle_right' clearonselect='yes'>&nbsp;</td></tr><tr clearonselect='yes'><td class='dhtmlx_wins_body_border_bottom_left' clearonselect='yes'>&nbsp;</td><td class='dhtmlx_wins_body_border_bottom_middle' clearonselect='yes'>&nbsp;</td><td class='dhtmlx_wins_body_border_bottom_right' clearonselect='yes'>&nbsp;</td></tr></table>"+
(_isIE?"<iframe frameborder='0' style='top:"+d.header_height+"px;' class='dhx_ie6_wincover_forsel' onload='this.contentWindow.document.body.style.overflow=\"hidden\";'></iframe>":"")+"</td></tr></table><img clearonselect='yes' class='dhtmlx_wins_icon_"+this.skin+"' src='"+e.icons[0]+"'><div clearonselect='yes' class='dhtmlx_wins_title_"+this.skin+"'>dhtmlxWindow</div><div class='dhtmlx_wins_buttons_"+this.skin+"'><table border='0' cellspacing='0' cellpadding='0'><tr></tr></table></div><div clearonselect='yes' class='dhtmlx_wins_progress_"+
this.skin+"'></div>";this.vp.appendChild(e);e._content=e.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0];this._diableOnSelectInWin(e,true);this.wins[b]=e;e.dhx_Event=this.dhx_Event;e.dhx_Event();this._makeActive(e,true);d=e.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0];d.onmousedown=function(g){if(e._allowMove&&e._allowMoveGlobal){g=g||event;e.oldMoveX=e.x;e.oldMoveY=e.y;e.moveOffsetX=e.x-g.clientX;
e.moveOffsetY=e.y-g.clientY;c.movingWin=e;if(c._effects.move==false){c._carcass.x=c.movingWin.x;c._carcass.y=c.movingWin.y;c._carcass.w=parseInt(c.movingWin.style.width)+(_isIE?0:-2);c._carcass.h=parseInt(c.movingWin.style.height)+(_isIE?0:-2);c._carcass.style.left=c._carcass.x+"px";c._carcass.style.top=c._carcass.y+"px";c._carcass.style.width=c._carcass.w+"px";c._carcass.style.height=c._carcass.h+"px";c._carcass.style.zIndex=c.movingWin.style.zIndex+c._getTopZIndex()+10;c._carcass.style.cursor="move";
c._carcass._keepInViewport=e._keepInViewport}c._blockSwitcher("none");c.movingWin.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[1].style.cursor="move";c.movingWin.childNodes[2].style.cursor="move";c._vpcover.style.zIndex=c.movingWin.style.zIndex-1;c._vpcover.style.display="";if(_isOpera){g.returnValue=false;g.cancelBubble=true}}};d.ondblclick=function(){if(e._allowResizeGlobal&&!e._isParked)e._isMaximized==true?c._restoreWindow(e):c._maximizeWindow(e)};
f=e.childNodes[2];f.onmousedown=d.onmousedown;f.ondblclick=d.ondblclick;e.setText=function(g){this.childNodes[2].innerHTML=g;c.callEvent("onTextChange",[this._dockCell,g])};e.getText=function(){return this.childNodes[2].innerHTML};e.getId=function(){return this.idd};e.show=function(){c._showWindow(this)};e.hide=function(){c._hideWindow(this)};e.minimize=function(){c._restoreWindow(this)};e.maximize=function(){c._maximizeWindow(this)};e.close=function(){c._closeWindow(this)};e.park=function(){this._isParkedAllowed&&
c._parkWindow(this)};e.stick=function(){c._stickWindow(this)};e.unstick=function(){c._unstickWindow(this)};e.isSticked=function(){return this._isSticked};e.setIcon=function(g,j){c._setWindowIcon(e,g,j)};e.getIcon=function(){return c._getWindowIcon(this)};e.clearIcon=function(){c._clearWindowIcons(this)};e.restoreIcon=function(){c._restoreWindowIcons(this)};e.keepInViewport=function(g){this._keepInViewport=g};e.setModal=function(g){if(g==true)c.modalWin!=null||c.modalWin==this||c._setWindowModal(this,
true);else c.modalWin==this&&c._setWindowModal(this,false)};e.isModal=function(){return this._isModal};e.isHidden=function(){return c._isWindowHidden(this)};e.isMaximized=function(){return this._isMaximized};e.isParked=function(){return this._isParked};e.allowPark=function(){c._allowParking(this)};e.denyPark=function(){c._denyParking(this)};e.isParkable=function(){return this._isParkedAllowed};e.allowResize=function(){c._allowReszieGlob(this)};e.denyResize=function(){c._denyResize(this)};e.isResizable=
function(){return this._allowResizeGlobal};e.allowMove=function(){if(!this._isMaximized)this._allowMove=true;this._allowMoveGlobal=true};e.denyMove=function(){this._allowMoveGlobal=false};e.isMovable=function(){return this._allowMoveGlobal};e.bringToTop=function(){c._bringOnTop(this);c._makeActive(this)};e.bringToBottom=function(){c._bringOnBottom(this)};e.isOnTop=function(){return c._isWindowOnTop(this)};e.isOnBottom=function(){return c._isWindowOnBottom(this)};e.setPosition=function(g,j){this.x=
g;this.y=j;c._fixWindowPositionInViewport(this);if(_isFF){this.h++;c._redrawWindow(this);this.h--}c._redrawWindow(this)};e.getPosition=function(){return new Array(this.x,this.y)};e.setDimension=function(g,j){if(g!=null)this.w=g;if(j!=null)this.h=j;c._fixWindowDimensionInViewport(this);c._fixWindowPositionInViewport(this);c._redrawWindow(this)};e.getDimension=function(){return new Array(this.w,this.h)};e.setMaxDimension=function(g,j){this.minH=this.minW="auto";c._redrawWindow(this)};e.getMaxDimension=
function(){return new Array(this.maxW,this.maxH)};e.setMinDimension=function(g,j){if(g!=null)this.minW=g;if(j!=null)this.minH=j;c._fixWindowDimensionInViewport(this);c._redrawWindow(this)};e.getMinDimension=function(){return new Array(this.minW,this.minH)};e.addUserButton=function(g,j,k,m){return c._addUserButton(this,g,j,k,m)};e.removeUserButton=function(g){if(!(g=="minmax1"||g=="minmax2"||g=="park"||g=="close"||g=="stick"||g=="unstick"||g=="help")){var j=this.button(g);j!=null&&c._removeUserButton(this,
g,j)}};e.progressOn=function(){c._switchProgress(this,true)};e.progressOff=function(){c._switchProgress(this,false)};e.attachStatusBar=function(){return c._attachStatusBar(this)};e.attachMenu=function(){return c._attachWebMenu(this)};e.attachToolbar=function(){return c._attachWebToolbar(this)};e.attachGrid=function(){var g=document.createElement("DIV");g.id="dhxGridObj_"+c._genStr(12);g.style.width="100%";g.style.height="100%";document.body.appendChild(g);this.attachObject(g.id);this.grid=new dhtmlXGridObject(g.id);
this.grid.setSkin(c.skin);this.grid.entBox.style.border="0px solid white";this.grid._sizeFix=0;return this.grid};e.attachTree=function(g){var j=document.createElement("DIV");j.id="dhxTreeObj_"+c._genStr(12);j.style.width="100%";j.style.height="100%";document.body.appendChild(j);this.attachObject(j.id);this.tree=new dhtmlXTreeObject(j.id,"100%","100%",g||0);this.tree.setSkin(c.skin);this.tree.allTree.childNodes[0].style.marginTop="2px";this.tree.allTree.childNodes[0].style.marginBottom="2px";return this.tree};
e.attachTabbar=function(){var g=document.createElement("DIV");g.id="dhxTabbarObj_"+c._genStr(12);g.style.width="100%";g.style.height="100%";g.style.overflow="hidden";document.body.appendChild(g);this.attachObject(g.id);if(this._dockCell!=null&&c.dhxLayout!=null){var j=c.dhxLayout.polyObj[this._dockCell];if(j!=null){j.childNodes[0]._tabbarMode=true;c.dhxLayout.hidePanel(this._dockCell);j.className="dhtmlxLayoutSinglePolyTabbar"}}this.tabbar=new dhtmlXTabBar(g.id,"top",26);this.tabbar._linePos=-4;if(_isIE&&
document.compatMode=="BackCompat"){this.tabbar._lineAHeight=this.tabbar._lineA.style.height="6px";this.tabbar._bFix=5}else{this.tabbar._lineAHeight=this.tabbar._lineA.style.height="4px";this.tabbar._bFix=4}this.tabbar.setSkin(c.skin);this.tabbar._conZone.style.borderWidth="0px";this.tabbar._EARS=true;this.tabbar.setMargin(-1);this.tabbar.setOffset(0);this.tabbar.adjustOuterSize();this.tabbar.cells=function(k,m){return this._cells.call(this,c,k,m)};return this.tabbar};e.attachFolders=function(){var g=
document.createElement("DIV");g.id="dhxFoldersObj_"+c._genStr(12);g.style.width="100%";g.style.height="100%";g.style.overflow="hidden";document.body.appendChild(g);this.attachObject(g.id);this.folders=new dhtmlxFolders(g.id);this.folders.setSizes();return this.folders};e.attachAccordion=function(){var g=document.createElement("DIV");g.id="dhxAccordionObj_"+c._genStr(12);g.style.width="100%";g.style.height="100%";g.style.position="relative";document.body.appendChild(g);this.attachObject(g.id);this.accordion=
new dhtmlXAccordion(g.id,c.skin);e._content.childNodes[2].className+=" dhtmlxAccordionAttached";this.accordion.setSizes();return this.accordion};e.attachLayout=function(g,j){var k=document.createElement("DIV");k.id="dhxLayoutObj_"+c._genStr(12);k.style.position="relative";document.body.appendChild(k);this.attachObject(k.id);var m=this._content.childNodes[2].offsetWidth,n=this._content.childNodes[2].offsetHeight;if(m==0)m=parseInt(this._content.style.width);k.style.left="0px";k.style.top="0px";k.style.width=
m+"px";k.style.height=n+"px";k._skipChecksOnStartUp=true;if(j==null)j=c.skin;this.layout=new dhtmlXLayoutObject(k,g,j);this.layout._parentWindow=this;this.attachEvent("_onBeforeTryResize",this.layout._defineWindowMinDimension);return this.layout};e.attachEditor=function(g){var j=document.createElement("DIV");j.id="dhxEditorObj_"+c._genStr(12);j.style.position="relative";j.style.display="none";j.style.overflow="hidden";j.style.width="100%";j.style.height="100%";document.body.appendChild(j);this.attachObject(j.id);
return this.editor=new dhtmlXEditor(j.id,g!=null?g:c.skin)};e.setToFullScreen=function(g){c._setWindowToFullScreen(this,g)};e.showHeader=function(){c._showWindowHeader(this)};e.hideHeader=function(){c._hideWindowHeader(this)};e.progressOff();e.canStartResize=false;e.onmousemove=function(g){if(!this._allowResize||this._allowResizeGlobal==false){this.canStartResize=false;this.style.cursor=""}else if(c.resizingWin==null)if(!this._isParked){g=g||event;var j=g.target||g.srcElement,k=true;this.canStartResize=
true;var m=this._skinParams!=null?this._skinParams:c.skinParams[c.skin],n=m.header_height;n=m.border_left_width+2;n=m.border_right_width+2;m=m.border_bottom_height+2;if(j.className=="dhtmlx_wins_body_border_middle_left"){c.resizingDirs="border_left";this.style.cursor="w-resize";this.resizeOffsetX=this.x-g.clientX;k=false}if(j.className=="dhtmlx_wins_body_border_middle_right"){c.resizingDirs="border_right";this.style.cursor="e-resize";this.resizeOffsetXW=this.x+this.w-g.clientX;k=false}if(j.className==
"dhtmlx_wins_body_border_bottom_middle"){c.resizingDirs="border_bottom";this.style.cursor="n-resize";this.resizeOffsetYH=this.y+this.h-g.clientY;k=false}if(j.className=="dhtmlx_wins_body_border_bottom_left"){c.resizingDirs="corner_left";this.style.cursor="sw-resize";this.resizeOffsetX=this.x-g.clientX;this.resizeOffsetYH=this.y+this.h-g.clientY;k=false}if(j.className=="dhtmlx_wins_body_border_bottom_right"){c.resizingDirs="corner_right";this.style.cursor="nw-resize";this.resizeOffsetXW=this.x+this.w-
g.clientX;this.resizeOffsetYH=this.y+this.h-g.clientY;k=false}if(k){this.canStartResize=false;this.style.cursor=""}}};e.onmousedown=function(g){c._makeActive(this);c._bringOnTop(this);if(this.canStartResize){c._blockSwitcher("none");c.resizingWin=this;if(!c._effects.resize){c._carcass.x=c.resizingWin.x;c._carcass.y=c.resizingWin.y;c._carcass.w=c.resizingWin.w+(_isIE?0:-2);c._carcass.h=c.resizingWin.h+(_isIE?0:-2);c._carcass.style.left=c._carcass.x+"px";c._carcass.style.top=c._carcass.y+"px";c._carcass.style.width=
c._carcass.w+"px";c._carcass.style.height=c._carcass.h+"px";c._carcass.style.zIndex=c.resizingWin.style.zIndex+1;c._carcass.style.cursor=this.style.cursor;c._carcass._keepInViewport=this._keepInViewport;c._carcass.style.display=""}c._vpcover.style.zIndex=c.resizingWin.style.zIndex-1;c._vpcover.style.display="";this.layout&&this.callEvent("_onBeforeTryResize",[this]);if(_isOpera){g=g||event;g.returnValue=false;g.cancelBubble=true}}};this._addDefaultButtons(e);e.button=function(g){var j=null;if(this.btns[g]!=
null)j=this.btns[g];return j};e.attachObject=function(g,j){if(typeof g=="string")g=document.getElementById(g);if(j){g.style.visibility="hidden";g.style.display="";var k=g.offsetWidth,m=g.offsetHeight}c._attachContent(this,"obj",g);if(j){g.style.visibility="visible";g=c.skinParams[c.skin];this.setDimension(k+g.border_left_width+g.border_right_width,m+g.header_height+g.border_bottom_height)}};e.appendObject=function(g){if(typeof g=="string")g=document.getElementById(g);c._attachContent(this,"obj",g,
true)};e.attachHTMLString=function(g){c._attachContent(this,"str",g)};e.attachURL=function(g,j){c._attachContent(this,j==true?"urlajax":"url",g,false)};e.center=function(){c._centerWindow(this,false)};e.centerOnScreen=function(){c._centerWindow(this,true)};this._attachContent(e,"empty",null);e.bringToTop();return this.wins[b]};this._diableOnSelectInWin=function(b,d){for(var f=0;f<b.childNodes.length;f++){var h=b.childNodes[f];if(h.tagName=="TD"||h.tagName=="TR"||h.tagName=="TABLE"||h.tagName=="DIV")if(h.getAttribute("clearonselect")!=
null)h.onselectstart=d?function(i){i=i||event;i.returnValue=false}:null;h.childNodes.length>0&&this._diableOnSelectInWin(h,d);h=null}};this._redrawWindow=function(b){if(!b._isFullScreened){b.style.left=b.x+"px";b.style.top=b.y+"px";b.style.width=b.w=="100%"?b.w:b.w+"px";b.style.height=b.h=="100%"?b.h:b.h+"px";if(b.w=="100%"){var d="100%";b.w=b.offsetWidth}if(b.h=="100%"){var f="100%";b.h=b.offsetHeight}b.childNodes[0].style.height=b.h+"px";var h=b.childNodes[0].childNodes[0].childNodes[1].childNodes[0],
i=b._skinParams!=null?b._skinParams:this.skinParams[this.skin];h.style.height=b.h-i.header_height+"px";h.childNodes[0].style.height=b.h-i.header_height+"px";for(var e=b.childNodes[3].childNodes[0].childNodes[0].childNodes[0],l=0,g=0;g<e.childNodes.length;g++)e.childNodes[g].className=="dhtmlx_wins_btn_visible"&&l++;e=b.w-l*18-30;if(e<0)e=0;b.childNodes[2].style.width=e+"px";e=b.w-i.border_left_width-i.border_right_width;i=b.h-i.header_height-i.border_bottom_height;if(e<0)e=0;if(i<0)i=0;h=h.childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0];
if(h==null)h=b._content;h.style.width=e+"px";h.style.height=i+"px";if(d!=null)b.w=d;if(f!=null)b.h=f}};this.zIndexStep=50;this._getTopZIndex=function(b){var d=0;for(var f in this.wins)if(b==true){if(this.wins[f].zi>d)d=this.wins[f].zi}else if(this.wins[f].zi>d&&!this.wins[f]._isSticked)d=this.wins[f].zi;return d};this.movingWin=null;this._moveWindow=function(b){if(this.movingWin!=null){if(!this.movingWin._allowMove||!this.movingWin._allowMoveGlobal)return;if(this._effects.move==true){this.movingWin.oldMoveX=
this.movingWin.x;this.movingWin.oldMoveY=this.movingWin.y;this.movingWin.x=b.clientX+this.movingWin.moveOffsetX;this.movingWin.y=b.clientY+this.movingWin.moveOffsetY;this._fixWindowPositionInViewport(this.movingWin);this._redrawWindow(this.movingWin)}else{if(this._carcass.style.display!="")this._carcass.style.display="";this._carcass.x=b.clientX+this.movingWin.moveOffsetX;this._carcass.y=b.clientY+this.movingWin.moveOffsetY;this._fixWindowPositionInViewport(this._carcass);this._carcass.style.left=
this._carcass.x+"px";this._carcass.style.top=this._carcass.y+"px"}}if(this.resizingWin!=null)if(this.resizingWin._allowResize){if(this.resizingDirs=="border_left"||this.resizingDirs=="corner_left")if(this._effects.resize){var d=b.clientX+this.resizingWin.resizeOffsetX,f=d>this.resizingWin.x?-1:1;newW=this.resizingWin.w+Math.abs(d-this.resizingWin.x)*f;if(newW<this.resizingWin.minW&&f<0){this.resizingWin.x=this.resizingWin.x+this.resizingWin.w-this.resizingWin.minW;this.resizingWin.w=this.resizingWin.minW}else{this.resizingWin.w=
newW;this.resizingWin.x=d}this._redrawWindow(this.resizingWin)}else{d=b.clientX+this.resizingWin.resizeOffsetX;f=d>this._carcass.x?-1:1;newW=this._carcass.w+Math.abs(d-this._carcass.x)*f;if(newW<this.resizingWin.minW&&f<0){this._carcass.x=this._carcass.x+this._carcass.w-this.resizingWin.minW;this._carcass.w=this.resizingWin.minW}else{this._carcass.w=newW;this._carcass.x=d}this._carcass.style.left=this._carcass.x+"px";this._carcass.style.width=this._carcass.w+"px"}if(this.resizingDirs=="border_right"||
this.resizingDirs=="corner_right")if(this._effects.resize){d=b.clientX-(this.resizingWin.x+this.resizingWin.w)+this.resizingWin.resizeOffsetXW;newW=this.resizingWin.w+d;if(newW<this.resizingWin.minW)newW=this.resizingWin.minW;this.resizingWin.w=newW;this._redrawWindow(this.resizingWin)}else{d=b.clientX-(this._carcass.x+this._carcass.w)+this.resizingWin.resizeOffsetXW;newW=this._carcass.w+d;if(newW<this.resizingWin.minW)newW=this.resizingWin.minW;this._carcass.w=newW;this._carcass.style.width=this._carcass.w+
"px"}if(this.resizingDirs=="border_bottom"||this.resizingDirs=="corner_left"||this.resizingDirs=="corner_right")if(this._effects.resize){d=b.clientY-(this.resizingWin.y+this.resizingWin.h)+this.resizingWin.resizeOffsetYH;newH=this.resizingWin.h+d;if(newH<this.resizingWin.minH)newH=this.resizingWin.minH;this.resizingWin.h=newH;this._redrawWindow(this.resizingWin)}else{d=b.clientY-(this._carcass.y+this._carcass.h)+this.resizingWin.resizeOffsetYH;newH=this._carcass.h+d;if(newH<this.resizingWin.minH)newH=
this.resizingWin.minH;this._carcass.h=newH;this._carcass.style.height=this._carcass.h+"px"}}};this._stopMove=function(){if(this.movingWin!=null){if(this._effects.move){var b=this.movingWin;this.movingWin=null;this._blockSwitcher("");b.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[1].style.cursor="";b.childNodes[2].style.cursor="";if(_isFF){b.h++;this._redrawWindow(b);b.h--;this._redrawWindow(b)}}else{this._carcass.style.display="none";
b=this.movingWin;this.movingWin=null;this._blockSwitcher("");b.setPosition(parseInt(this._carcass.style.left),parseInt(this._carcass.style.top))}this._vpcover.style.display="none";b.oldMoveX==b.x&&b.oldMoveY==b.y||(b.checkEvent("onMoveFinish")?b.callEvent("onMoveFinish",[b]):this.callEvent("onMoveFinish",[b]))}if(this.resizingWin!=null){b=this.resizingWin;this.resizingWin=null;this._blockSwitcher("");if(!this._effects.resize){this._carcass.style.display="none";b.setPosition(this._carcass.x,this._carcass.y);
b.setDimension(this._carcass.w+(_isIE?0:2),this._carcass.h+(_isIE?0:2))}this._fixInnerObjs(b);b.layout&&b.layout.callEvent("onResize",[]);if(_isOpera){b._content.childNodes[2].style.border="#FFFFFF 0px solid";var d=b._content.childNodes[2];window.setTimeout(function(){d.style.border="none"},1)}this._vpcover.style.display="none";b.checkEvent("onResizeFinish")?b.callEvent("onResizeFinish",[b]):this.callEvent("onResizeFinish",[b])}};this._fixWindowPositionInViewport=function(b){var d=b._skinParams!=
null?b._skinParams:this.skinParams[this.skin];if(b._keepInViewport){if(b.x<0)b.x=0;if(b.x+b.w>this.vp.offsetWidth)b.x=this.vp.offsetWidth-b.w;if(b.y+b.h>this.vp.offsetHeight)b.y=this.vp.offsetHeight-b.h;if(b.y<0)b.y=0}else{if(b.y+d.header_height>this.vp.offsetHeight)b.y=this.vp.offsetHeight-d.header_height;if(b.y<0)b.y=0;if(b.x+b.w-10<0)b.x=10-b.w;if(b.x>this.vp.offsetWidth-10)b.x=this.vp.offsetWidth-10}};this._fixWindowDimensionInViewport=function(b){if(b.w<b.minW)b.w=b.minW;if(b.h<b.minH)b.h=b.minH};
this._bringOnTop=function(b){var d=b.zi,f=this._getTopZIndex(b._isSticked);for(var h in this.wins)if(this.wins[h]!=b)if(b._isSticked||!b._isSticked&&!this.wins[h]._isSticked)if(this.wins[h].zi>d){this.wins[h].zi-=this.zIndexStep;this.wins[h].style.zIndex=this.wins[h].zi}b.zi=f;b.style.zIndex=b.zi};this._makeActive=function(b,d){for(var f in this.wins)if(this.wins[f]==b){var h=false;if(this.wins[f].className!="dhtmlx_window_active"&&!d)h=true;this.wins[f].className="dhtmlx_window_active";this.wins[f].childNodes[1].src=
this.wins[f].icons[0];if(h==true)b.checkEvent("onFocus")?b.callEvent("onFocus",[b]):this.callEvent("onFocus",[b])}else{this.wins[f].className="dhtmlx_window_inactive";this.wins[f].childNodes[1].src=this.wins[f].icons[1]}};this._getActive=function(){var b=null;for(var d in this.wins)if(this.wins[d].className=="dhtmlx_window_active")b=this.wins[d];return b};this._centerWindow=function(b,d){if(b._isMaximized!=true)if(b._isParked!=true){if(d==true){var f=_isIE?document.body.offsetWidth:window.innerWidth;
d=_isIE?document.body.offsetHeight:window.innerHeight}else{f=this.vp==document.body?document.body.offsetWidth:Number(parseInt(this.vp.style.width))&&String(this.vp.style.width).search("%")==-1?parseInt(this.vp.style.width):this.vp.offsetWidth;d=this.vp==document.body?document.body.offsetHeight:Number(parseInt(this.vp.style.height))&&String(this.vp.style.height).search("%")==-1?parseInt(this.vp.style.height):this.vp.offsetHeight}f=Math.round(f/2-b.w/2);d=Math.round(d/2-b.h/2);b.x=f;b.y=d;this._fixWindowPositionInViewport(b);
this._redrawWindow(b)}};this._switchProgress=function(b,d){if(d==true){b.childNodes[1].style.display="none";b.childNodes[4].style.display=""}else{b.childNodes[4].style.display="none";b.childNodes[1].style.display=""}};this._addDefaultButtons=function(b){var d=document.createElement("DIV");d.className="button_stick_default";d.title="Stick";d.isVisible=false;d._isEnabled=true;d.isPressed=false;b._isSticked=false;d.label="stick";d._doOnClick=function(){this.isPressed=true;c._stickWindow(b)};var f=document.createElement("DIV");
f.className="button_sticked_default";f.title="Unstick";f.isVisible=false;f._isEnabled=true;f.isPressed=false;f.label="sticked";f._doOnClick=function(){this.isPressed=false;c._unstickWindow(b)};var h=document.createElement("DIV");h.className="button_help_default";h.title="Help";h.isVisible=false;h._isEnabled=true;h.isPressed=false;h.label="help";h.that=this;h._doOnClick=function(){c._needHelp(b)};var i=document.createElement("DIV");i.className="button_park_default";i.titleIfParked="Park Down";i.titleIfNotParked=
"Park Up";i.title=i.titleIfNotParked;i.isVisible=true;i._isEnabled=true;i.isPressed=false;i.label="park";b._isParked=false;b._isParkedAllowed=true;i._doOnClick=function(){c._parkWindow(b)};var e=document.createElement("DIV");e.className="button_minmax1_default";e.title="Maximize";e.isVisible=true;e._isEnabled=true;e.isPressed=false;e.label="minmax1";b._isMaximized=false;e._doOnClick=function(){c._maximizeWindow(b)};var l=document.createElement("DIV");l.className="button_minmax2_default";l.title="Restore";
l.isVisible=false;l._isEnabled=true;l.isPressed=false;l.label="minmax2";l._doOnClick=function(){c._restoreWindow(b)};var g=document.createElement("DIV");g.className="button_close_default";g.title="Close";g.isVisible=true;g._isEnabled=true;g.isPressed=false;g.label="close";g._doOnClick=function(){c._closeWindow(b)};b.btns={};b.btns.stick=d;b.btns.sticked=f;b.btns.help=h;b.btns.park=i;b.btns.minmax1=e;b.btns.minmax2=l;b.btns.close=g;d=b.childNodes[3].childNodes[0].childNodes[0].childNodes[0];for(var j in b.btns){f=
b.btns[j];h=document.createElement("TD");h.className="dhtmlx_wins_btn_"+(f.isVisible?"visible":"hidden");d.appendChild(h);h.appendChild(f);this._attachEventsOnButton(b,f);f=null}};this._attachEventsOnButton=function(b,d){d.onmouseover=function(){this.className=this._isEnabled?"button_"+this.label+"_over_"+(this.isPressed?"pressed":"default"):"button_"+this.label+"_disabled"};d.onmouseout=function(){if(this._isEnabled){this.isPressed=false;this.className="button_"+this.label+"_default"}else this.className=
"button_"+this.label+"_disabled"};d.onmousedown=function(){if(this._isEnabled){this.isPressed=true;this.className="button_"+this.label+"_over_pressed"}else this.className="button_"+this.label+"_disabled"};d.onmouseup=function(){if(this._isEnabled){var f=this.isPressed;this.isPressed=false;this.className="button_"+this.label+"_over_default";if(f)this.checkEvent("onClick")?this.callEvent("onClick",[b,this]):this._doOnClick()}else this.className="button_"+this.label+"_disabled"};d.show=function(){c._showButton(b,
this.label)};d.hide=function(){c._hideButton(b,this.label)};d.enable=function(){c._enableButton(b,this.label)};d.disable=function(){c._disableButton(b,this.label)};d.isEnabled=function(){return this._isEnabled};d.isHidden=function(){return!this.isVisible};d.dhx_Event=this.dhx_Event;d.dhx_Event()};this._parkWindow=function(b){if(b._isParkedAllowed)if(!(this.enableParkEffect&&b.parkBusy)){if(b._isParked)if(this.enableParkEffect){b.parkBusy=true;b.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.display=
"";this._doParkDown(b)}else{b.h=b.lastParkH;b.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.display="";b.btns.park.title=b.btns.park.titleIfNotParked;if(b._allowResizeGlobal==true){this._enableButton(b,"minmax1");this._enableButton(b,"minmax2")}}else{b.lastParkH=String(b.h).search(/\%$/)==-1?b.h:b.offsetHeight;if(b._allowResizeGlobal==true){this._disableButton(b,"minmax1");this._disableButton(b,"minmax2")}if(this.enableParkEffect){b.parkBusy=
true;this._doParkUp(b)}else{var d=b._skinParams!=null?b._skinParams:this.skinParams[this.skin];b.h=d.header_height+d.border_bottom_height;b.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.display="none";b.btns.park.title=b.btns.park.titleIfParked}}if(!this.enableParkEffect){b._isParked=!b._isParked;this._redrawWindow(b);if(b._isParked){if(_isOpera){b.childNodes[0].border=1;b.childNodes[0].border=0}b.checkEvent("onParkUp")?b.callEvent("onParkUp",
[b]):this.callEvent("onParkUp",[b])}else{this._fixInnerObjs(b);if(_isOpera){b._content.childNodes[2].style.border="#FFFFFF 0px solid";var f=b._content.childNodes[2];window.setTimeout(function(){f.style.border="none"},1)}b.checkEvent("onParkDown")?b.callEvent("onParkDown",[b]):this.callEvent("onParkDown",[b])}}}};this._allowParking=function(b){b._isParkedAllowed=true;this._enableButton(b,"park")};this._denyParking=function(b){b._isParkedAllowed=false;this._disableButton(b,"park")};this.enableParkEffect=
true;this.parkSpeed=this.parkStartSpeed=80;this.parkTM=null;this.parkTMTime=5;this._doParkUp=function(b){if(String(b.h).search(/\%$/)!=-1)b.h=b.offsetHeight;b.h-=this.parkSpeed;var d=b._skinParams!=null?b._skinParams:this.skinParams[this.skin];if(b.h<=d.header_height+d.border_bottom_height){b.h=d.header_height+d.border_bottom_height;b.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.display="none";b.btns.park.title=b.btns.park.titleIfParked;b._isParked=
true;b.parkBusy=false;this._redrawWindow(b,true);if(_isOpera){b.childNodes[0].border=1;b.childNodes[0].border=0}b.checkEvent("onParkUp")?b.callEvent("onParkUp",[b]):this.callEvent("onParkUp",[b])}else{this._redrawWindow(b);this.parkTM=window.setTimeout(function(){c._doParkUp(b)},this.parkTMTime)}};this._doParkDown=function(b){b.h+=this.parkSpeed;if(b.h>=b.lastParkH){b.h=b.lastParkH;b.btns.park.title=b.btns.park.titleIfNotParked;if(b._allowResizeGlobal==true){this._enableButton(b,"minmax1");this._enableButton(b,
"minmax2")}b._isParked=false;b.parkBusy=false;this._redrawWindow(b);this._fixInnerObjs(b);if(_isOpera){b._content.childNodes[2].style.border="#FFFFFF 0px solid";var d=b._content.childNodes[2];window.setTimeout(function(){d.style.border="none"},1)}b.checkEvent("onParkDown")?b.callEvent("onParkDown",[b]):this.callEvent("onParkDown",[b])}else{this._redrawWindow(b);this.parkTM=window.setTimeout(function(){c._doParkDown(b)},this.parkTMTime)}};this._enableButton=function(b,d){b.btns[d]._isEnabled=true;
b.btns[d].className="button_"+b.btns[d].label+"_default"};this._disableButton=function(b,d){b.btns[d]._isEnabled=false;b.btns[d].className="button_"+b.btns[d].label+"_disabled"};this._showWindowHeader=function(b){b.childNodes[1].style.display="";b.childNodes[2].style.display="";b.childNodes[3].style.display="";for(var d in b._skinParams)delete b._skinParams[d];b._skinParams=null;d=this.skinParams[this.skin].header_height+"px";b.childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.height=
d;b.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.height=d;for(var f=b.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0],h=0;h<f.childNodes.length;h++)f.childNodes[h].style.height=d;this._redrawWindow(b)};this._hideWindowHeader=function(b){b.childNodes[1].style.display="none";b.childNodes[2].style.display="none";b.childNodes[3].style.display="none";b._skinParams={};for(var d in this.skinParams[this.skin])b._skinParams[d]=
Number(this.skinParams[this.skin][d]).valueOf();b._skinParams.header_height=b._skinParams.border_bottom_height;d=b._skinParams.header_height+"px";b.childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.height=d;b.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.height=d;for(var f=b.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0],h=0;h<f.childNodes.length;h++)f.childNodes[h].style.height=d;this._redrawWindow(b)};this._allowReszieGlob=
function(b){b._allowResizeGlobal=true;this._enableButton(b,"minmax1");this._enableButton(b,"minmax2")};this._denyResize=function(b){b._allowResizeGlobal=false;this._disableButton(b,"minmax1");this._disableButton(b,"minmax2")};this._maximizeWindow=function(b){if(b._allowResizeGlobal!=false){b.lastMaximizeX=b.x;b.lastMaximizeY=b.y;b.lastMaximizeW=b.w;b.lastMaximizeH=b.h;b.x=0;b.y=0;b._isMaximized=true;b._allowMove=false;b._allowResize=false;b.w=b.maxW=="auto"?this.vp==document.body?"100%":this.vp.style.width!=
""&&String(this.vp.style.width).search("%")==-1?parseInt(this.vp.style.width):this.vp.offsetWidth:b.maxW;b.h=b.maxH=="auto"?this.vp==document.body?"100%":this.vp.style.height!=""&&String(this.vp.style.width).search("%")==-1?parseInt(this.vp.style.height):this.vp.offsetHeight:b.maxH;this._hideButton(b,"minmax1");this._showButton(b,"minmax2");this._redrawWindow(b);this._fixInnerObjs(b);b.checkEvent("onMaximize")?b.callEvent("onMaximize",[b]):this.callEvent("onMaximize",[b])}};this._restoreWindow=function(b){if(b._allowResizeGlobal!=
false){b.layout&&b.layout._defineWindowMinDimension(b);b.x=b.lastMaximizeX;b.y=b.lastMaximizeY;b.w=b.lastMaximizeW;b.h=b.lastMaximizeH;b._isMaximized=false;b._allowMove=b._allowMoveGlobal;b._allowResize=true;this._fixWindowDimensionInViewport(b);this._hideButton(b,"minmax2");this._showButton(b,"minmax1");this._redrawWindow(b);this._fixInnerObjs(b);b.checkEvent("onMinimize")?b.callEvent("onMinimize",[b]):this.callEvent("onMinimize",[b])}};this._showButton=function(b,d){b.btns[d].isVisible=true;b.btns[d].parentNode.className=
"dhtmlx_wins_btn_visible"};this._hideButton=function(b,d){b.btns[d].isVisible=false;b.btns[d].parentNode.className="dhtmlx_wins_btn_hidden"};this._showWindow=function(b){b.style.display="";b.checkEvent("onShow")?b.callEvent("onShow",[b]):this.callEvent("onShow",[b]);var d=this._getActive();if(d==null){this._bringOnTop(b);this._makeActive(b)}else if(this._isWindowHidden(d)){this._bringOnTop(b);this._makeActive(b)}};this._hideWindow=function(b){b.style.display="none";b.checkEvent("onHide")?b.callEvent("onHide",
[b]):this.callEvent("onHide",[b]);b=this.getTopmostWindow(true);if(b!=null){this._bringOnTop(b);this._makeActive(b)}};this._isWindowHidden=function(b){return b.style.display=="none"};this._closeWindow=function(b){if(b.checkEvent("onClose")){if(!b.callEvent("onClose",[b]))return}else if(!this.callEvent("onClose",[b]))return;this._removeWindowGlobal(b);b={zi:0};for(var d in this.wins)if(this.wins[d].zi>b.zi)b=this.wins[d];b!=null&&this._makeActive(b)};this._needHelp=function(b){b.checkEvent("onHelp")?
b.callEvent("onHelp",[b]):this.callEvent("onHelp",[b])};this._attachContent=function(b,d,f,h){if(h!==true)for(;b._content.childNodes[2].childNodes.length>0;)b._content.childNodes[2].removeChild(b._content.childNodes[2].childNodes[0]);if(d=="url"){d=document.createElement("IFRAME");d.frameBorder=0;d.border=0;d.style.width="100%";d.style.height="100%";d.src=f;b._content.childNodes[2].appendChild(d);b._frame=d;if(_isIE)b._frame.onreadystatechange=function(i){b._frame.readyState=="complete"&&c.callEvent("onContentLoaded",
[b])};else b._frame.onload=function(){c.callEvent("onContentLoaded",[b])}}else if(d=="urlajax"){d=new dtmlXMLLoaderObject(function(){this.dhxWindowObject.attachHTMLString(this.xmlDoc.responseText);c.callEvent("onContentLoaded",[b]);this.destructor()},window);d.dhxWindowObject=b;d.loadXML(f)}else if(d=="obj"){b._frame=null;b._content.childNodes[2].appendChild(f);b._content.childNodes[2].style.overflow=h===true?"auto":"hidden";f.style.display=""}else if(d=="str"){b._frame=null;b._content.childNodes[2].innerHTML=
f}};this._setWindowIcon=function(b,d,f){b.iconsPresent=true;b.icons[0]=this.imagePath+d;b.icons[1]=this.imagePath+f;b.childNodes[1].src=b.icons[b.isOnTop()?0:1]};this._getWindowIcon=function(b){return b.iconsPresent?new Array(b.icons[0],b.icons[1]):new Array(null,null)};this._clearWindowIcons=function(b){b.iconsPresent=false;b.icons[0]=this.imagePath+this.pathPrefix+this.skin+"/active/icon_blank.gif";b.icons[1]=this.imagePath+this.pathPrefix+this.skin+"/inactive/icon_blank.gif";b.childNodes[1].src=
b.icons[b.isOnTop()?0:1]};this._restoreWindowIcons=function(b){b.iconsPresent=true;b.icons[0]=this.imagePath+this.pathPrefix+this.skin+"/active/icon_normal.gif";b.icons[1]=this.imagePath+this.pathPrefix+this.skin+"/inactive/icon_normal.gif";b.childNodes[1].src=b.icons[b.className=="dhtmlx_window_active"?0:1]};this._attachWindowContentTo=function(b,d,f,h){var i=b._content;i.parentNode.removeChild(i);b.hide();i.style.left="0px";i.style.top="0px";i.style.width=(f!=null?f:d.offsetWidth)+"px";i.style.height=
(h!=null?h:d.offsetHeight)+"px";i.style.position="relative";d.appendChild(i)};this._setWindowToFullScreen=function(b,d){if(d==true){d=b._content;d.parentNode.removeChild(d);b.hide();b._isFullScreened=true;d.style.left="0px";d.style.top="0px";d.style.width=document.body.offsetWidth-(_isIE?4:0)+"px";d.style.height=document.body.offsetHeight==0?window.innerHeight?window.innerHeight+"px":document.body.scrollHeight+"px":document.body.offsetHeight-(_isIE?4:0)+"px";d.style.position="absolute";document.body.appendChild(d)}else if(d==
false){d=b.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[1];var f=b._content;document.body.removeChild(f);d.appendChild(f);b._isFullScreened=false;b.setDimension(b.w,b.h);b.show();b.bringToTop();b.center()}this._fixInnerObjs(b)};this._isWindowOnTop=function(b){return this.getTopmostWindow()==b};this._bringOnBottom=function(b){for(var d in this.wins)if(this.wins[d].zi<b.zi){this.wins[d].zi+=this.zIndexStep;this.wins[d].style.zIndex=this.wins[d].zi}b.zi=
50;b.style.zIndex=b.zi;this._makeActive(this.getTopmostWindow())};this._isWindowOnBottom=function(b){var d=true;for(var f in this.wins)if(this.wins[f]!=b)d=d&&this.wins[f].zi>b.zi;return d};this._stickWindow=function(b){b._isSticked=true;this._hideButton(b,"stick");this._showButton(b,"sticked");this._bringOnTop(b)};this._unstickWindow=function(b){b._isSticked=false;this._hideButton(b,"sticked");this._showButton(b,"stick");this._bringOnTopAnyStickedWindows()};this._addUserButton=function(b,d,f,h,i){var e=
document.createElement("DIV");e.className="button_"+i+"_default";e.title=h;e.isVisible=true;e._isEnabled=true;e.isPressed=false;e.label=i;b.btns[d]=e;e._doOnClick=function(){};d=b.childNodes[3].childNodes[0].childNodes[0].childNodes[0];h=document.createElement("TD");h.className="dhtmlx_wins_btn_"+(e.isVisible?"visible":"hidden");if(f>d.childNodes.length)d.appendChild(h);else{if(f<0)f=0;d.insertBefore(h,d.childNodes[f])}h.appendChild(e);this._attachEventsOnButton(b,e)};this._removeUserButton=function(b,
d,f){this._removeButtonGlobal(b,d,f)};this._blockSwitcher=function(b){for(var d in this.wins){for(var f=this.wins[d]._content,h=null,i=0;i<f.childNodes.length;i++)if(f.childNodes[i].className=="dhx_content_cover_blocker")h=f.childNodes[i];if(h!=null)h.style.display=b?"":"none"}};this.modalWin=this.resizingWin=null;this.resizingDirs="none";this._createViewport();this._doOnMouseUp=function(){c._stopMove()};this._doOnMoseMove=function(b){b=b||event;c!=null&&c._moveWindow(b)};this._resizeTM=null;this._resizeTMTime=
200;this._doOnResize=function(){window.clearTimeout(c._resizeTM);c._resizeTM=window.setTimeout(function(){c._autoResizeViewport()},c._resizeTMTime)};this._doOnUnload=function(){c.unload()};this._doOnSelectStart=function(b){b=b||event;if(c.movingWin!=null||c.resizingWin!=null)b.returnValue=false};_isIE&&document.body.attachEvent("onselectstart",this._doOnSelectStart);dhtmlxEvent(window,"resize",this._doOnResize);dhtmlxEvent(document.body,"unload",this._doOnUnload);dhtmlxEvent(document.body,"mouseup",
this._doOnMouseUp);dhtmlxEvent(this.vp,"mousemove",this._doOnMoseMove);dhtmlxEvent(this.vp,"mouseup",this._doOnMouseUp);this._setWindowModal=function(b,d){if(d==true){this._makeActive(b);this._bringOnTop(b);this.modalWin=b;b._isModal=true;this.modalCoverI.style.zIndex=b.zi-2;this.modalCoverI.style.display="";this.modalCoverD.style.zIndex=b.zi-2;this.modalCoverD.style.display=""}else{this.modalWin=null;b._isModal=false;this.modalCoverI.style.zIndex=0;this.modalCoverI.style.display="none";this.modalCoverD.style.zIndex=
0;this.modalCoverD.style.display="none"}};this._bringOnTopAnyStickedWindows=function(){var b=[];for(var d in this.wins)if(this.wins[d]._isSticked)b[b.length]=this.wins[d];for(var f=0;f<b.length;f++)this._bringOnTop(b[f]);if(b.length==0)for(d in this.wins)this.wins[d].className=="dhtmlx_window_active"&&this._bringOnTop(this.wins[d])};this.unload=function(){this._clearAll()};this._removeButtonGlobal=function(b,d,f){this._parseNestedForEvents(f);for(var h in f)if(typeof f[h]=="function"){var i=f[h].toString().split("\n");
i.length==3&&i[1].search(/\[native\scode\]/gi)!=-1||(f[h]=null)}f.parentNode.removeChild(f);delete b.btns[d]};this._removeWindowGlobal=function(b){this.modalWin==b&&this._setWindowModal(b,false);this._parseNestedForEvents(b);if(!_isOpera)for(var d in b.btns)this._removeButtonGlobal(b,d,b.btns[d]);if(!_isOpera)for(d in b)if(typeof b[d]=="function"){var f=b[d].toString().split("\n");f.length==3&&f[1].search(/\[native\scode\]/gi)!=-1||(b[d]=null)}b._content=null;b.parentNode.removeChild(b);delete this.wins[b.idd]};
this._removeEvents=function(b){b.onmouseover=null;b.onmouseout=null;b.onmousemove=null;b.onclick=null;b.ondblclick=null;b.onmouseenter=null;b.onmouseleave=null;b.onmouseup=null;b.onmousewheel=null;b.onmousedown=null;b.onselectstart=null;b.onfocus=null;b.style.display=""};this._parseNestedForEvents=function(b){this._removeEvents(b);for(var d=0;d<b.childNodes.length;d++)b.childNodes[d].tagName!=null&&this._parseNestedForEvents(b.childNodes[d])};this._attachStatusBar=function(){};this._attachWebMenu=
function(){return null};this._attachWebToolbar=function(){return null};this._fixInnerObjs=function(b){if(b.grid){b.grid.setSizes();b.grid.setSizes()}b.tabbar&&b.tabbar.adjustOuterSize();b.menu&&b.menu._redistribTopLevelPositions();b.accordion&&b.accordion.setSizes();b.layout&&b.layout.setSizes(b);b.folders&&b.folders.setSizes();if(b.editor)_isOpera?window.setTimeout(function(){b.editor.adjustSize()},10):b.editor.adjustSize()};this._clearAll=function(){this._clearDocumentEvents();for(var b in this.wins){this._diableOnSelectInWin(this.wins[b]);
this._removeWindowGlobal(this.wins[b])}this.modalCoverD.style.display="";this._parseNestedForEvents(this.modalCoverD);this.modalCoverD.parentNode.removeChild(this.modalCoverD);this.modalCoverD=null;this._parseNestedForEvents(this.modalCoverI);this.modalCoverI.style.display="";this.modalCoverI.parentNode.removeChild(this.modalCoverI);this.modalCoverI=null;this.vp!=document.body&&this.vp.parentNode.removeChild(this.vp);this.vp=null;for(b in this.skinParams)delete this.skinParams[b];c=this.skinParams=
null;for(b in this)if(typeof this[b]=="function")this[b]=null;for(b in this)delete this[b]};this._clearDocumentEvents=function(){if(_isIE){window.detachEvent("onresize",this._doOnResize);document.body.detachEvent("onselectstart",this._doOnSelectStart);document.body.detachEvent("onmouseup",this._doOnMouseUp);document.body.detachEvent("onunload",this._doOnUnload);this.vp.detachEvent("onmousemove",this._doOnMoseMove);this.vp.detachEvent("onmouseup",this._doOnMouseUp)}else{window.removeEventListener("resize",
this._doOnResize,false);document.body.removeEventListener("mouseup",this._doOnMouseUp,false);document.body.removeEventListener("unload",this._doOnUnload,false);this.vp.removeEventListener("mousemove",this._doOnMoseMove,false);this.vp.removeEventListener("mouseup",this._doOnMouseUp,false)}};this._enableStatusBar!=null&&this._enableStatusBar();this._enableWebMenu!=null&&this._enableWebMenu();this._enableWebToolbar!=null&&this._enableWebToolbar();this._genStr=function(b){for(var d="",f=0;f<b;f++)d+=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".charAt(Math.round(Math.random()*62));return d};this.dhx_Event=function(){this.dhx_SeverCatcherPath="";this.attachEvent=function(b,d,f){b=b.toLowerCase();f=f||this;b="ev_"+b;if(!this[b]||!this[b].addEvent){f=new this.eventCatcher(f);f.addEvent(this[b]);this[b]=f}return b+":"+this[b].addEvent(d)};this.callEvent=function(b,d){b=b.toLowerCase();if(this["ev_"+b])return this["ev_"+b].apply(this,d);return true};this.checkEvent=function(b){b=
b.toLowerCase();if(this["ev_"+b])return true;return false};this.eventCatcher=function(b){var d=[],f=function(){if(d)var h=true;for(var i=0;i<d.length;i++)if(d[i]!=null){var e=d[i].apply(b,arguments);h=h&&e}return h};f.addEvent=function(h){if(typeof h!="function")h=eval(h);if(h)return d.push(h)-1;return false};f.removeEvent=function(h){d[h]=null};return f};this.detachEvent=function(b){if(b!=false){b=b.split(":");this[b[0]].removeEvent(b[1])}}};this.dhx_Event();return this};

