"+a.xmlDoc.responseText+"");if(typeof(n._doOnFrameContentLoaded)=="function"){n._doOnFrameContentLoaded()}n.dataType="url-ajax";n=a=null})}else{dhx4.ajax.get(c,function(a){n.attachHTMLString(""+a.xmlDoc.responseText+"
");if(typeof(n._doOnFrameContentLoaded)=="function"){n._doOnFrameContentLoaded()}n.dataType="url-ajax";n=a=null})}}else{if(this.dataType=="url"){var j=this.getFrame()}else{var j=document.createElement("IFRAME");j.frameBorder=0;j.border=0;j.style.width="100%";j.style.height="100%";j.style.position="relative";this._attachObject(j);this.dataType="url";this._attachURLEvents()}if(g){var l=(typeof(this.conf.url_data.post_ifr)=="undefined");this.conf.url_data.post_ifr=true;if(l){this._attachURLEvents()}j.src="about:blank"}else{j.src=c+(window.dhx4.ajax.cache!=true?(c.indexOf("?")>=0?"&":"?")+"dhxr"+new Date().getTime():"")}j=null}j=null};dhtmlXCellObject.prototype.reloadURL=function(){if(!(this.dataType=="url"||this.dataType=="url-ajax")){return}if(this.conf.url_data==null){return}this.attachURL(this.conf.url_data.url,this.conf.url_data.ajax,this.conf.url_data.post_data)};dhtmlXCellObject.prototype.attachHTMLString=function(str){this._attachObject(null,null,str);var z=str.match(/");E.document.close();if(this._fake){this._hrrar=C;}};dhtmlXGridObject.prototype._printWidth=function(){var h=[];var g=0;for(var e=0;e=h){this.objBox.scrollLeft=this.objBox.scrollLeft+20;e=true;}else{if(l-20=c&&!this._realfake){this.objBox.scrollTop=this.objBox.scrollTop+20;e=true;}else{if(j-20this._cCount){u=this._cCount;}
+var g=0;for(var r=w;r2){if(c&&!this.rowsBuffer[c-1]){this.rowsBuffer[c-1]=0;}
+c=a;}
+this._srnd=dhx4.s2b(e);this._srdh=this._srdh||20;this._dpref=c||0;};dhtmlXGridObject.prototype.enablePreRendering=function(a){this._srnd_pr=parseInt(a||50);};dhtmlXGridObject.prototype.forceFullLoading=function(a,h){for(var e=0;e0){m-=this.rowsCol[l]?this.rowsCol[l].offsetHeight:this._srdh;l++;}
+c=l+this._get_view_size();if(l>0){l--;}}
+c+=this._srnd_pr||0;if(c>this.rowsBuffer.length){c=this.rowsBuffer.length;}
+for(var g=l;gg){var j=g-e[0];if(j==0){this._insert_before(g,h,e[2]);this._update_fillers(c,-1,1);}else{if(j==e[1]-1){this._insert_after(g,h,e[2]);this._update_fillers(c,-1,0);}else{this._fillers.push(this._add_filler(g+1,e[1]-j-1,e[2],1));this._insert_after(g,h,e[2]);this._update_fillers(c,-e[1]+j,0);}}
+return;}}};dhtmlXGridObject.prototype._update_fillers=function(e,a,g){var c=this._fillers[e];c[1]=c[1]+a;c[0]=c[0]+g;if(!c[1]){this.callEvent("onRemoveFiller",[c[2]]);c[2].parentNode.removeChild(c[2]);this._fillers.splice(e,1);}else{c[2].firstChild.style.height=parseFloat(c[2].firstChild.style.height)+a*this._srdh+"px";this.callEvent("onUpdateFiller",[c[2]]);}};dhtmlXGridObject.prototype._insert_before=function(c,e,a){a.parentNode.insertBefore(e,a);this.rowsCol[c]=e;this.callEvent("onRowInserted",[e,null,a,"before"]);};dhtmlXGridObject.prototype._insert_after=function(c,e,a){if(a.nextSibling){a.parentNode.insertBefore(e,a.nextSibling);}else{a.parentNode.appendChild(e);}
+this.rowsCol[c]=e;this.callEvent("onRowInserted",[e,null,a,"after"]);};if(typeof window.dhtmlxValidation!="undefined"){dhtmlxValidation.trackInput=function(e,g,c,a){dhtmlxEvent(e,"keyup",function(h){if(dhtmlxValidation._timer){window.clearTimeout(dhtmlxValidation._timer);dhtmlxValidation._timer=null;}
+dhtmlxValidation._timer=window.setTimeout(function(){if(!dhtmlxValidation.checkInput(e,g)){if(!c||c(e,e.value,g)){e.className+=" dhtmlx_live_validation_error";}}else{e.className=e.className.replace(/[ ]*dhtmlx_live_validation_error/g,"");if(a){a(e,e.value,g);}}},250);});};dhtmlxValidation.checkInput=function(a,c){return dhtmlxValidation.checkValue(a.value,c);};dhtmlxValidation.checkValue=function(e,g){if(typeof g=="string"){g=g.split(",");}
+var a=true;for(var c=0;c1){this._validators._live=a;}
+if(!this._validators._event){this._validators._event=this.attachEvent("onEditCell",this.validationEvent);}};dhtmlXGridObject.prototype.setColValidators=function(a){if(!this._validators){this.enableValidation(true);}
+if(typeof a=="string"){a=a.split(this.delim);}
+this._validators.data=a;};dhtmlXGridObject.prototype.validationEvent=function(j,c,g,e,m){var n=this._validators;if(!n){return true;}
+var l=n.data[g]||this.cells(c,g).getAttribute("validate")||"";if(j==1&&l){var h=this.editor||(this._fake||{}).editor;if(!h){return true;}
+h.cell.className=h.cell.className.replace(/[ ]*dhtmlx_validation_error/g,"");if(n._live){var a=this;dhtmlxValidation.trackInput(h.getInput(),l,function(o,r,s){return a.callEvent("onLiveValidationError",[c,g,r,o,s]);},function(o,r,s){return a.callEvent("onLiveValidationCorrect",[c,g,r,o,s]);});}}
+if(j==2){this.validateCell(c,g,l,e);}
+return true;};dhtmlXGridObject.prototype.validateCell=function(l,h,j,g){j=j||this._validators.data[h]||this.cells(l,h).getAttribute("validate");g=g||this.cells(l,h).getValue();if(!j){return;}
+var c=this.cells(l,h).cell;var a=true;if(typeof j=="string"){j=j.split(this.delim);}
+for(var e=0;e1){c[1]="href='"+c[1]+"'";if(c.length==3){c[1]+=" target='"+c[2]+"'";}else{c[1]+=" target='_blank'";}}}
+this.setCValue(""+c[0]+"",c);};}
+eXcell_link.prototype=new eXcell();eXcell_link.prototype.getTitle=function(){var a=this.cell.firstChild;return a&&a.tagName?a.getAttribute("href"):"";};eXcell_link.prototype.getContent=function(){var a=this.cell.firstChild;return a&&a.tagName?a.innerHTML:"";};function eXcell_grid(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid;if(!this.grid._sub_grids){return;}
+this._sub=this.grid._sub_grids[a._cellIndex];if(!this._sub){return;}
+this._sindex=this._sub[1];this._sub=this._sub[0];}
+this.getValue=function(){return this.cell.val;};this.setValue=function(c){this.cell.val=c;if(this._sub.getRowById(c)){c=this._sub.cells(c,this._sindex);if(c){c=c.getValue();}else{c="";}}
+this.setCValue(c||" ",c);};this.edit=function(){this.val=this.cell.val;this._sub.entBox.style.display="block";var e=this.grid.getPosition(this.cell);this._sub.entBox.style.top=e[1]+"px";this._sub.entBox.style.left=e[0]+"px";this._sub.entBox.style.position="absolute";this._sub.setSizes();var c=this.grid.editStop;this.grid.editStop=function(){};if(this._sub.getRowById(this.cell.val)){this._sub.setSelectedRow(this.cell.val);}
+this._sub.setActive(true);this.grid.editStop=c;};this.detach=function(){var c=this.cell.val;this._sub.entBox.style.display="none";if(this._sub.getSelectedId()===null){return false;}
+this.setValue(this._sub.getSelectedId());this.grid.setActive(true);return this.cell.val!=c;};}
+eXcell_grid.prototype=new eXcell();dhtmlXGridObject.prototype.setSubGrid=function(c,a,g){if(!this._sub_grids){this._sub_grids=[];}
+this._sub_grids[a]=[c,g];c.entBox.style.display="none";var e=this;c.entBox.onclick=function(h){(h||window.event).cancelBubble=true;return false;};c.attachEvent("onRowSelect",function(h){e.editStop();return true;});c._chRRS=false;};function eXcell_dhxCalendar(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid;if(!this.grid._grid_calendarA){var e=(this.grid._grid_calendarA=new dhtmlxCalendarObject());this.grid.callEvent("onDhxCalendarCreated",[e]);var c=this.grid;e.attachEvent("onClick",function(){this._last_operation_calendar=true;window.setTimeout(function(){c.editStop();},1);return true;});var g=function(h){(h||event).cancelBubble=true;};dhtmlxEvent(e.base,"click",g);e=null;}}}
+eXcell_dhxCalendar.prototype=new eXcell();eXcell_dhxCalendar.prototype.edit=function(){var c=this.grid.getPosition(this.cell);this.grid._grid_calendarA._show(false,false);this.grid._grid_calendarA.setPosition(c[0],c[1]+this.cell.offsetHeight);this.grid._grid_calendarA._last_operation_calendar=false;this.grid.callEvent("onCalendarShow",[this.grid._grid_calendarA,this.cell.parentNode.idd,this.cell._cellIndex]);this.cell._cediton=true;this.val=this.cell.val;this._val=this.cell.innerHTML;var a=this.grid._grid_calendarA.draw;this.grid._grid_calendarA.draw=function(){};this.grid._grid_calendarA.setDateFormat(this.grid._dtmask||"%d/%m/%Y");this.grid._grid_calendarA.setDate(this.val||new Date());this.grid._grid_calendarA.draw=a;};eXcell_dhxCalendar.prototype.getDate=function(){if(this.cell.val){return this.cell.val;}
+return null;};eXcell_dhxCalendar.prototype.getValue=function(){if(this.cell._clearCell){return"";}
+if(this.grid._dtmask_inc&&this.cell.val){return this.grid._grid_calendarA.getFormatedDate(this.grid._dtmask_inc,this.cell.val).toString();}
+return this.cell.innerHTML.toString()._dhx_trim();};eXcell_dhxCalendar.prototype.detach=function(){if(!this.grid._grid_calendarA){return;}
+this.grid._grid_calendarA.hide();if(this.cell._cediton){this.cell._cediton=false;}else{return;}
+if(this.grid._grid_calendarA._last_operation_calendar){var e=this.grid._grid_calendarA.getFormatedDate(this.grid._dtmask||"%d/%m/%Y");var c=this.grid._grid_calendarA.getDate();this.cell.val=new Date(c);this.setCValue(e,c);this.cell._clearCell=!e;var a=this.val;this.val=this._val;return this.cell.val.valueOf()!=(a||"").valueOf();}
+return false;};eXcell_dhxCalendar.prototype.setValue=function(a){if(a&&typeof a=="object"){this.cell.val=a;this.cell._clearCell=false;this.setCValue(this.grid._grid_calendarA.getFormatedDate(this.grid._dtmask||"%d/%m/%Y",a).toString(),this.cell.val);return;}
+if(!a||a.toString()._dhx_trim()==""){a=" ";this.cell._clearCell=true;this.cell.val="";}else{this.cell._clearCell=false;this.cell.val=new Date(this.grid._grid_calendarA.setFormatedDate(this.grid._dtmask_inc||this.grid._dtmask||"%d/%m/%Y",a.toString(),null,true));if(this.grid._dtmask_inc){a=this.grid._grid_calendarA.getFormatedDate(this.grid._dtmask||"%d/%m/%Y",this.cell.val);}}
+if(this.cell.val=="NaN"||this.cell.val=="Invalid Date"){this.cell._clearCell=true;this.cell.val=new Date();this.setCValue(" ",0);}else{this.setCValue((a||"").toString(),this.cell.val);}};function eXcell_dhxCalendarA(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid;if(!this.grid._grid_calendarA){var e=(this.grid._grid_calendarA=new dhtmlxCalendarObject());this.grid.callEvent("onDhxCalendarCreated",[e]);var c=this.grid;e.attachEvent("onClick",function(){this._last_operation_calendar=true;window.setTimeout(function(){c.editStop();},1);return true;});var g=function(h){(h||event).cancelBubble=true;};dhtmlxEvent(e.base,"click",g);}}}
+eXcell_dhxCalendarA.prototype=new eXcell();eXcell_dhxCalendarA.prototype.edit=function(){var c=this.grid.getPosition(this.cell);this.grid._grid_calendarA._show(false,false);this.grid._grid_calendarA.setPosition(c[0]*1+this.cell.offsetWidth,c[1]*1);this.grid.callEvent("onCalendarShow",[this.grid._grid_calendarA,this.cell.parentNode.idd,this.cell._cellIndex]);this.grid._grid_calendarA._last_operation_calendar=false;this.cell._cediton=true;this.val=this.cell.val;this._val=this.cell.innerHTML;var a=this.grid._grid_calendarA.draw;this.grid._grid_calendarA.draw=function(){};this.grid._grid_calendarA.setDateFormat(this.grid._dtmask||"%d/%m/%Y");this.grid._grid_calendarA.setDate(this.val);this.grid._grid_calendarA.draw=a;this.cell.atag=!this.grid.multiLine&&(_isKHTML||_isMacOS||_isFF)?"INPUT":"TEXTAREA";this.obj=document.createElement(this.cell.atag);this.obj.style.height=this.cell.offsetHeight-4+"px";this.obj.className="dhx_combo_edit";this.obj.wrap="soft";this.obj.style.textAlign=this.cell.align;this.obj.onclick=function(g){(g||event).cancelBubble=true;};this.obj.onmousedown=function(g){(g||event).cancelBubble=true;};this.obj.value=this.getValue();this.cell.innerHTML="";this.cell.appendChild(this.obj);if(window.dhx4.isIE){this.obj.style.overflow="visible";if(this.grid.multiLine&&this.obj.offsetHeight>=18&&this.obj.offsetHeight<40){this.obj.style.height="36px";this.obj.style.overflow="scroll";}}
+this.obj.onselectstart=function(g){if(!g){g=event;}
+g.cancelBubble=true;return true;};this.obj.focus();this.obj.focus();};eXcell_dhxCalendarA.prototype.getDate=function(){if(this.cell.val){return this.cell.val;}
+return null;};eXcell_dhxCalendarA.prototype.getValue=function(){if(this.cell._clearCell){return"";}
+if(this.grid._dtmask_inc&&this.cell.val){return this.grid._grid_calendarA.getFormatedDate(this.grid._dtmask_inc,this.cell.val).toString();}
+return this.cell.innerHTML.toString()._dhx_trim();};eXcell_dhxCalendarA.prototype.detach=function(){if(!this.grid._grid_calendarA){return;}
+this.grid._grid_calendarA.hide();if(this.cell._cediton){this.cell._cediton=false;}else{return;}
+if(this.grid._grid_calendarA._last_operation_calendar){this.grid._grid_calendarA._last_operation_calendar=false;var e=this.grid._grid_calendarA.getFormatedDate(this.grid._dtmask||"%d/%m/%Y");var c=this.grid._grid_calendarA.getDate();this.cell.val=new Date(c);this.setCValue(e,c);this.cell._clearCell=!e;var a=this.val;this.val=this._val;return this.cell.val.valueOf()!=(a||"").valueOf();}
+this.setValue(this.obj.value);var a=this.val;this.val=this._val;return this.cell.val.valueOf()!=(a||"").valueOf();};eXcell_dhxCalendarA.prototype.setValue=function(a){if(a&&typeof a=="object"){this.cell.val=a;this.cell._clearCell=false;this.setCValue(this.grid._grid_calendarA.getFormatedDate(this.grid._dtmask||"%d/%m/%Y",a).toString(),this.cell.val);return;}
+if(!a||a.toString()._dhx_trim()==""){a=" ";this.cell._clearCell=true;this.cell.val="";}else{this.cell._clearCell=false;this.cell.val=new Date(this.grid._grid_calendarA.setFormatedDate(this.grid._dtmask_inc||this.grid._dtmask||"%d/%m/%Y",a.toString(),null,true));if(this.grid._dtmask_inc){a=this.grid._grid_calendarA.getFormatedDate(this.grid._dtmask||"%d/%m/%Y",this.cell.val);}}
+if(this.cell.val=="NaN"||this.cell.val=="Invalid Date"){this.cell.val=new Date();this.cell._clearCell=true;this.setCValue(" ",0);}else{this.setCValue((a||"").toString(),this.cell.val);}};function eXcell_cntr(a){this.cell=a;this.grid=this.cell.parentNode.grid;if(!this.grid._ex_cntr_ready&&!this._realfake){this.grid._ex_cntr_ready=true;if(this.grid._h2){this.grid.attachEvent("onOpenEn",function(e){this.resetCounter(a._cellIndex);});}
+var c=function(){var e=this;window.setTimeout(function(){if(!e.resetCounter){return;}
+if(e._fake&&!e._realfake&&a._cellIndex");}else{this.setValue("");}
+this.cell.wasChanged=true;this.grid.callEvent("onEditCell",[1,this.cell.parentNode.idd,this.cell._cellIndex]);this.grid.callEvent("onCheck",[this.cell.parentNode.idd,this.cell._cellIndex,this.val!="1"]);this.grid.callEvent("onCheckbox",[this.cell.parentNode.idd,this.cell._cellIndex,this.val!="1"]);}else{this.editor=null;}};this.getValue=function(){try{return this.cell.chstate.toString();}catch(e){return null;}};this.isCheckbox=function(){return true;};this.isChecked=function(){if(this.getValue()=="1"){return true;}else{return false;}};this.setChecked=function(e){this.setValue(e.toString());};this.detach=function(){return this.val!=this.getValue();};this.drawCurrentState=function(){if(this.cell.chstate==1){return" Yes
";}else{return" No
";}};}
+eXcell_acheck.prototype=new eXcell();eXcell_acheck.prototype.setValue=function(c){c=(c||"").toString();if(c.indexOf("1")!=-1||c.indexOf("true")!=-1){c="1";this.cell.chstate="1";}else{c="0";this.cell.chstate="0";}
+var a=this;this.setCValue(this.drawCurrentState(),this.cell.chstate);};function eXcell_context(a){if(a){this.cell=a;this.grid=this.cell.parentNode.grid;if(!this.grid._sub_context){return;}
+this._sub=this.grid._sub_context[a._cellIndex];if(!this._sub){return;}
+this._sindex=this._sub[1];this._sub=this._sub[0];}
+this.getValue=function(){return _isIE?this.cell.innerText:this.cell.textContent;};this.setValue=function(e){this.cell._val=e;var c=this._sub.itemPull[this._sub.idPrefix+this.cell._val];e=c?c.title:e;this.setCValue(e||" ",e);};this.edit=function(){var e=this.grid.getPosition(this.cell);this._sub.showContextMenu(e[0]+this.cell.offsetWidth,e[1]);var c=this.grid.editStop;this.grid.editStop=function(){};this.grid.editStop=c;};this.detach=function(){if(this.grid._sub_id!=null){var c=this.cell._val;this.setValue(this.grid._sub_id);this.grid._sub_id=null;return this.cell._val!=c;}
+this._sub.hideContextMenu();};}
+eXcell_context.prototype=new eXcell();dhtmlXGridObject.prototype.setSubContext=function(a,c,g){var e=this;a.attachEvent("onClick",function(j,h){e._sub_id=j;e.editStop();a.hideContextMenu();return true;});if(!this._sub_context){this._sub_context=[];}
+this._sub_context[c]=[a,g];a.hideContextMenu();};function dhtmlXGridFromTable(obj,init){if(typeof obj!="object"){obj=document.getElementById(obj);}
+var w=document.createElement("DIV");w.setAttribute("width",obj.getAttribute("gridWidth")||(obj.offsetWidth?obj.offsetWidth+"px":0)||(window.getComputedStyle?window.getComputedStyle(obj,null)["width"]:obj.currentStyle?obj.currentStyle.width:0));w.setAttribute("height",obj.getAttribute("gridHeight")||(obj.offsetHeight?obj.offsetHeight+"px":0)||(window.getComputedStyle?window.getComputedStyle(obj,null)["height"]:obj.currentStyle?obj.currentStyle.height:0));w.className=obj.className;obj.className="";if(obj.id){w.id=obj.id;}
+var mr=obj;var drag=obj.getAttribute("dragAndDrop");mr.parentNode.insertBefore(w,mr);var f=mr.getAttribute("name")||"name_"+new Date().valueOf();var windowf=new dhtmlXGridObject(w);window[f]=windowf;var acs=mr.getAttribute("onbeforeinit");var acs2=mr.getAttribute("oninit");if(acs){eval(acs);}
+windowf.setImagePath(windowf.imgURL||mr.getAttribute("imgpath")||mr.getAttribute("image_path")||"");var skin=mr.getAttribute("skin");if(skin){windowf.setSkin(skin);}
+if(init){init(windowf);}
+var hrow=mr.rows[0];var za="";var zb="";var zc="";var zd="";var ze="";for(var i=0;i1){n.childNodes[g]._attrs.colspan=l.colSpan;for(var e=1;e=0?m:r.length]=n;return r;};this._genStr=function(a){var l="dhxId_";var n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";for(var m=0;m0){l=this.itemPull[F]._listBase[this.itemPull[F]._listBase.length-1];}}}}}
+var C=document.createElement("DIV");if(y==true&&l!=null){l=l.nextSibling;}
+if(l!=null){r.insertBefore(C,l);}else{r.appendChild(C);}}}
+C._idd=o;C._rId=this._rId;if(typeof C.style!="undefined"){if(typeof v.offsetLeft=="undefined"&&this.idef.offsetLeft>0){v.offsetLeft=this.idef.offsetLeft;}
+if(typeof v.offsetTop=="undefined"&&this.idef.offsetTop>0){v.offsetTop=this.idef.offsetTop;}
+var u="";if(typeof v.offsetLeft!="undefined"){u+=" padding-left:"+v.offsetLeft+"px!important;";}
+if(typeof v.offsetTop!="undefined"){u+=" padding-top:"+v.offsetTop+"px!important;";}
+C.style.cssText+=u;}
+if(D=="block"){if(isNaN(v.blockOffset)){v.blockOffset=this.idef.blockOffset;}}
+if(D=="list"){if(typeof C._ofsNested=="undefined"){C._ofsNested=this.idef_const.offsetNested;}
+if(s!=null){C._sId=s;}
+var x=this.items[D].render(C,this.skin);if(!this.itemPull[this.idPrefix+o]._listObj){this.itemPull[this.idPrefix+o]._listObj=[];}
+if(!this.itemPull[this.idPrefix+o]._list){this.itemPull[this.idPrefix+o]._list=[];}
+if(!this.itemPull[this.idPrefix+o]._listBase){this.itemPull[this.idPrefix+o]._listBase=[];}
+this.itemPull[this.idPrefix+o]._listObj.push(x[0]);this.itemPull[this.idPrefix+o]._list.push(x[1]);this.itemPull[this.idPrefix+o]._listBase.push(C);x[1].checkEvent=function(a){return e.checkEvent(a);};x[1].callEvent=function(a,w){return e.callEvent(a,w);};x[1].getForm=function(){return e.getForm();};x[1]._initObj(this._mergeSettings(v));if(C._inBlcok){C.className+=" in_block";}
+return x[1];}
+if(D=="newcolumn"){this._prepare(v.offset,E);return;}
+if(D=="label"&&this._ic++==0){v._isTopmost=true;}
+v.position=this.apos_css[!v.position||!this.apos_css[v.position]?this.idef.position:v.position];C.className=v.position+(typeof v.className=="string"?" "+v.className:"");if(!v.labelWidth){v.labelWidth=this.idef.labelWidth;}
+if(!v.labelHeight){v.labelHeight=this.idef.labelHeight;}
+if(typeof v.wrap!="undefined"){v.wrap=window.dhx4.s2b(v.wrap);}
+v.labelAlign=this.align_css[v.labelAlign]?this.align_css[v.labelAlign]:this.align_css[this.idef.labelAlign];v.inputWidth=v.width?v.width:v.inputWidth?v.inputWidth:this.idef.inputWidth;if(!v.inputHeight){v.inputHeight=this.idef.inputHeight;}
+if(typeof v.note!="undefined"){if(v.note.length!=null&&v.note[0]!=null){v.note=v.note[0];}
+if(typeof v.note.width=="undefined"){v.note.width=this.idef.noteWidth;}
+if(v.note.width=="auto"){v.note.width=v.inputWidth;}}
+C.checkEvent=function(a){return e.checkEvent(a);};C.callEvent=function(a,w){return e.callEvent(a,w);};C.getForm=function(){return e.getForm();};C._autoCheck=function(a){e._autoCheck(a);};if(typeof v.readonly=="string"){v.readonly=window.dhx4.s2b(v.readonly);}
+if(typeof v.autoStart=="string"){v.autoStart=window.dhx4.s2b(v.autoStart);}
+if(typeof v.autoRemove=="string"){v.autoRemove=window.dhx4.s2b(v.autoRemove);}
+if(typeof v.titleScreen=="string"){v.titleScreen=window.dhx4.s2b(v.titleScreen);}
+if(typeof v.info=="string"){v.info=window.dhx4.s2b(v.info);}
+if(typeof v.hidden=="string"){v.hidden=window.dhx4.s2b(v.hidden);}
+if(typeof v.checked=="string"){v.checked=window.dhx4.s2b(v.checked);}
+if(typeof v.userdata!="undefined"){for(var F in v.userdata){this.getForm().setUserData(o,F,v.userdata[F]);}}
+if(v.validate){if(typeof(v.validate!="undefined")&&(typeof v.validate=="function"||typeof window[v.validate]=="function")){C._validate=[v.validate];}else{C._validate=String(v.validate).split(this.separator);}}
+if(typeof v.required!="undefined"){if(typeof v.required=="string"){v.required=window.dhx4.s2b(v.required);}
+C._required=v.required==true;}
+if(C._required){if(!C._validate){C._validate=[];}
+var n=false;for(m=0;m0){r[0].selected=true;}}
+if(this.itemPull[m]._type=="ra"){var o=this.itemPull[m]._group;if(!l[o]){this.checkItem(o,this.doWithItem(n,"_getFirstValue"));l[o]=true;}}
+if(this.itemPull[m]._list){for(var s=0;s0){this.base[m].removeChild(this.base[m].childNodes[0]);}
+if(this.base[m].parentNode){this.base[m].parentNode.removeChild(this.base[m]);}
+this.base[m]=null;}
+this.base=null;this.cont.onkeypress=null;this.cont.className="";this.cont=null;for(var l in this){this[l]=null;}
+e=null;};for(var c in this.items){this.items[c].t=c;if(typeof this.items[c]._index=="undefined"){this.items[c]._index=true;}
+if(!this.items[c].show){this.items[c].show=function(a){a.style.display="";if(a._listObj){for(var l=0;l"+
+e.label+
+(e.info?"[?]":"")+
+(c._required?"*":"")+"";if(!isNaN(e.labelWidth)){a.firstChild.style.width=parseInt(e.labelWidth)+"px";}
+if(!isNaN(e.labelHeight)){a.firstChild.style.height=parseInt(e.labelHeight)+"px";}
+if(!isNaN(e.labelLeft)){a.style.left=parseInt(e.labelLeft)+"px";}
+if(!isNaN(e.labelTop)){a.style.top=parseInt(e.labelTop)+"px";}},doAddInput:function(v,g,c,n,o,h,j){var a=document.createElement("DIV");a.className="dhxform_control";if(v._ll){v.appendChild(a);}else{v.insertBefore(a,v.firstChild);}
+var s=document.createElement(c);s.className=j;s.name=v._idd;s._idd=v._idd;s.id=g.uid;if(typeof n=="string"){s.type=n;}
+if(c=="INPUT"||c=="TEXTAREA"){s.onkeyup=function(u){u=u||event;v.callEvent("onKeyUp",[this,u,this._idd]);};s.onkeydown=function(u){u=u||event;v.callEvent("onKeyDown",[this,u,this._idd]);};}
+a.appendChild(s);if(g.readonly){this.setReadonly(v,true);}
+if(g.hidden==true){this.hide(v);}
+if(g.disabled==true){this.userDisable(v);}
+if(o){if(!isNaN(g.inputLeft)){a.style.left=parseInt(g.inputLeft)+"px";}
+if(!isNaN(g.inputTop)){a.style.top=parseInt(g.inputTop)+"px";}}
+var r="";var l=false;if(h){if(!isNaN(g.inputWidth)){r+="width:"+parseInt(g.inputWidth)+"px;";l=true;}
+if(!isNaN(g.inputHeight)){r+="height:"+parseInt(g.inputHeight)+"px;";}}
+if(typeof g.style=="string"){r+=g.style;}
+s.style.cssText=r;if(g.maxLength){s.setAttribute("maxLength",g.maxLength);}
+if(g.connector){s.setAttribute("connector",g.connector);}
+var e=dhtmlXForm.prototype.items[this.t]!=null?dhtmlXForm.prototype.items[this.t]._dimFix==true:false;if(l&&({input:1,password:1,select:1,multiselect:1,calendar:1,colorpicker:1}[this.t]==1||e)){if(dhtmlXForm.prototype.items[this.t]._dim==null){dhtmlXForm.prototype.items[this.t]._dim=v.getForm()._checkDim(a,s);}
+s.style.width=parseInt(s.style.width)-dhtmlXForm.prototype.items[this.t]._dim+"px";}
+if(typeof g.note=="object"){var m=document.createElement("DIV");m.className="dhxform_note";m.style.width=(isNaN(g.note.width)?s.offsetWidth:parseInt(g.note.width))+"px";m._w=g.note.width;m.innerHTML=g.note.text;a.appendChild(m);m=null;}},doUnloadNestedLists:function(a){if(!a._list){return;}
+for(var c=0;c0){a.removeChild(a.childNodes[0]);}
+a.parentNode.removeChild(a);a=null;},doAttachEvents:function(c){var a=this;c.childNodes[c._ll?1:0][window.dhx4.isIPad?"ontouchstart":"onmousedown"]=function(h){h=h||event;if(h.preventDefault){h.preventDefault();}
+var g=h.target||h.srcElement;if(!this.parentNode._enabled||this.parentNode._ro||(typeof g.className!="undefined"&&g.className=="dhxform_note")){h.cancelBubble=true;if(h.preventDefault){h.preventDefault();}else{h.returnValue=false;}
+return false;}
+a.doClick(this.parentNode);};c.childNodes[c._ll?0:1].childNodes[0][window.dhx4.isIPad?"ontouchstart":"onmousedown"]=function(h){h=h||event;if(h.preventDefault){h.preventDefault();}
+if(!this.parentNode.parentNode._enabled){h.cancelBubble=true;if(h.preventDefault){h.preventDefault();}else{h.returnValue=false;}
+return false;}
+var g=h.target||h.srcElement;if(typeof g.className!="undefined"&&g.className=="dhxform_info"){this.parentNode.parentNode.callEvent("onInfo",[this.parentNode.parentNode._idd,h]);h.cancelBubble=true;if(h.preventDefault){h.preventDefault();}else{h.returnValue=false;}
+return false;}
+a.doClick(this.parentNode.parentNode);};},doClick:function(a){a.childNodes[a._ll?0:1].childNodes[0].focus();if(!a._enabled||a._ro){return;}
+if(a.checkEvent("onBeforeChange")){if(a.callEvent("onBeforeChange",[a._idd,a._value,a._checked])!==true){return;}}
+this.setChecked(a,!a._checked);a._autoCheck();a.callEvent("onChange",[a._idd,a._value,a._checked]);},doCheckValue:function(a){if(a._checked&&a._enabled){a.childNodes[a._ll?1:0].firstChild.name=String(a._idd);a.childNodes[a._ll?1:0].firstChild.value=this.getValue(a);}else{a.childNodes[a._ll?1:0].firstChild.name="";a.childNodes[a._ll?1:0].firstChild.value="";}},setChecked:function(a,c){a._checked=c===true?true:false;a.childNodes[a._ll?1:0].lastChild.className=a.childNodes[a._ll?1:0].lastChild.className.replace(/chbx[0-1]{1}/gi,"")+(a._checked?" chbx1":" chbx0");this.doCheckValue(a);},check:function(a){this.setChecked(a,true);},unCheck:function(a){this.setChecked(a,false);},isChecked:function(a){return a._checked;},enable:function(a){if(String(a.className).search("disabled")>=0){a.className=String(a.className).replace(/disabled/gi,"");}
+a._enabled=true;a.childNodes[a._ll?0:1].childNodes[0].tabIndex=0;a.childNodes[a._ll?0:1].childNodes[0].removeAttribute("disabled");this.doCheckValue(a);},disable:function(a){if(String(a.className).search("disabled")<0){a.className+=" disabled";}
+a._enabled=false;if(a._updateImgNode!=null){a._updateImgNode(a,false);}
+a.childNodes[a._ll?0:1].childNodes[0].tabIndex=-1;a.childNodes[a._ll?0:1].childNodes[0].setAttribute("disabled","true");this.doCheckValue(a);},isEnabled:function(a){return a._enabled;},setText:function(a,c){a.childNodes[a._ll?0:1].childNodes[0].innerHTML=c+(a._required?"*":"");},getText:function(a){return a.childNodes[a._ll?0:1].childNodes[0].innerHTML.replace(/[^<]*<\/span>/g,"");},setValue:function(a,c){this.setChecked(a,c===true||parseInt(c)==1||c=="true"||a._value===c);},getValue:function(a,c){if(c=="realvalue"){return a._value;}
+return typeof a._value=="undefined"||a._value==null?(a._checked?1:0):a._value;},setReadonly:function(a,c){a._ro=c===true;},isReadonly:function(a){return a._ro;},setFocus:function(a){a.childNodes[a._ll?0:1].childNodes[0].focus();},};dhtmlXForm.prototype.items.radio={input:{},r:{},firstValue:{},render:function(e,g,c){e._type="ra";e._enabled=true;e._checked=false;e._group=g.name;e._value=g.value;e._uid=c;e._ro=g.readonly==true;e._rName=e._rId+e._group;this.r[e._idd]=e;g.inputWidth=14;this.doAddLabel(e,g);this.doAddInput(e,g,"INPUT","TEXT",true,true,"dhxform_textarea");e.childNodes[e._ll?1:0].className+=" dhxform_img_node";var h=document.createElement("DIV");h.className="dhxform_img rdbt0";e.appendChild(h);if(!isNaN(g.inputLeft)){e.childNodes[e._ll?1:0].style.left=parseInt(g.inputLeft)+"px";}
+if(!isNaN(g.inputTop)){e.childNodes[e._ll?1:0].style.top=parseInt(g.inputTop)+"px";}
+e.childNodes[e._ll?1:0].appendChild(h);e.childNodes[e._ll?1:0].firstChild.name="";e.childNodes[e._ll?1:0].firstChild.value="";e._updateImgNode=function(l,m){var j=l.childNodes[l._ll?1:0].lastChild;j.className=(m?"dhxform_actv_r":"dhxform_img")+" "+(l._checked?"rdbt1":"rdbt0");l=j=null;};e._doOnFocus=function(j){j.getForm().callEvent("onFocus",[j._group,j._value]);};e._doOnBlur=function(j){j.getForm().callEvent("onBlur",[j._group,j._value]);};e._doOnKeyUpDown=function(l,j){this.callEvent(l,[this.childNodes[this._ll?0:1].childNodes[0],j,this._group,this._value]);};if(this.input[e._rName]==null){var a=document.createElement("INPUT");a.type="HIDDEN";a.name=g.name;a.firstValue=e._value;e.appendChild(a);this.input[e._rName]=a;}
+if(!this.firstValue[e._rName]){this.firstValue[e._rName]=g.value;}
+if(g.checked==true){this.check(e);}
+if(g.hidden==true){this.hide(e);}
+if(g.disabled==true){this.userDisable(e);}
+this.doAttachEvents(e);return this;},destruct:function(g,h){if(g.lastChild==this.input[g._rName]){var e=false;for(var c in this.r){if(!e&&this.r[c]._group==g._group&&this.r[c]._idd!=g._idd){this.r[c].appendChild(this.input[g._rName]);e=true;}}
+if(!e){this.input[g._rName].parentNode.removeChild(this.input[g._rName]);this.input[g._rName]=null;this.firstValue[g._rName]=null;}}
+var j=g._idd;g._doOnFocus=g._doOnBlur=g._updateImgNode=null;this.doUnloadNestedLists(g);this.doDestruct(g);return j;},doClick:function(c){c.childNodes[c._ll?0:1].childNodes[0].focus();if(!(c._enabled&&!c._checked)){return;}
+if(c._ro){return;}
+var a=[c._group,c._value,true];if(c.checkEvent("onBeforeChange")){if(c.callEvent("onBeforeChange",a)!==true){return;}}
+this.setChecked(c,true);c.getForm()._autoCheck();c.callEvent("onChange",a);},doCheckValue:function(e){var g=null;for(var c in this.r){if(this.r[c]._checked&&this.r[c]._group==e._group&&this.r[c]._rId==e._rId){g=this.r[c]._value;}}
+if(g!=null&&this.r[c]._enabled){this.input[e._rName].name=String(e._group);this.input[e._rName].value=g;}else{this.input[e._rName].name="";this.input[e._rName].value="";}
+this.input[e._rName]._value=g;},setChecked:function(h,j){j=j===true;for(var c in this.r){if(this.r[c]._group==h._group&&this.r[c]._rId==h._rId){var g=false;if(this.r[c]._idd==h._idd){if(this.r[c]._checked!=j){this.r[c]._checked=j;g=true;}}else{if(this.r[c]._checked){this.r[c]._checked=false;g=true;}}
+if(g){var e=this.r[c].childNodes[this.r[c]._ll?1:0].childNodes[1];e.className=e.className.replace(/rdbt[0-1]{1}/gi,"")+(this.r[c]._checked?" rdbt1":" rdbt0");e=null;}}}
+this.doCheckValue(h);},getChecked:function(a){return this.input[a._rName]._value;},_getFirstValue:function(a){return this.firstValue[a._rName];},_getId:function(a){return a._idd;},setValue:function(a,c){},};(function(){for(var c in{doAddLabel:1,doAddInput:1,doDestruct:1,doUnloadNestedLists:1,doAttachEvents:1,check:1,unCheck:1,isChecked:1,enable:1,disable:1,isEnabled:1,setText:1,getText:1,getValue:1,setReadonly:1,isReadonly:1,setFocus:1,}){dhtmlXForm.prototype.items.radio[c]=dhtmlXForm.prototype.items.checkbox[c];}})();dhtmlXForm.prototype.items.select={render:function(a,c){a._type="se";a._enabled=true;a._value=null;a._newValue=null;this.doAddLabel(a,c);this.doAddInput(a,c,"SELECT",null,true,true,"dhxform_select");this.doAttachEvents(a);this.doLoadOpts(a,c);if(c.connector!=null){this.doLoadOptsConnector(a,c.connector);}
+if(typeof c.value!="undefined"&&c.value!=null){this.setValue(a,c.value);}
+return this;},destruct:function(a){this.doUnloadNestedLists(a);a.callEvent=null;a.checkEvent=null;a.getForm=null;a._autoCheck=null;a._enabled=null;a._idd=null;a._type=null;a._value=null;a._newValue=null;a.onselectstart=null;a.childNodes[a._ll?1:0].childNodes[0].onclick=null;a.childNodes[a._ll?1:0].childNodes[0].onkeydown=null;a.childNodes[a._ll?1:0].childNodes[0].onchange=null;a.childNodes[a._ll?1:0].childNodes[0].onfocus=null;a.childNodes[a._ll?1:0].childNodes[0].onblur=null;a.childNodes[a._ll?1:0].childNodes[0].onkeyup=null;a.childNodes[a._ll?1:0].removeChild(a.childNodes[a._ll?1:0].childNodes[0]);while(a.childNodes.length>0){a.removeChild(a.childNodes[0]);}
+a.parentNode.removeChild(a);a=null;},doAddLabel:function(c,e){var a=document.createElement("DIV");a.className="dhxform_label "+e.labelAlign;a.innerHTML="";if(e.wrap==true){a.style.whiteSpace="normal";}
+if(typeof e.tooltip!="undefined"){a.title=e.tooltip;}
+c.appendChild(a);if(typeof e.label=="undefined"||e.label==null||e.label.length==0){a.style.display="none";}
+if(!isNaN(e.labelWidth)){a.style.width=parseInt(e.labelWidth)+"px";}
+if(!isNaN(e.labelHeight)){a.style.height=parseInt(e.labelHeight)+"px";}
+if(!isNaN(e.labelLeft)){a.style.left=parseInt(e.labelLeft)+"px";}
+if(!isNaN(e.labelTop)){a.style.top=parseInt(e.labelTop)+"px";}
+if(e.info){a.onclick=function(h){h=h||event;var g=h.target||h.srcElement;if(typeof g.className!="undefined"&&g.className=="dhxform_info"){this.parentNode.callEvent("onInfo",[this.parentNode._idd,h]);h.cancelBubble=true;if(h.preventDefault){h.preventDefault();}else{h.returnValue=false;}
+return false;}};}},doAttachEvents:function(e){var a=e.childNodes[e._ll?1:0].childNodes[0];var c=this;a.onclick=function(){c.doOnChange(this);};a.onkeydown=function(g){g=g||event;c.doOnChange(this);this.parentNode.parentNode.callEvent("onKeyDown",[this,g,this.parentNode.parentNode._idd]);};a.onchange=function(){c.doOnChange(this);};a.onkeyup=function(g){g=g||event;this.parentNode.parentNode.callEvent("onKeyUp",[this,g,this.parentNode.parentNode._idd]);};a=null;this.doAttachChangeLS(e);},doAttachChangeLS:function(c){var a=c.childNodes[c._ll?1:0].childNodes[0];a.onfocus=function(){var e=this.parentNode.parentNode;e.getForm()._ccActivate(e._idd,this,e.getForm().getItemValue(e._idd,true));e.getForm().callEvent("onFocus",[e._idd]);e=null;};a.onblur=function(){var e=this.parentNode.parentNode;e.getForm()._ccDeactivate(e._idd);e.getForm().callEvent("onBlur",[e._idd]);e=null;};a=null;},doValidate:function(a){if(a.getForm().live_validate){this._validate(a);}},doLoadOpts:function(l,h,n){var m=l.childNodes[l._ll?1:0].childNodes[0];var a=h.options;var g=false;for(var c=0;c=0){l._value=m.options[m.selectedIndex].value;}
+if(n===true){l.callEvent("onOptionsLoaded",[l._idd]);}
+this._checkNoteWidth(l);},doLoadOptsConnector:function(e,a){var c=this;e._connector_working=true;window.dhx4.ajax.get(a,function(l){l=l.xmlDoc.responseXML;if(l==null){return;}
+var g=l.getElementsByTagName("data");if(g==null||g[0]==null){return;}
+g=g[0];var j=[];for(var m=0;m=0?e.options[e.selectedIndex].value:null;if(a._newValue!=a._value){if(a.checkEvent("onBeforeChange")){if(a.callEvent("onBeforeChange",[a._idd,a._value,a._newValue])!==true){for(var c=0;c*":"");a.childNodes[a._ll?0:1].style.display=c.length==0||c==null?"none":"";},getText:function(a){return a.childNodes[a._ll?0:1].childNodes[0].innerHTML.replace(/[^<]*<\/span>/g,"");},enable:function(a){if(String(a.className).search("disabled")>=0){a.className=String(a.className).replace(/disabled/gi,"");}
+a._enabled=true;a.childNodes[a._ll?1:0].childNodes[0].removeAttribute("disabled");},disable:function(a){if(String(a.className).search("disabled")<0){a.className+=" disabled";}
+a._enabled=false;a.childNodes[a._ll?1:0].childNodes[0].setAttribute("disabled",true);},getOptions:function(a){return a.childNodes[a._ll?1:0].childNodes[0].options;},setValue:function(c,g){if(c._connector_working){c._connector_value=g;return;}
+var a=this.getOptions(c);for(var e=0;e0){c.getForm()._autoCheck();}
+c.getForm()._ccReload(c._idd,c._value);},getValue:function(e){var a=-1;var c=this.getOptions(e);for(var g=0;g=0&&a._w=="auto"){a.style.width=c.childNodes[c._ll?1:0].childNodes[0].offsetWidth+"px";}}
+a=null;},};(function(){for(var c in{doAddInput:1,doUnloadNestedLists:1,isEnabled:1}){dhtmlXForm.prototype.items.select[c]=dhtmlXForm.prototype.items.checkbox[c];}})();dhtmlXForm.prototype.items.multiselect={doLoadOpts:function(g,j,l){var c=g.childNodes[g._ll?1:0].childNodes[0];c.multiple=true;if(!isNaN(j.size)){c.size=Number(j.size);}
+g._value=[];g._newValue=[];var e=j.options;for(var h=0;h=0){a.className=String(a.className).replace(/disabled/gi,"");}
+a._enabled=true;},disable:function(a){if(String(a.className).search("disabled")<0){a.className+=" disabled";}
+a._enabled=false;},setText:function(a,c){a.firstChild.innerHTML=c;},getText:function(a){return a.firstChild.innerHTML;},};(function(){for(var c in{doUnloadNestedLists:1,isEnabled:1}){dhtmlXForm.prototype.items.label[c]=dhtmlXForm.prototype.items.checkbox[c];}})();dhtmlXForm.prototype.items.button={render:function(c,e){c._type="bt";c._enabled=true;c._name=e.name;c.className=String(c.className).replace("item_label_top","item_label_left").replace("item_label_right","item_label_left");c._doOnKeyUpDown=function(h,g){this.callEvent(h,[this.childNodes[0].childNodes[0],g,this._idd]);};c.innerHTML='';if(!isNaN(e.width)){var a=Math.max(e.width,10);if(dhtmlXForm.prototype.items[this.t]._dim==null){c.firstChild.style.width=a+"px";dhtmlXForm.prototype.items[this.t]._dim=c.getForm()._checkDim(c,c.firstChild);}
+c.firstChild.style.width=a-dhtmlXForm.prototype.items[this.t]._dim+"px";c.firstChild.firstChild.className+=" dhxform_btn_txt_autowidth";}
+if(!isNaN(e.inputLeft)){c.childNodes[0].style.left=parseInt(e.inputLeft)+"px";}
+if(!isNaN(e.inputTop)){c.childNodes[0].style.top=parseInt(e.inputTop)+"px";}
+if(e.hidden==true){this.hide(c);}
+if(e.disabled==true){this.userDisable(c);}
+if(typeof e.tooltip!="undefined"){c.firstChild.title=e.tooltip;}
+c.onselectstart=function(g){g=g||event;g.cancelBubble=true;if(g.preventDefault){g.preventDefault();}else{g.returnValue=false;}
+return false;};c.firstChild.onselectstart=function(g){g=g||event;g.cancelBubble=true;if(g.preventDefault){g.preventDefault();}else{g.returnValue=false;}
+return false;};c.firstChild.onkeypress=function(g){g=g||event;if((g.keyCode==32||g.charCode==32||g.keyCode==13||g.charCode==13)&&!this.parentNode._busy){this.parentNode._busy=true;g.cancelBubble=true;if(g.preventDefault){g.preventDefault();}else{g.returnValue=false;}
+_dhxForm_doClick(this.childNodes[0],["mousedown","mouseup"]);return false;}};c.firstChild.onfocus=function(){this.parentNode._doOnFocus(this.parentNode);};c.firstChild.onblur=function(){_dhxForm_doClick(this.childNodes[0],"mouseout");this.parentNode._doOnBlur(this.parentNode);};c.firstChild.onkeyup=function(g){this.parentNode._doOnKeyUpDown("onKeyUp",g||event);};c.firstChild.onkeydown=function(g){this.parentNode._doOnKeyUpDown("onKeyDown",g||event);};c.firstChild.onmouseover=function(){var g=this.parentNode;if(!g._enabled){return;}
+this._isOver=true;this.className="dhxform_btn dhxform_btn_over";g=null;};c.firstChild.onmouseout=function(){var g=this.parentNode;if(!g._enabled){return;}
+this.className="dhxform_btn";this._allowClick=false;this._pressed=false;this._isOver=false;g=null;};c.firstChild.ontouchstart=c.firstChild.onmousedown=function(h){h=h||event;if(h.type=="touchstart"&&h.preventDefault){h.preventDefault();}
+if(h.button>=2){return;}
+if(this._pressed){return;}
+var g=this.parentNode;if(!g._enabled){return;}
+this.className="dhxform_btn dhxform_btn_pressed";this._allowClick=true;this._pressed=true;g=null;};c.firstChild.ontouchend=c.firstChild.onmouseup=function(h){h=h||event;if(h.button>=2){return;}
+if(!this._pressed){return;}
+var g=this.parentNode;if(!g._enabled){return;}
+g._busy=false;this.className="dhxform_btn"+(this._isOver?" dhxform_btn_over":"");if(this._pressed&&this._allowClick){g.callEvent("_onButtonClick",[g._name,g._cmd]);}
+this._allowClick=false;this._pressed=false;g=null;};c._doOnFocus=function(g){g.getForm().callEvent("onFocus",[g._idd]);};c._doOnBlur=function(g){g.getForm().callEvent("onBlur",[g._idd]);};return this;},destruct:function(a){this.doUnloadNestedLists(a);a.callEvent=null;a.checkEvent=null;a.getForm=null;a._autoCheck=null;a._type=null;a._enabled=null;a._cmd=null;a._name=null;a._doOnFocus=null;a._doOnBlur=null;a._doOnKeyUpDown=null;a.onselectstart=null;a.firstChild.onselectstart=null;a.firstChild.onkeypress=null;a.firstChild.ontouchstart=null;a.firstChild.ontouchend=null;a.firstChild.onfocus=null;a.firstChild.onblur=null;a.firstChild.onkeyup=null;a.firstChild.onkeydown=null;a.firstChild.onmouseover=null;a.firstChild.onmouseout=null;a.firstChild.onmousedown=null;a.firstChild.onmouseup=null;while(a.childNodes.length>0){a.removeChild(a.childNodes[0]);}
+a.parentNode.removeChild(a);a=null;},enable:function(a){if(String(a.className).search("disabled")>=0){a.className=String(a.className).replace(/disabled/gi,"");}
+a._enabled=true;a.childNodes[0].removeAttribute("disabled");a.childNodes[0].setAttribute("role","link");a.childNodes[0].setAttribute("tabIndex","0");},disable:function(a){if(String(a.className).search("disabled")<0){a.className+=" disabled";}
+a._enabled=false;a.childNodes[0].setAttribute("disabled","true");a.childNodes[0].removeAttribute("role");a.childNodes[0].removeAttribute("tabIndex");},setText:function(a,c){a.childNodes[0].childNodes[0].innerHTML=c;},getText:function(a){return a.childNodes[0].childNodes[0].innerHTML;},setFocus:function(a){a.childNodes[0].focus();},};(function(){for(var c in{doUnloadNestedLists:1,isEnabled:1}){dhtmlXForm.prototype.items.button[c]=dhtmlXForm.prototype.items.checkbox[c];}})();dhtmlXForm.prototype.items.hidden={_index:false,render:function(c,e){c.style.display="none";c._name=e.name;c._type="hd";c._enabled=true;var a=document.createElement("INPUT");a.type="HIDDEN";a.name=e.name;a.value=e.value||"";c.appendChild(a);return this;},destruct:function(a){this.doUnloadNestedLists(a);while(a.childNodes.length>0){a.removeChild(a.childNodes[0]);}
+a._autoCheck=null;a._name=null;a._type=null;a._enabled=null;a.onselectstart=null;a.callEvent=null;a.checkEvent=null;a.getForm=null;a.parentNode.removeChild(a);a=null;},enable:function(a){a._enabled=true;a.childNodes[0].setAttribute("name",a._name);},disable:function(a){a._enabled=false;a.childNodes[0].removeAttribute("name");},show:function(){},hide:function(){},isHidden:function(){return true;},setValue:function(a,c){a.childNodes[0].value=c;},getValue:function(a){return a.childNodes[0].value;},getInput:function(a){return a.childNodes[0];},};(function(){for(var c in{doUnloadNestedLists:1,isEnabled:1}){dhtmlXForm.prototype.items.hidden[c]=dhtmlXForm.prototype.items.checkbox[c];}})();dhtmlXForm.prototype.items.list={_index:false,render:function(a,c){a._type="list";a._enabled=true;a._isNestedForm=true;a.style.paddingLeft=a._ofsNested+"px";a.className="dhxform_base_nested"+(a._custom_css||"");return[this,new dhtmlXForm(a,null,c)];},destruct:function(a){},};dhtmlXForm.prototype.items.fieldset={_index:false,render:function(c,g){c._type="fs";if(typeof parseInt(g.inputWidth)=="number"){}
+c._width=g.width;c._enabled=true;c._checked=true;c.className="fs_"+g.position+(typeof g.className=="string"?" "+g.className:"");var e=document.createElement("FIELDSET");e.className="dhxform_fs";var h=String(g.labelAlign).replace("align_","");e.innerHTML="";c.appendChild(e);if(!isNaN(g.inputLeft)){e.style.left=parseInt(g.inputLeft)+"px";}
+if(!isNaN(g.inputTop)){e.style.top=parseInt(g.inputTop)+"px";}
+if(g.inputWidth!="auto"){if(!isNaN(g.inputWidth)){e.style.width=parseInt(g.inputWidth)+"px";var a=parseInt(e.style.width);if(e.offsetWidth>a){e.style.width=a+(a-e.offsetWidth)+"px";}}}
+c._addSubListNode=function(){var j=document.createElement("DIV");j._custom_css=" dhxform_fs_nested";this.childNodes[0].appendChild(j);return j;};if(g.hidden==true){this.hide(c);}
+if(g.disabled==true){this.userDisable(c);}
+return this;},destruct:function(a){this.doUnloadNestedLists(a);a._checked=null;a._enabled=null;a._idd=null;a._type=null;a._width=null;a.onselectstart=null;a._addSubListNode=null;a._autoCheck=null;a.callEvent=null;a.checkEvent=null;a.getForm=null;while(a.childNodes.length>0){a.removeChild(a.childNodes[0]);}
+a.parentNode.removeChild(a);a=null;},setText:function(a,c){a.childNodes[0].childNodes[0].innerHTML=c;},getText:function(a){return a.childNodes[0].childNodes[0].innerHTML;},enable:function(a){a._enabled=true;if(String(a.className).search("disabled")>=0){a.className=String(a.className).replace(/disabled/gi,"");}},disable:function(a){a._enabled=false;if(String(a.className).search("disabled")<0){a.className+=" disabled";}},setWidth:function(c,a){c.childNodes[0].style.width=a+"px";c._width=a;},getWidth:function(a){return a._width;},};(function(){for(var c in{doUnloadNestedLists:1,isEnabled:1}){dhtmlXForm.prototype.items.fieldset[c]=dhtmlXForm.prototype.items.checkbox[c];}})();dhtmlXForm.prototype.items.block={_index:false,render:function(c,e){c._type="bl";c._width=e.width;c._enabled=true;c._checked=true;c.className="block_"+e.position+(typeof e.className=="string"?" "+e.className:"");var a=document.createElement("DIV");a.className="dhxform_obj_"+c.getForm().skin+" dhxform_block";a.style.fontSize=c.getForm().cont.style.fontSize;if(e.style){a.style.cssText=e.style;}
+if(typeof e.id!="undefined"){a.id=e.id;}
+c.appendChild(a);if(!isNaN(e.inputLeft)){a.style.left=parseInt(e.inputLeft)+"px";}
+if(!isNaN(e.inputTop)){a.style.top=parseInt(e.inputTop)+"px";}
+if(e.inputWidth!="auto"){if(!isNaN(e.inputWidth)){a.style.width=parseInt(e.inputWidth)+"px";}}
+if(!isNaN(e.blockOffset)){c._ofsNested=e.blockOffset;}
+c._addSubListNode=function(){var g=document.createElement("DIV");g._inBlcok=true;if(typeof this._ofsNested!="undefined"){g._ofsNested=this._ofsNested;}
+this.childNodes[0].appendChild(g);return g;};if(e.hidden==true){this.hide(c);}
+if(e.disabled==true){this.userDisable(c);}
+return this;},_setCss:function(a,e,c){a.firstChild.className="dhxform_obj_"+e+" dhxform_block";a.firstChild.style.fontSize=c;},};(function(){for(var c in{enable:1,disable:1,isEnabled:1,setWidth:1,getWidth:1,doUnloadNestedLists:1,destruct:1}){dhtmlXForm.prototype.items.block[c]=dhtmlXForm.prototype.items.fieldset[c];}})();dhtmlXForm.prototype.items.newcolumn={_index:false};dhtmlXForm.prototype.items.template={render:function(c,e){var a=!isNaN(e.rows);c._type="tp";c._enabled=true;if(e.format!=null){if(typeof e.format=="function"){c.format=e.format;}else{if(typeof e.format=="string"&&typeof window[e.format]=="function"){c.format=window[e.format];}}}
+if(c.format==null){c.format=function(g,h){return h;};}
+this.doAddLabel(c,e);this.doAddInput(c,e,"DIV",null,true,true,"dhxform_item_template");this.setValue(c,e.value||"");return this;},destruct:function(a){a.format=null;this.d2(a);a=null;},setValue:function(a,c){a._value=c;a.childNodes[a._ll?1:0].childNodes[0].innerHTML=a.format(a._idd,a._value);},getValue:function(a){return a._value;},enable:function(a){if(String(a.className).search("disabled")>=0){a.className=String(a.className).replace(/disabled/gi,"");}
+a._enabled=true;},disable:function(a){if(String(a.className).search("disabled")<0){a.className+=" disabled";}
+a._enabled=false;},};(function(){dhtmlXForm.prototype.items.template.d2=dhtmlXForm.prototype.items.input.destruct;for(var c in{doAddLabel:1,doAddInput:1,doUnloadNestedLists:1,setText:1,getText:1,isEnabled:1,setWidth:1}){dhtmlXForm.prototype.items.template[c]=dhtmlXForm.prototype.items.select[c];}})();dhtmlXForm.prototype._ulToObject=function(j,o){var l=[];for(var c=0;c=0){this.cont.className=String(this.cont.className).replace(/dhxform_rtl/gi,"");}}};_dhxForm_doClick=function(h,c){if(typeof c=="object"){var a=c[1];c=c[0];}
+if(document.createEvent){var g=document.createEvent("MouseEvents");g.initEvent(c,true,false);h.dispatchEvent(g);}else{if(document.createEventObject){var g=document.createEventObject();g.button=1;h.fireEvent("on"+c,g);}}
+if(a){window.setTimeout(function(){_dhxForm_doClick(h,a);},100);}};dhtmlXForm.prototype.setFormData=function(e){for(var c in e){var g=this.getItemType(c);switch(g){case"checkbox":this[e[c]==true||parseInt(e[c])==1||e[c]=="true"||e[c]==this.getItemValue(c,"realvalue")?"checkItem":"uncheckItem"](c);break;case"radio":this.checkItem(c,e[c]);break;case"input":case"textarea":case"password":case"select":case"multiselect":case"hidden":case"template":case"combo":case"calendar":case"colorpicker":case"editor":this.setItemValue(c,e[c]);break;default:if(this["setFormData_"+g]){this["setFormData_"+g](c,e[c]);}else{if(!this.hId){this.hId=this._genStr(12);}
+this.setUserData(this.hId,c,e[c]);}
+break;}}};dhtmlXForm.prototype.getFormData=function(u,j){var c={};var n=this;for(var s in this.itemPull){var m=this.itemPull[s]._idd;var v=this.itemPull[s]._type;if(v=="ch"){c[m]=this.isItemChecked(m)?this.getItemValue(m):0;}
+if(v=="ra"&&!c[this.itemPull[s]._group]){c[this.itemPull[s]._group]=this.getCheckedValue(this.itemPull[s]._group);}
+if(v in{se:1,ta:1,pw:1,hd:1,tp:1,fl:1,calendar:1,combo:1,editor:1,colorpicker:1}){c[m]=this.getItemValue(m,u);}
+if(this["getFormData_"+v]){c[m]=this["getFormData_"+v](m);}
+if(v=="up"){var h=this.getItemValue(m);for(var g in h){c[g]=h[g];}}
+if(this.itemPull[s]._list){for(var e=0;eh){h=this.base[l].offsetHeight;}}
+var g=false;try{g=this.cont.parentNode.parentNode.parentNode.parentNode._isCell==true;if(g){var a=this.cont.parentNode.parentNode.parentNode.parentNode;}}catch(m){}
+if(g&&typeof a!="undefined"){if(j>0){a.setWidth(j+10);}
+if(h>0){a.setHeight(h+a.firstChild.firstChild.offsetHeight+5);}
+g=a=null;return;}
+var c=false;try{c=this.cont.parentNode.parentNode.parentNode._isWindow==true;if(c){var n=this.cont.parentNode.parentNode;if(typeof n.callEvent=="function"){this.cont.style.display="none";n.callEvent("_setCellSize",[j+15,h+15]);this.cont.style.display="";}}}catch(m){}};dhtmlXForm.prototype.reset=function(){if(this.callEvent("onBeforeReset",[this.formId,this.getFormData()])){if(this._last_load_data){this.setFormData(this._last_load_data);}
+this.callEvent("onAfterReset",[this.formId]);}};dhtmlXForm.prototype.send=function(c,l,m,g){if(typeof l=="function"){m=l;l="post";}else{l=l=="get"?"get":"post";}
+if(g!==true&&!this.validate()){return;}
+var j=this.getFormData(true);var h=[];for(var e in j){h.push(e+"="+encodeURIComponent(j[e]));}
+var a=function(n){if(m){m.call(this,n,n.xmlDoc.responseText);}};if(l=="get"){window.dhx4.ajax.get(c+(c.indexOf("?")==-1?"?":"&")+h.join("&"),a);}else{window.dhx4.ajax.post(c,h.join("&"),a);}};dhtmlXForm.prototype.save=function(a,c){};dhtmlXForm.prototype.dummy=function(){};dhtmlXForm.prototype._changeFormId=function(c,a){this.formId=a;};dhtmlXForm.prototype._dp_init=function(a){a._methods=["dummy","dummy","_changeFormId","dummy"];a._getRowData=function(g,c){var e=this.obj.getFormData(true);e[this.action_param]=this.obj.getUserData(g,this.action_param);return e;};a._clearUpdateFlag=function(){};a.attachEvent("onAfterUpdate",function(e,g,h,c){if(g=="inserted"||g=="updated"){this.obj.resetDataProcessor("updated");this.obj._last_load_data=this.obj.getFormData(true);}
+this.obj.callEvent("onAfterSave",[this.obj.formId,c]);return true;});a.autoUpdate=false;a.setTransactionMode("POST",true);this.dp=a;this.formId=new Date().valueOf();this.resetDataProcessor("inserted");this.save=function(){if(!this.callEvent("onBeforeSave",[this.formId,this.getFormData()])){return;}
+if(!this.validate()){return;}
+a.sendData();};};dhtmlXForm.prototype.resetDataProcessor=function(a){if(!this.dp){return;}
+this.dp.updatedRows=[];this.dp._in_progress=[];this.dp.setUpdated(this.formId,true,a);};dhtmlXForm.prototype._ccActivate=function(e,a,c){if(!this._formLS){this._formLS={};}
+if(!this._formLS[e]){this._formLS[e]={input:a,value:c};}
+if(!this._ccActive){this._ccActive=true;this._ccDo();}
+a=null;};dhtmlXForm.prototype._ccDeactivate=function(a){if(this._ccTm){window.clearTimeout(this._ccTm);}
+this._ccActive=false;if(this._formLS!=null&&this._formLS[a]!=null){this._formLS[a].input=null;this._formLS[a]=null;delete this._formLS[a];}};dhtmlXForm.prototype._ccDo=function(){if(this._ccTm){window.clearTimeout(this._ccTm);}
+for(var c in this._formLS){var h=this._formLS[c].input;if(String(h.tagName).toLowerCase()=="select"){var e="";if(h.selectedIndex>=0&&h.selectedIndex=0){this.cont.className=this.cont.className.replace(/\s{0,}combo_in_focus/gi,"");}
+h.callEvent("onBlur",[g._idd]);h=g=null;});return this;},destruct:function(a){a.childNodes[a._ll?1:0].childNodes[0].onchange=null;a._combo._currentComboValue=null;a._combo.unload();a._combo=null;a._apiChange=null;this.d2(a);a=null;},doAttachEvents:function(c){var a=this;c.childNodes[c._ll?1:0].childNodes[0].onchange=function(){a.doOnChange(this);a.doValidate(this.DOMParent.parentNode.parentNode);};},doValidate:function(a){if(a.getForm().hot_validate){this._validate(a);}},doOnChange:function(c){var a=c.base.parentNode.parentNode.parentNode;if(a._apiChange){return;}
+c._newComboValue=c.getSelectedValue();if(c._newComboValue!=c._currentComboValue){if(a.checkEvent("onBeforeChange")){if(a.callEvent("onBeforeChange",[a._idd,c._currentComboValue,c._newComboValue])!==true){window.setTimeout(function(){c.setComboValue(c._currentComboValue);},1);return false;}}
+c._currentComboValue=c._newComboValue;a.callEvent("onChange",[a._idd,c._currentComboValue]);}
+a._autoCheck(a._enabled);},doLoadOptsConnector:function(g,a){var e=this;var c=g;g._connector_working=true;g._apiChange=true;g._combo.load(a,function(){c.callEvent("onOptionsLoaded",[c._idd]);c._connector_working=false;if(c._connector_value!=null){e.setValue(c,c._connector_value);c._connector_value=null;}
+c._apiChange=false;e=c=null;});},enable:function(a){if(String(a.className).search("disabled")>=0){a.className=String(a.className).replace(/disabled/gi,"");}
+a._enabled=true;a._combo.enable();},disable:function(a){if(String(a.className).search("disabled")<0){a.className+=" disabled";}
+a._enabled=false;a._combo.disable();},getCombo:function(a){return a._combo;},setValue:function(a,c){if(a._connector_working){a._connector_value=c;return;}
+a._apiChange=true;a._combo.setComboValue(c);a._combo._currentComboValue=a._combo.getActualValue();a._apiChange=false;},getValue:function(a){return a._combo.getActualValue();},setWidth:function(c,a){c.childNodes[c._ll?1:0].childNodes[0].style.width=a+"px";},setReadonly:function(a,c){if(!a._combo){return;}
+a._combo_ro=c;a._combo.readonly(a._combo_ro);},isReadonly:function(a,c){return a._combo_ro||false;},setFocus:function(a){if(a._enabled){a._combo.setFocus();}},_setCss:function(a,e,c){a._combo.setFontSize(c,c);},};(function(){for(var c in{doAddLabel:1,doAddInput:1,doLoadOpts:1,doUnloadNestedLists:1,setText:1,getText:1,isEnabled:1,_checkNoteWidth:1}){dhtmlXForm.prototype.items.combo[c]=dhtmlXForm.prototype.items.select[c];}})();dhtmlXForm.prototype.items.combo.d2=dhtmlXForm.prototype.items.select.destruct;dhtmlXForm.prototype.getCombo=function(a){return this.doWithItem(a,"getCombo");};dhtmlXForm.prototype.items.calendar={render:function(e,h){var c=this;e._type="calendar";e._enabled=true;var j=navigator.userAgent;var a=j.indexOf("MSIE 6.0")>=0||j.indexOf("MSIE 7.0")>=0||j.indexOf("MSIE 8.0")>=0;this.doAddLabel(e,h);this.doAddInput(e,h,"INPUT","TEXT",true,true,"dhxform_textarea calendar");this.doAttachChangeLS(e);if(a){e.childNodes[e._ll?1:0].childNodes[0].onfocus2=e.childNodes[e._ll?1:0].childNodes[0].onfocus;e.childNodes[e._ll?1:0].childNodes[0].onfocus=function(){if(this._skipOnFocus==true){this._skipOnFocus=false;return;}
+this.onfocus2.apply(this,arguments);};}
+e.childNodes[e._ll?1:0].childNodes[0]._idd=e._idd;e.childNodes[e._ll?1:0].childNodes[0].onblur=function(){var l=this.parentNode.parentNode;if(l._c.base._formMouseDown){l._c.base._formMouseDown=false;this._skipOnFocus=true;this.focus();this.value=this.value;l=null;return true;}
+var m=l.getForm();m._ccDeactivate(l._idd);c.checkEnteredValue(this.parentNode.parentNode);if(m.live_validate){c._validate(l);}
+m.callEvent("onBlur",[l._idd]);if(!l._c.isVisible()){l._tempValue=null;}
+m=l=null;};e._f=h.dateFormat||null;e._f0=h.serverDateFormat||e._f;var g=e.getForm();e._c=new dhtmlXCalendarObject(e.childNodes[e._ll?1:0].childNodes[0],h.skin||g.skin||"dhx_skyblue");e._c._nullInInput=true;e._c.enableListener(e.childNodes[e._ll?1:0].childNodes[0]);if(e._f!=null){e._c.setDateFormat(e._f);}
+if(!window.dhx4.s2b(h.enableTime)){e._c.hideTime();}
+if(window.dhx4.s2b(h.showWeekNumbers)){e._c.showWeekNumbers();}
+if(!isNaN(h.weekStart)){e._c.setWeekStartDay(h.weekStart);}
+if(typeof h.calendarPosition!="undefined"){e._c.setPosition(h.calendarPosition);}
+if(h.minutesInterval!=null){e._c.setMinutesInterval(h.minutesInterval);}
+e._c._itemIdd=e._idd;e._c.attachEvent("onBeforeChange",function(l){if(e._value!=l){if(e.checkEvent("onBeforeChange")){if(e.callEvent("onBeforeChange",[e._idd,e._value,l])!==true){return false;}}
+e._tempValue=e._value=l;c.setValue(e,l,false);e.callEvent("onChange",[this._itemIdd,e._value]);}
+return true;});e._c.attachEvent("onClick",function(){e._tempValue=null;});e._c.attachEvent("onHide",function(){e._tempValue=null;});if(a){e._c.base.onmousedown=function(){this._formMouseDown=true;return false;};}
+this.setValue(e,h.value);g=null;return this;},getCalendar:function(a){return a._c;},setSkin:function(a,c){a._c.setSkin(c);},setValue:function(c,e,a){if(!e||e==null||typeof e=="undefined"||e==""){c._value=null;c.childNodes[c._ll?1:0].childNodes[0].value="";}else{c._value=e instanceof Date?e:c._c._strToDate(e,c._f0||c._c._dateFormat);c.childNodes[c._ll?1:0].childNodes[0].value=c._c._dateToStr(c._value,c._f||c._c._dateFormat);}
+if(a!==false){c._c.setDate(c._value);}},getValue:function(c,a){var e=c._tempValue||c._c.getDate();if(a===true&&e==null){return"";}
+return a===true?c._c._dateToStr(e,c._f0||c._c._dateFormat):e;},setDateFormat:function(c,a,e){c._f=a;c._f0=e||c._f;c._c.setDateFormat(c._f);this.setValue(c,this.getValue(c));},destruct:function(a){a._c.disableListener(a.childNodes[a._ll?1:0].childNodes[0]);a._c.unload();a._c=null;try{delete a._c;}catch(c){}
+a._f=null;try{delete a._f;}catch(c){}
+a._f0=null;try{delete a._f0;}catch(c){}
+a.childNodes[a._ll?1:0].childNodes[0]._idd=null;a.childNodes[a._ll?1:0].childNodes[0].onblur=null;this.d2(a);a=null;},checkEnteredValue:function(a){this.setValue(a,a._c.getDate());},};(function(){for(var c in{doAddLabel:1,doAddInput:1,doUnloadNestedLists:1,setText:1,getText:1,enable:1,disable:1,isEnabled:1,setWidth:1,setReadonly:1,isReadonly:1,setFocus:1,getInput:1}){dhtmlXForm.prototype.items.calendar[c]=dhtmlXForm.prototype.items.input[c];}})();dhtmlXForm.prototype.items.calendar.doAttachChangeLS=dhtmlXForm.prototype.items.select.doAttachChangeLS;dhtmlXForm.prototype.items.calendar.d2=dhtmlXForm.prototype.items.input.destruct;dhtmlXForm.prototype.getCalendar=function(a){return this.doWithItem(a,"getCalendar");};dhtmlXForm.prototype.setCalendarDateFormat=function(c,a,e){this.doWithItem(c,"setDateFormat",a,e);};dhtmlXForm.prototype.items.btn2state={setChecked:function(a,c){a._checked=c===true?true:false;a.childNodes[a._ll?1:0].lastChild.className="dhxform_img "+a._cssName+"_"+(a._checked?"1":"0");this.doCheckValue(a);},};(function(){for(var c in dhtmlXForm.prototype.items.checkbox){if(!dhtmlXForm.prototype.items.btn2state[c]){dhtmlXForm.prototype.items.btn2state[c]=dhtmlXForm.prototype.items.checkbox[c];}}})();dhtmlXForm.prototype.items.btn2state.render2=dhtmlXForm.prototype.items.btn2state.render;dhtmlXForm.prototype.items.btn2state.render=function(a,c){c._autoInputWidth=false;this.render2(a,c);a._type="btn2state";a._cssName=typeof c.cssName=="undefined"?"btn2state":c.cssName;a._updateImgNode=function(){};a._doOnFocus=function(){a.getForm().callEvent("onFocus",[a._idd]);};a._doOnBlur=function(){a.getForm().callEvent("onBlur",[a._idd]);};a._doOnKeyUpDown=function(g,e,h){this.callEvent(g,[this.childNodes[this._ll?0:1].childNodes[0],e,this._idd]);};this.setChecked(a,a._checked);return this;};dhtmlXForm.prototype.setFormData_btn2state=function(a,c){this[c==true||parseInt(c)==1||c=="true"||c==this.getItemValue(a)?"checkItem":"uncheckItem"](a);};dhtmlXForm.prototype.getFormData_btn2state=function(a){return this.isItemChecked(a)?this.getItemValue(a):0;};dhtmlXForm.prototype.items.colorpicker={colorpicker:{},render:function(e,g){var c=this;e._type="colorpicker";e._enabled=true;this.doAddLabel(e,g);this.doAddInput(e,g,"INPUT","TEXT",true,true,"dhxform_textarea");e._value=g.value||"";e.childNodes[e._ll?1:0].childNodes[0].value=e._value;var a={input:e.childNodes[e._ll?1:0].childNodes[0],custom_colors:window.dhx4.s2b(g.enableCustomColors)==true,skin:e.getForm().skin};this.colorpicker[e._idd]=new dhtmlXColorPicker(a);this.colorpicker[e._idd]._nodes[0].valueColor=null;this.colorpicker[e._idd].base.className+=" dhtmlxcp_in_form";if(typeof g.customColors!="undefined"){this.colorpicker[e._idd].setCustomColors(g.customColors);}
+if(typeof g.cpPosition=="string"){this.colorpicker[e._idd].setPosition(g.cpPosition);}
+this.colorpicker[e._idd].attachEvent("onSelect",function(h){if(e._value!=h){if(e.checkEvent("onBeforeChange")){if(e.callEvent("onBeforeChange",[e._idd,e._value,h])!==true){e.childNodes[e._ll?1:0].childNodes[0].value=e._value;return;}}
+e._value=h;c.setValue(e,h);e.callEvent("onChange",[e._idd,e._value]);}});this.colorpicker[e._idd].attachEvent("onHide",function(h){var j=e.childNodes[e._ll?1:0].childNodes[0];if(j.value!=e._value){j.value=e._value;}
+j=null;});e.childNodes[e._ll?1:0].childNodes[0]._idd=e._idd;return this;},getColorPicker:function(a){return this.colorpicker[a._idd];},destruct:function(a){if(this.colorpicker[a._idd].unload){this.colorpicker[a._idd].unload();}
+this.colorpicker[a._idd]=null;try{delete this.colorpicker[a._idd];}catch(c){}
+a.childNodes[a._ll?1:0].childNodes[0]._idd=null;this.d2(a);a=null;},setSkin:function(a,c){this.colorpicker[a._idd].setSkin(c);},};(function(){for(var c in{doAddLabel:1,doAddInput:1,doUnloadNestedLists:1,setText:1,getText:1,enable:1,disable:1,isEnabled:1,setWidth:1,setReadonly:1,isReadonly:1,setValue:1,getValue:1,updateValue:1,setFocus:1,getInput:1,}){dhtmlXForm.prototype.items.colorpicker[c]=dhtmlXForm.prototype.items.input[c];}})();dhtmlXForm.prototype.items.colorpicker.d2=dhtmlXForm.prototype.items.input.destruct;dhtmlXForm.prototype.getColorPicker=function(a){return this.doWithItem(a,"getColorPicker");};dhtmlXForm.prototype.items.container={render:function(a,c){a._type="container";a._enabled=true;this.doAddLabel(a,c);this.doAddInput(a,c,"DIV",null,true,true,"dhxform_container");return this;},getContainer:function(a){return a.childNodes[a._ll?1:0].childNodes[0];},enable:function(a){a._enabled=true;if(String(a.className).search("disabled")>=0){a.className=String(a.className).replace(/disabled/gi,"");}
+a.callEvent("onEnable",[a._idd]);},disable:function(a){a._enabled=false;if(String(a.className).search("disabled")<0){a.className+=" disabled";}
+a.callEvent("onDisable",[a._idd]);},doAttachEvents:function(){},setValue:function(){},getValue:function(){return null;},};dhtmlXForm.prototype.getContainer=function(a){return this.doWithItem(a,"getContainer");};(function(){for(var c in dhtmlXForm.prototype.items.input){if(!dhtmlXForm.prototype.items.container[c]){dhtmlXForm.prototype.items.container[c]=dhtmlXForm.prototype.items.input[c];}}})();dhtmlXForm.prototype.items.editor={editor:{},render:function(e,g){var a=!isNaN(g.rows);e._type="editor";e._enabled=true;e._editor_id=e.getForm().idPrefix+e._idd;this.doAddLabel(e,g);this.doAddInput(e,g,"DIV",null,true,true,"dhxform_item_template");e._value=g.value||"";var c=this;this.editor[e._editor_id]=new dhtmlXEditor({parent:e.childNodes[e._ll?1:0].childNodes[0],content:e._value,iconsPath:g.iconsPath,toolbar:g.toolbar});this.editor[e._editor_id].attachEvent("onAccess",function(j,l){e.callEvent("_onBeforeEditorAccess",[]);_dhxForm_doClick(document.body,"click");if(j=="blur"){c.doOnBlur(e,this);e.callEvent("onBlur",[e._idd]);if(e.getForm().skin=="dhx_terrace"){var h=e.childNodes[e._ll?1:0].className;if(h.indexOf("dhxeditor_focus")>=0){e.childNodes[e._ll?1:0].className=h.replace(/\s{0,}dhxeditor_focus/gi,"");}}}else{e.callEvent("onEditorAccess",[e._idd,j,l,this,e.getForm()]);e.callEvent("onFocus",[e._idd]);if(e.getForm().skin=="dhx_terrace"){var h=e.childNodes[e._ll?1:0].className;if(h.indexOf("dhxeditor_focus")==-1){e.childNodes[e._ll?1:0].className+=" dhxeditor_focus";}}}});this.editor[e._editor_id].attachEvent("onToolbarClick",function(h){e.callEvent("onEditorToolbarClick",[e._idd,h,this,e.getForm()]);});if(g.readonly){this.setReadonly(e,true);}
+e.childNodes[e._ll?0:1].childNodes[0].removeAttribute("for");e.childNodes[e._ll?0:1].childNodes[0].onclick=function(){c.editor[e._editor_id]._focus();};return this;},doOnBlur:function(e,c){var a=c.getContent();if(e._value!=a){if(e.checkEvent("onBeforeChange")){if(e.callEvent("onBeforeChange",[e._idd,e._value,a])!==true){c.setContent(e._value);return;}}
+e._value=a;e.callEvent("onChange",[e._idd,a]);}},setValue:function(a,c){if(a._value==c){return;}
+a._value=c;this.editor[a._editor_id].setContent(a._value);},getValue:function(a){a._value=this.editor[a._editor_id].getContent();return a._value;},enable:function(a){if(this.isEnabled(a)!=true){this.editor[a._editor_id].setReadonly(false);this.doEn(a);}},disable:function(a){if(this.isEnabled(a)==true){this.editor[a._editor_id].setReadonly(true);this.doDis(a);}},setReadonly:function(a,c){this.editor[a._editor_id].setReadonly(c);},getEditor:function(a){return this.editor[a._editor_id]||null;},destruct:function(a){a.childNodes[a._ll?0:1].childNodes[0].onclick=null;this.editor[a._editor_id].unload();this.editor[a._editor_id]=null;this.d2(a);a=null;},setFocus:function(a){this.editor[a._editor_id]._focus();},};(function(){for(var c in{doAddLabel:1,doAddInput:1,doUnloadNestedLists:1,setText:1,getText:1,setWidth:1,isEnabled:1}){dhtmlXForm.prototype.items.editor[c]=dhtmlXForm.prototype.items.template[c];}})();dhtmlXForm.prototype.items.editor.d2=dhtmlXForm.prototype.items.select.destruct;dhtmlXForm.prototype.items.editor.doEn=dhtmlXForm.prototype.items.select.enable;dhtmlXForm.prototype.items.editor.doDis=dhtmlXForm.prototype.items.select.disable;dhtmlXForm.prototype.getEditor=function(a){return this.doWithItem(a,"getEditor");};dhtmlXForm.prototype.items.image={_dimFix:true,render:function(j,l){j._type="image";j._enabled=true;j._fr_name="dhxform_image_"+window.dhx4.newId();j._url=l.url;if(l.inputWidth=="auto"){l.inputWidth=120;}
+if(l.inputHeight=="auto"){l.inputHeight=l.inputWidth;}
+this.doAddLabel(j,l);this.doAddInput(j,l,"DIV",null,true,true,"dhxform_image");var c=j.childNodes[j._ll?1:0].childNodes[0];c.style.height=parseInt(c.style.height)-dhtmlXForm.prototype.items[this.t]._dim+"px";var a=typeof l.imageWidth!="undefined"?parseInt(l.imageWidth):l.inputWidth;var e=typeof l.imageHeight!="undefined"?parseInt(l.imageHeight):l.inputHeight;if(e=="auto"){e=a;}
+j._dim={mw:l.inputWidth-this._dim,mh:l.inputHeight-this._dim,w:a,h:e};c.innerHTML="![]()
";("
");this.adjustImage(j);c.childNodes[2].firstChild.lastChild.onchange=function(){j._is_uploading=true;this.parentNode.submit();this.parentNode.parentNode.className="dhxform_image_wrap dhxform_image_in_progress";};var g=this;if(window.navigator.userAgent.indexOf("MSIE")>=0){c.childNodes[1].onreadystatechange=function(){if(this.readyState=="complete"){g.doOnUpload(j);}};}else{c.childNodes[1].onload=function(){g.doOnUpload(j);};}
+this._moreClear=function(){g=null;};this.setValue(j,l.value||"");c=null;return this;},destruct:function(c){var a=c.childNodes[c._ll?1:0].childNodes[0];a.childNodes[2].firstChild.lastChild.onchange=null;a.childNodes[1].onreadystatechange=null;a.childNodes[1].onload=null;this._moreClear();this.d2(c);c=null;},doAttachEvents:function(){},setValue:function(e,h){e._value=h==null?"":h;var c=e._url+
+(e._url.indexOf("?")>=0?"&":"?")+"action=loadImage&itemId="+
+encodeURIComponent(e._idd)+"&itemValue="+
+encodeURIComponent(e._value)+
+(window.dhx4.ajax.cache!=true?"&dhxr"+new Date().getTime()+"=1":"");var g=e.childNodes[e._ll?1:0].childNodes[0].firstChild;if(g.nextSibling.tagName.toLowerCase()=="img"){g.nextSibling.src=c;}else{var a=document.createElement("IMG");a.className="dhxform_image_img";a.style.visibility="hidden";a.onload=function(){this.style.visibility="visible";this.parentNode.removeChild(this.nextSibling);this.onload=this.onerror=null;};a.onerror=function(){this.onload.apply(this,arguments);this.style.visibility="hidden";};g.parentNode.insertBefore(a,g);a.src=c;a=null;this.adjustImage(e);}
+g=null;},getValue:function(a){return a._value;},doOnUpload:function(e){if(e._is_uploading==true){var a=e.childNodes[e._ll?1:0].childNodes[0].lastChild.previousSibling;var c=dhx4.s2j(a.contentWindow.document.body.innerHTML);if(typeof c=="object"&&c!=null&&c.state==true&&c.itemId==e._idd){this.setValue(e,c.itemValue,true);e.getForm().callEvent("onImageUploadSuccess",[c.itemId,c.itemVaule,c.extra]);}else{e.getForm().callEvent("onImageUploadFail",[e._idd,c?c.extra:null]);}
+c=a=null;window.setTimeout(function(){e.childNodes[e._ll?1:0].childNodes[0].lastChild.className="dhxform_image_wrap";e._is_uploading=false;},50);}},adjustImage:function(g){var c=g.childNodes[g._ll?1:0].childNodes[0].firstChild;var a=Math.min(g._dim.mw,g._dim.w);var e=Math.min(g._dim.mh,g._dim.h);c.style.width=a+"px";c.style.height=e+"px";c.style.marginLeft=Math.max(0,Math.round(g._dim.mw/2-a/2))+"px";c.style.marginTop=Math.max(0,Math.round(g._dim.mh/2-e/2))+"px";c=g=null;},};(function(){for(var c in dhtmlXForm.prototype.items.input){if(!dhtmlXForm.prototype.items.image[c]){dhtmlXForm.prototype.items.image[c]=dhtmlXForm.prototype.items.input[c];}}})();dhtmlXForm.prototype.items.image.d2=dhtmlXForm.prototype.items.input.destruct;dhtmlXForm.prototype.setFormData_image=function(a,c){this.setItemValue(a,c);};dhtmlXForm.prototype.getFormData_image=function(a){return this.getItemValue(a);};dhtmlXForm.prototype.items.upload={render:function(c,e){c._type="up";c._enabled=true;c._checked=true;c.className=e.position+(typeof e.className=="string"?" "+e.className:"");var a=document.createElement("DIV");c.appendChild(a);if(!isNaN(e.inputLeft)){c.style.left=parseInt(e.inputLeft)+"px";}
+if(!isNaN(e.inputTop)){c.style.top=parseInt(e.inputTop)+"px";}
+if(e.inputWidth!="auto"){if(!isNaN(e.inputWidth)){a.style.width=parseInt(e.inputWidth)+"px";}}
+c._uploader=new dhtmlXFileUploader(a,e.swfPath||"",e.swfUrl||"",e.mode||null,e.swfLogs,e.slXap||"",e.slUrl||"",e.slLogs||"",e.multiple);c._uploader.setURL(e.url||"");c._uploader.callEvent=c.callEvent;if(typeof e.autoStart!="undefined"){c._uploader.setAutoStart(e.autoStart);}
+if(typeof e.autoRemove!="undefined"){c._uploader.setAutoRemove(e.autoRemove);}
+if(typeof e.titleScreen!="undefined"){c._uploader.enableTitleScreen(e.titleScreen);}
+if(typeof e.titleText!="undefined"){c._uploader.setTitleText(e.titleText);}
+if(e.hidden==true){this.hide(c);}
+if(e.disabled==true){this.userDisable(c);}
+if(!(e.inputHeight=="auto"||parseInt(e.inputHeight)==NaN)){c._uploader.p_files.style.height=parseInt(e.inputHeight)+"px";}
+return this;},destruct:function(a){this.doUnloadNestedLists(a);a._uploader.callEvent=function(){return true;};a._uploader.unload();a._uploader.callEvent=null;a._uploader=null;a._checked=null;a._enabled=null;a._idd=null;a._type=null;a.onselectstart=null;a._autoCheck=null;a.callEvent=null;a.checkEvent=null;a.getForm=null;while(a.childNodes.length>0){a.removeChild(a.childNodes[0]);}
+a.parentNode.removeChild(a);a=null;},setText:function(a,c){},getText:function(a){},enable:function(a){a._enabled=true;if(String(a.className).search("disabled")>=0){a.className=String(a.className).replace(/disabled/gi,"");}
+a._uploader.enable();},disable:function(a){a._enabled=false;if(String(a.className).search("disabled")<0){a.className+=" disabled";}
+a._uploader.disable();},setWidth:function(c,a){c.childNodes[0].style.width=a+"px";c._width=a;},getWidth:function(a){return a._width||parseInt(a.childNodes[0].style.width);},setValue:function(a){a._uploader.clear();},getValue:function(j){var g=j._uploader.getData();var h={};var e=0;for(var c in g){h[j._idd+"_r_"+e]=g[c].realName;h[j._idd+"_s_"+e]=g[c].serverName;e++;}
+h[j._idd+"_count"]=e;return h;},getUploader:function(a){return a._uploader;},getStatus:function(a){return a._uploader.getStatus();},};(function(){for(var c in{doUnloadNestedLists:1,isEnabled:1}){dhtmlXForm.prototype.items.upload[c]=dhtmlXForm.prototype.items.checkbox[c];}})();dhtmlXForm.prototype.setFormData_upload=function(a){this.doWithItem(a,"setValue");};dhtmlXForm.prototype.getUploader=function(a){return this.doWithItem(a,"getUploader");};dhtmlXForm.prototype.getUploaderStatus=function(a){return this.doWithItem(a,"getStatus");};function dhtmlXFileUploader(c,m,l,n,s,j,v,h,w){var o=this;if(typeof n=="string"&&typeof this[n]=="function"){this.engine=n;}else{this.engine="html4";var g=null;if(typeof window.FormData!="undefined"&&typeof window.XMLHttpRequest!="undefined"){g=new XMLHttpRequest();if(typeof g.upload=="undefined"){g=null;}}
+if(g!=null){this.engine="html5";}else{if(typeof window.swfobject!="undefined"||g===false){var g=swfobject.getFlashPlayerVersion();if(g.major>=10){this.engine="flash";}}else{this._sl_v=this.getSLVersion();if(this._sl_v){this.engine="sl";}}}
+g=null;}
+if(typeof c=="string"){c=document.getElementById(c);}
+this._upload_mp=typeof w!="undefined"?w==true:true;this._upload_dnd=true;this._swf_file_url=m||"";this._swf_upolad_url=l||"";this._swf_logs=s;this._sl_xap=j;this._sl_upload_url=v;this._sl_logs=h;this.p=document.createElement("DIV");this.p.className+=" dhx_file_uploader";c.appendChild(this.p);this.p_files=document.createElement("DIV");this.p_files.className="dhx_upload_files";this.p.appendChild(this.p_files);this.p_controls=document.createElement("DIV");this.p_controls.className="dhx_upload_controls";this.p.appendChild(this.p_controls);this._files={};this._items={};this._data={};this._autoStart=false;this._autoRemove=false;this._titleScreen=true;this._enabled=true;this._uploaded_count=0;this._initToolbar=function(){this.b_opts={info:{onclick:null},browse:{onclick:null,tooltip:"Browse"},upload:{onclick:function(){if(!o._enabled){return;}
+if(!o._uploading){o._uploadStart();}},tooltip:"Upload",},cancel:{onclick:function(){if(!o._enabled){return;}
+o._uploadStop();o._switchButton(false);},tooltip:"Stop",},clear:{onclick:function(){if(!o._enabled){return;}
+o.clear();},tooltip:"Clear list",},};this.buttons={};for(var e in this.b_opts){var x=document.createElement("DIV");x.innerHTML=" ";x.className="dhx_file_uploader_button button_"+e;x.onclick=this.b_opts[e].onclick;if(this.b_opts[e].tooltip){x.title=this.b_opts[e].tooltip;}
+this.p_controls.appendChild(x);this.buttons[e]=x;x=null;}
+this.buttons.cancel.style.display="none";};this._readableSize=function(x){var e=false;var a=["b","Kb","Mb","Gb","Tb","Pb","Eb"];for(var y=0;y1024){x=x/1024;}else{if(e===false){e=y;}}}
+if(e===false){e=a.length-1;}
+return Math.round(x*100)/100+" "+a[e];};this._beforeAddFileToList=function(a,e){return this.callEvent("onBeforeFileAdd",[a,e])===true;};this._addFileToList=function(C,e,y,A,a){this._checkTitleScreen();var x=document.createElement("DIV");x._idd=C;x.className="dhx_file dhx_file_"+A;x.innerHTML="
"+a+"%
";this.p_files.appendChild(x);x.childNodes[0].style.width=x.offsetWidth-127+"px";this._items[C]=x;this._updateFileNameSize(C);x.childNodes[2].onclick=function(){if(!o._enabled){return;}
+var D=this.parentNode._idd;o._removeFileFromQueue(D);};this.callEvent("onFileAdd",[e]);};this._removeFileFromList=function(a){if(!this._items[a]){return;}
+this._items[a].childNodes[2].onclick=null;this._items[a].parentNode.removeChild(this._items[a]);this._items[a]=null;delete this._items[a];if(this._data[a]){this._data[a]=null;delete this._data[a];}
+this._checkTitleScreen();};this._updateFileNameSize=function(a){this._items[a].childNodes[0].innerHTML=this._files[a].name+(!isNaN(this._files[a].size)?" ("+this._readableSize(this._files[a].size)+")":" ");this._items[a].childNodes[0].title=this._files[a].name+(!isNaN(this._files[a].size)?" ("+this._readableSize(this._files[a].size)+")":"");};this._updateFileInList=function(x,e,a){if(!this._items[x]){return;}
+this._items[x].className="dhx_file dhx_file_"+e;this._updateProgress(x,e,a);this._updateFileNameSize(x);};this._updateProgress=function(x,e,a){if(e=="uploading"&&a<100&&this._progress_type=="loader"){this._items[x].childNodes[1].className="dhx_file_param dhx_file_uploading";this._items[x].childNodes[1].innerHTML=" ";}else{this._items[x].childNodes[1].className="dhx_file_param dhx_file_progress";this._items[x].childNodes[1].innerHTML=a+"%";}
+this._updateFileNameSize(x);};this._removeFilesByState=function(x){for(var e in this._files){if(x===true||this._files[e].state==x){this._removeFileFromQueue(e);}}};this._switchButton=function(e){if(e==true){this.buttons.upload.style.display="none";this.buttons.cancel.style.display="";}else{var a=this._uploaded_count;this.buttons.upload.style.display="";this.buttons.cancel.style.display="none";this._uploaded_count=0;if(a>0){this.callEvent("onUploadComplete",[a]);}}};this._uploadStart=function(){this._switchButton(true);if(!this._uploading){for(var e in this._files){if(this._files[e].state=="fail"){this._files[e].state="added";this._updateFileInList(e,"added",0);}}}
+this._uploading=true;var x=false;for(var e in this._files){if(!x&&[this._files[e].state]=="added"){x=true;this._files[e].state="uploading";this._updateFileInList(e,"uploading",0);this._doUploadFile(e);}}
+if(!x){this._uploading=false;this._switchButton(false);}};this._onUploadSuccess=function(A,y,x,a){if(typeof x!="undefined"&&this.engine=="flash"){var e=dhx4.s2j(x.data);if(e!=null&&e.state==true&&e.name!=null){y=e.name;if(e.extra!=null){a=e.extra;}}else{this._onUploadFail(A,e!=null&&e.extra!=null?e.extra:null);return;}}
+this._uploaded_count++;this._data[A]={realName:this._files[A].name,serverName:y};this._files[A].state="uploaded";this._updateFileInList(A,"uploaded",100);this.callEvent("onUploadFile",[this._files[A].name,y,a]);if(this._autoRemove){this._removeFileFromQueue(A);}
+if(this._uploading){this._uploadStart();}};this._onUploadFail=function(e,a){this._files[e].state="fail";this._updateFileInList(e,"fail",0);this.callEvent("onUploadFail",[this._files[e].name,a]);if(this._uploading){this._uploadStart();}};this._onUploadAbort=function(a){this._uploading=false;this._files[a].state="added";this._updateFileInList(a,"added",0);this.callEvent("onUploadCancel",[this._files[a].name]);};this._checkTitleScreen=function(){var x=0;for(var e in this._files){x++;}
+if(x==0&&this.p.className.search("dhx_file_uploader_title")<0&&this._titleScreen){this.p.className+=" dhx_file_uploader_title";this.buttons.info.innerHTML=this._titleText;this.buttons.info.style.width=Math.max(this.p_controls.offsetWidth-134,0)+"px";}
+if((x>0||!this._titleScreen)&&this.p.className.search("dhx_file_uploader_title")>=0){this.p.className=this.p.className.replace(/dhx_file_uploader_title/g,"");this.buttons.info.innerHTML="";}};this.callEvent=function(){};this.upload=function(){if(!this._uploading){this._uploadStart();}};this.setAutoStart=function(a){this._autoStart=a==true;};this.setAutoRemove=function(a){this._autoRemove=a==true;};this.enableTitleScreen=function(a){this._titleScreen=a==true;this._checkTitleScreen();};this.setTitleText=function(a){this._titleText=a;if(this.p.className.search("dhx_file_uploader_title")>=0){this.buttons.info.innerHTML=this._titleText;}};this.setURL=function(a){this._url=a;};this.setSWFURL=function(a){this._swf_upolad_url=a;};this.enable=function(){this._enabled=true;this.p_files.className="dhx_upload_files";this.p_controls.className="dhx_upload_controls";};this.disable=function(){this._enabled=false;this.p_files.className="dhx_upload_files dhx_uploader_dis";this.p_controls.className="dhx_upload_controls dhx_uploader_dis";};this.getStatus=function(){var x=0;for(var e in this._files){if(this._files[e].state!="uploaded"){return-1;}
+x=1;}
+return x;};this.getData=function(){return this._data;};this.clear=function(){if(this.callEvent("onBeforeClear",[])!==true){return;}
+if(this._uploading){o._uploadStop();}
+o._switchButton(false);o._removeFilesByState(true);this.callEvent("onClear",[]);};this.unload=function(){this._removeFilesByState(true);this._data=null;this._files=null;this._items=null;this._unloadEngine();for(var e in this.buttons){this.buttons[e].onclick=null;this.buttons[e].parentNode.removeChild(this.buttons[e]);this.buttons[e]=null;delete this.buttons[e];}
+this.buttons=null;for(var e in this.b_opts){this.b_opts[e].onclick=null;this.b_opts[e]=null;delete this.b_opts[e];}
+this.b_opts=null;this.p_controls.parentNode.removeChild(this.p_controls);this.p_files.parentNode.removeChild(this.p_files);this.p.className=this.p.className.replace(/dhx_file_uploader_title/gi,"").replace(/dhx_file_uploader/gi,"");for(var e in this){this[e]=null;}
+o=e=null;};var r=new this[this.engine]();for(var u in r){this[u]=r[u];r[u]=null;}
+u=r=c=null;this._initToolbar();this._initEngine();this._checkTitleScreen();return this;}
+dhtmlXFileUploader.prototype.html5=function(){};dhtmlXFileUploader.prototype.html5.prototype={_initEngine:function(){var c=this;this.buttons.browse.onclick=function(){if(c._enabled){c.f.click();}};this._progress_type="percentage";var a=window.navigator.userAgent;if(a.match(/Windows/gi)!=null&&a.match(/AppleWebKit/gi)!=null&&a.match(/Safari/gi)!=null){if(a.match(/Version\/5\.1\.5/gi)){this._upload_mp=false;}
+if(a.match(/Version\/5\.1[^\.\d{1,}]/gi)){this._upload_dnd=false;}
+if(a.match(/Version\/5\.1\.1/gi)){this._upload_mp=false;this._upload_dnd=false;}
+if(a.match(/Version\/5\.1\.2/gi)){this._upload_dnd=false;}
+if(a.match(/Version\/5\.1\.7/gi)){this._upload_mp=false;}}
+this._addFileInput();if(this._upload_dnd){this.p.ondragenter=function(g){if(!g.dataTransfer){return;}
+g.stopPropagation();g.preventDefault();};this.p.ondragover=function(g){if(!g.dataTransfer){return;}
+g.stopPropagation();g.preventDefault();};this.p.ondrop=function(g){if(!g.dataTransfer){return;}
+g.stopPropagation();g.preventDefault();if(c._enabled){c._parseFilesInInput(g.dataTransfer.files);}};this._titleText="Drag-n-Drop files here or
click to select files for upload.";}else{this._titleText="Click to select files for upload.";}},_addFileInput:function(){if(this.f!=null){this.f.onchange=null;this.f.parentNode.removeChild(this.f);this.f=null;}
+var a=this;this.f=document.createElement("INPUT");this.f.type="file";if(this._upload_mp){this.f.multiple="1";}
+this.f.className="dhx_uploader_input";this.p_controls.appendChild(this.f);this.f.onchange=function(){a._parseFilesInInput(this.files);if(window.dhx4.isOpera){a._addFileInput();}else{this.value="";}};},_doUploadFile:function(e){var c=this;if(!this._loader){this._loader=new XMLHttpRequest();this._loader.upload.onprogress=function(g){if(c._files[this._idd].state=="uploading"){c._updateFileInList(this._idd,"uploading",Math.round((g.loaded*100)/g.total));}};this._loader.onload=function(h){var g=dhx4.s2j(this.responseText);if(typeof g=="object"&&g!=null&&typeof g.state!="undefined"&&g.state==true){c._onUploadSuccess(this.upload._idd,g.name,null,g.extra);g=null;}else{c._onUploadFail(this.upload._idd,g!=null&&g.extra!=null?g.extra:null);}};this._loader.onerror=function(g){c._onUploadFail(this.upload._idd);};this._loader.onabort=function(g){c._onUploadAbort(this.upload._idd);};}
+this._loader.upload._idd=e;var a=new FormData();a.append("file",this._files[e].file);this._loader.open("POST",this._url+(String(this._url).indexOf("?")<0?"?":"&")+"mode=html5&dhxr"+new Date().getTime(),true);this._loader.setRequestHeader("X-Requested-With","XMLHttpRequest");this._loader.send(a);},_uploadStop:function(){if(!this._uploading||!this._loader){return;}
+this._loader.abort();},_parseFilesInInput:function(c){for(var a=0;ato select files for upload.";},_addForm:function(){var a=this;var e=window.dhx4.newId();if(!this.k){this.k=document.createElement("DIV");this.k.className="dhx_file_form_cont";this.buttons.browse.appendChild(this.k);this.fr_name="dhx_file_"+window.dhx4.newId();this.k.innerHTML='';this.fr=this.k.firstChild;if(window.navigator.userAgent.indexOf("MSIE")>=0){this.fr.onreadystatechange=function(){if(this.readyState=="complete"){a._onLoad();}};}else{this.fr.onload=function(){a._onLoad();};}}
+var c=document.createElement("DIV");c.innerHTML="";this.k.appendChild(c);c.firstChild.lastChild._idd=e;c.firstChild.lastChild.onchange=function(){if(!a._beforeAddFileToList(this.value,null)){return;}
+a._addFileToQueue(this);this.onchange=null;this.parentNode.parentNode.style.display="none";a._addForm();};c=null;},_onLoad:function(){if(this._uploading){var a=dhx4.s2j(this.fr.contentWindow.document.body.innerHTML);if(typeof a=="object"&&a!=null){if(typeof a.state!="undefined"){if(a.state=="cancelled"){this._onUploadAbort(this.fr._idd);a=null;return;}else{if(a.state==true){if(typeof a.size!="undefined"&&!isNaN(a.size)){this._files[this.fr._idd].size=a.size;}
+this._onUploadSuccess(this.fr._idd,a.name,null,a.extra);a=null;return;}}}}
+this._onUploadFail(this.fr._idd,a!=null&&a.extra!=null?a.extra:null);}},_addFileToQueue:function(c){var a=c.value.match(/[^\\\/]*$/g);if(a[0]!=null){a=a[0];}else{a=c.value;}
+this._files[c._idd]={name:a,form:c.parentNode,node:c.parentNode.parentNode,input:c,state:"added"};this._addFileToList(c._idd,c.value,false,"added",0);if(this._autoStart&&!this._uploading){this._uploadStart(true);}},_removeFileFromQueue:function(e){var a=this._files[e].name;var c=this._data!=null&&this._data[e]!=null?this._data[e].serverName:null;if(this.callEvent("onBeforeFileRemove",[a,c])!==true){return;}
+this._files[e].input.onchange=null;this._files[e].form.removeChild(this._files[e].input);this._files[e].node.removeChild(this._files[e].form);this._files[e].node.parentNode.removeChild(this._files[e].node);this._files[e].input=null;this._files[e].name=null;this._files[e].form=null;this._files[e].node=null;this._files[e].size=null;this._files[e].state=null;this._files[e]=null;delete this._files[e];this._removeFileFromList(e);this.callEvent("onFileRemove",[a,c]);},_doUploadFile:function(a){this.fr._idd=a;this._files[a].form.action=this._url;this._files[a].form.submit();},_uploadStop:function(){if(!this._uploading){return;}
+this.fr.contentWindow.location.href=this._url+(this._url.indexOf("?")<0?"?":"&")+"mode=html4&action=cancel&dhxr"+new Date().getTime();},_unloadEngine:function(){if(this.k){this.fr_name=null;this.fr.onreadystatechange=null;this.fr.onload=null;this.fr.parentNode.removeChild(this.fr);this.fr=null;this.k.firstChild.firstChild.lastChild.onchange=null;this.k.parentNode.removeChild(this.k);this.k=null;}
+this._initEngine=null;this._addForm=null;this._onLoad=null;this._addFileToQueue=null;this._removeFileFromQueue=null;this._doUploadFile=null;this._uploadStop=null;this._unloadEngine=null;},};dhtmlXFileUploader.prototype.flash=function(){};dhtmlXFileUploader.prototype.flash.prototype={_initEngine:function(){if(!window.dhtmlXSWFObjectsPull){window.dhtmlXSWFObjectsPull={items:{},callEvent:function(h,e,g){return window.dhtmlXSWFObjectsPull.items[h].uploader[e].apply(window.dhtmlXSWFObjectsPull.items[h].uploader,g);},};}
+var c=this;this._swf_obj_id="dhtmlXFileUploaderSWFObject_"+window.dhx4.newId();this._swf_file_url=this._swf_file_url+(this._swf_file_url.indexOf("?")>=0?"&":"?")+"dhxr"+new Date().getTime();this.buttons.browse.innerHTML="";swfobject.embedSWF(this._swf_file_url,this._swf_obj_id,"100%","100%","9",null,{ID:this._swf_obj_id,enableLogs:this._swf_logs},{wmode:"transparent"});var a=swfobject.getFlashPlayerVersion();this._titleText="Engine successfuly inited
Flash Player: "+a.major+"."+a.minor+"."+a.release;this._progress_type="percentage";window.dhtmlXSWFObjectsPull.items[this._swf_obj_id]={id:this._swf_obj_id,uploader:this};},_beforeAddFileToQueue:function(a,c){return this.callEvent("onBeforeFileAdd",[a,c])===true;},_addFileToQueue:function(g,c,e){if(window.dhx4.isIE){var a=document.createElement("INPUT");a.type="TEXT";a.style.position="absolute";a.style.left="0px";a.style.top=window.dhx4.absTop(this.buttons.browse)+"px";a.style.width="10px";document.body.appendChild(a);a.focus();document.body.removeChild(a);a=null;}
+this._files[g]={name:c,size:e,state:"added"};this._addFileToList(g,c,e,"added",0);if(this._autoStart&&!this._uploading){this._uploadStart(true);}},_removeFileFromQueue:function(g){if(!this._files[g]){return;}
+var c=this._files[g].name;var e=this._data!=null&&this._data[g]!=null?this._data[g].serverName:null;if(this.callEvent("onBeforeFileRemove",[c,e])!==true){return;}
+var a=false;if(this._uploading&&this._files[g].state=="uploading"){this._uploadStop();a=true;}
+swfobject.getObjectById(this._swf_obj_id).removeFileById(g);this._files[g].name=null;this._files[g].size=null;this._files[g].state=null;this._files[g]=null;delete this._files[g];this._removeFileFromList(g);this.callEvent("onFileRemove",[c,e]);if(a){this._uploadStart();}},_doUploadFile:function(a){swfobject.getObjectById(this._swf_obj_id).upload(a,this._swf_upolad_url);},_uploadStop:function(e){for(var c in this._files){if(this._files[c].state=="uploading"){swfobject.getObjectById(this._swf_obj_id).uploadStop(c);}}},_unloadEngine:function(){if(window.dhtmlXSWFObjectsPull.items[this._swf_obj_id]){window.dhtmlXSWFObjectsPull.items[this._swf_obj_id].id=null;window.dhtmlXSWFObjectsPull.items[this._swf_obj_id].uploader=null;window.dhtmlXSWFObjectsPull.items[this._swf_obj_id]=null;delete window.dhtmlXSWFObjectsPull.items[this._swf_obj_id];}
+this._swf_obj_id=null;this._initEngine=null;this._addFileToQueue=null;this._removeFileFromQueue=null;this._doUploadFile=null;this._uploadStop=null;this._unloadEngine=null;},};dhtmlXFileUploader.prototype.sl=function(){};dhtmlXFileUploader.prototype.sl.prototype={_initEngine:function(){if(typeof this._sl_v=="undefined"){this._sl_v=this.getSLVersion();}
+if(!window.dhtmlXFileUploaderSLObjects){window.dhtmlXFileUploaderSLObjects={items:{},callEvent:function(e,a,c){window.dhtmlXFileUploaderSLObjects.items[e].uploader[a].apply(window.dhtmlXFileUploaderSLObjects.items[e].uploader,c);},};}
+this._sl_obj_id="dhtmlXFileUploaderSLObject_"+window.dhx4.newId();if(this._sl_v!=false){this._titleText="Engine successfuly inited
Silverlight version: "+this._sl_v[0]+"."+this._sl_v[1];this.buttons.browse.innerHTML='';}else{this._titleText="Silverlight plugin not found
or version less than 4.0";this.buttons.browse.style.cursor="wait";this.buttons.browse.title="";}
+this._progress_type="percentage";window.dhtmlXFileUploaderSLObjects.items[this._sl_obj_id]={id:this._sl_obj_id,uploader:this};},_addFileToQueue:function(e,a,c){this._files[e]={name:a,size:c,state:"added"};this._addFileToList(e,a,c,"added",0);if(this._autoStart&&!this._uploading){this._uploadStart(true);}},_removeFileFromQueue:function(c){if(!this._files[c]){return;}
+var a=false;if(this._uploading&&this._files[c].state=="uploading"){this._uploadStop();a=true;}
+document.getElementById([this._sl_obj_id]).Content.a.removeFileById(c);this._files[c].name=null;this._files[c].size=null;this._files[c].state=null;this._files[c]=null;delete this._files[c];this._removeFileFromList(c);if(a){this._uploadStart();}},_doUploadFile:function(c){var a=this._sl_upload_url.split("?");a=a[1]!=null?"&"+a[1]:"";document.getElementById(this._sl_obj_id).Content.a.upload(c,this._sl_upload_url,a+"&mode=sl&dhxr"+new Date().getTime());},_uploadStop:function(e){this._uploading=false;for(var c in this._files){if(this._files[c].state=="uploading"){document.getElementById(this._sl_obj_id).Content.a.uploadStop(c);}}},_unloadEngine:function(){if(window.dhtmlXFileUploaderSLObjects.items[this._sl_obj_id]){window.dhtmlXFileUploaderSLObjects.items[this._sl_obj_id].id=null;window.dhtmlXFileUploaderSLObjects.items[this._sl_obj_id].uploader=null;window.dhtmlXFileUploaderSLObjects.items[this._sl_obj_id]=null;delete window.dhtmlXFileUploaderSLObjects.items[this._sl_obj_id];}
+this._sl_obj_id=null;this._initEngine=null;this._addFileToQueue=null;this._removeFileFromQueue=null;this._doUploadFile=null;this._uploadStop=null;this._unloadEngine=null;},};dhtmlXFileUploader.prototype.setSLURL=function(a){this._sl_upload_url=a;};dhtmlXFileUploader.prototype.getSLVersion=function(){var a=false;if(window.dhx4.isIE){try{var c=new ActiveXObject("AgControl.AgControl");if(c!=null){var j=4,h=0;while(c.isVersionSupported([j,h].join("."))){a=[j,h];if(++h>9){j++;h=0;}}}
+c=null;}catch(g){}}else{if(navigator.plugins["Silverlight Plug-In"]!=null){a=navigator.plugins["Silverlight Plug-In"].description.split(".");}}
+return a;};dhtmlXForm.prototype.saveBackup=function(){if(!this._backup){this._backup={};this._backupId=new Date().getTime();}
+this._backup[++this._backupId]=this.getFormData();return this._backupId;};dhtmlXForm.prototype.restoreBackup=function(a){if(this._backup!=null&&this._backup[a]!=null){this.setFormData(this._backup[a]);}};dhtmlXForm.prototype.clearBackup=function(a){if(this._backup!=null&&this._backup[a]!=null){this._backup[a]=null;delete this._backup[a];}};dhtmlXForm.prototype.addItem=function(e,a,j,g){var c=null;if(e instanceof Array){c=e[1];e=e[0];}
+var h=null;if(e!=null){var h=this._getParentForm(e,c);if(h!=null){if(h.item._list==null){if(!a.listParent){a.listParent=h.item._idd;}
+h.form._addItem("list",h.item._idd,[a],null,h.item._idd,j,g);}else{h.item._list[0].addItem(null,a,j,g);}
+h.form=h.item=null;h=null;this._autoCheck();return;}}
+this._prepareItem(a,j,g);this._autoCheck();};dhtmlXForm.prototype.removeItem=function(c,a){this._removeItem(c,a);};dhtmlXForm.prototype.removeColumn=function(l,j,g,e){var n=null;if(l instanceof Array){n=l[1];l=l[0];}
+if(l!=null){var h=this._getParentForm(l,n);if(h!=null){if(h.item._list!=null&&h.item._list[0]!=null){h.item._list[0].removeColumn(null,j,g,e);}
+h.form=h.item=null;h=null;}
+return;}
+j=Math.min(Math.max(j,0),this.cont.childNodes.length-1);if(this.cont.childNodes.length==1){if(g==true){this._removeItemsInColumn(this.cont.childNodes[j]);}}else{if(g==true){this._removeItemsInColumn(this.cont.childNodes[j]);}else{if(!e){var a=j-1;if(a<0){a=j+1;}}else{var a=j+1;if(a>this.cont.childNodes.length-1){a=j-1;}}
+while(this.cont.childNodes[j].childNodes.length>0){this.cont.childNodes[a].appendChild(this.cont.childNodes[j].childNodes[0]);}}
+var m=[];for(var c=0;cthis.cont.childNodes.length-1){return null;}
+return this.cont.childNodes[c];};dhtmlXForm.prototype._removeItemsInColumn=function(g){var a=[];for(var e=0;e=0)){var a=document.createElement("SPAN");a.className="dhxform_item_required";a.innerHTML="*";l.appendChild(a);a=l=null;}}else{if(e._validate!=null){var c=e._validate;e._validate=[];for(var g=0;g=0){l.removeChild(l.lastChild);l=null;}}
+this._resetValidateCss(e);e=null;};dhtmlXForm.prototype.setNote=function(h,e,a){if(typeof a=="undefined"){a=e;}else{h=[h,e];}
+var c=this._getItemNode(h);if(!c){return;}
+var g=this._getNoteNode(c);if(!g){if(!a.width){a.width=c.childNodes[c._ll?1:0].childNodes[0].offsetWidth;}
+g=document.createElement("DIV");g.className="dhxform_note";if({ch:1,ra:1}[c._type]){c.childNodes[c._ll?1:0].insertBefore(g,c.childNodes[c._ll?1:0].lastChild);}else{c.childNodes[c._ll?1:0].appendChild(g);}}
+g.innerHTML=a.text;if(a.width!=null){g.style.width=a.width+"px";g._w=a.width;}
+g=null;};dhtmlXForm.prototype.clearNote=function(g,c){if(typeof c!="undefined"){g=[g,c];}
+var a=this._getItemNode(g);if(!a){return;}
+var e=this._getNoteNode(a);if(e!=null){e.parentNode.removeChild(e);e=null;}};dhtmlXForm.prototype._getNoteNode=function(a){var e=null;for(var c=0;c=0){e=a.childNodes[a._ll?1:0].childNodes[c];}}
+a=null;return e;};dhtmlXForm.prototype.setValidation=function(j,g,h){if(typeof note=="undefined"){h=g;}else{j=[j,g];}
+var c=this._getItemNode(j);if(!c){return;}
+if(c._validate!=null){for(var e=0;e0){g.remove(0);}
+g.length=0;g=null;if(typeof j=="string"){this.doWithItem(a,"doLoadOptsConnector",j);}else{if(j instanceof Array){this.doWithItem(a,"doLoadOpts",{options:j});}}}
+if(c=="combo"){var l=this.getCombo(a);l.clearAll();l.setComboValue("");if(typeof j=="string"){this.doWithItem(a,"doLoadOptsConnector",j);}else{if(j instanceof Array){var e=null;for(var h=0;h=0){a=c.childNodes[e];}}}
+if(a!=null){if(g==null||g.length==0){a.removeAttribute("title");}else{a.title=g;}}
+a=null;};function dhtmlXAccordion(h,l){var g=this;var e=window.dhx4.transDetect();this.conf={skin:l||window.dhx4.skin||(typeof dhtmlx!="undefined"?dhtmlx.skin:null)||window.dhx4.skinDetect("dhxacc")||"dhx_skyblue",css:"dhxacc",icons_path:"",multi_mode:false,last_opened:null,on_active_id:null,on_active_click:false,size_changed:true,def_height:90,total_count:0,hiden_count:0,cont_w:null,};this.conf.tr={prop:e.transProp,ev:e.transEv,height_open:"height 0.2s cubic-bezier(0.25,0.1,0.25,1)",height_close:"height 0.18s cubic-bezier(0.25,0.1,0.25,1)",op_open:"opacity 0.16s ease-in",op_close:"opacity 0.2s ease-out",op_v_open:"1",op_v_close:"0.4",dnd_top:"top 0.16s",};this.ofs={m:{},s:{},def:{m:{left:0,right:0,first:0,between:8},s:{left:0,right:0,first:0,between:-1,last:0}},base:{s:{},m:{}},skin:{dhx_web:{s:{between:3},m:{between:3}},dhx_terrace:{m:{between:12,left:0,right:0}}},};if(navigator.userAgent.indexOf("MSIE")>=0||navigator.userAgent.indexOf("Trident")>=0){this.conf.tr.height_open=this.conf.tr.height_close;}else{this.conf.tr.height_open=this.conf.tr.height_close;}
+var j=null;if(typeof h=="object"&&!h.tagName){j={};for(var c in h){j[c]=h[c];h[c]=null;}
+h=j.parent;j.parent=null;}
+window.dhtmlXCellTop.apply(this,[h,h._ofs]);this._adjustCont();if(this.base._ofs!=null){for(var m in this.ofs.base){if(this.base._ofs[m]!=null){for(var c in this.base._ofs[m]){this.ofs.base[m][c]=this.base._ofs[m][c];}}}}
+this._applyOffsets=function(){for(var u in this.ofs.def){var r=this.ofs.def[u];var s=this.ofs.skin[this.conf.skin]!=null&&this.ofs.skin[this.conf.skin][u]!=null?this.ofs.skin[this.conf.skin][u]:null;var o=this.base._ofs!=null?this.base._ofs[u]:null;for(var n in r){if(s!=null&&s[n]!=null){this.ofs[u][n]=s[n];}else{if(o!=null&&o[n]!=null){this.ofs[u][n]=o[n];}else{this.ofs[u][n]=r[n];}}}}};this._applyOffsets();this.t={};this.addItem=function(w,v,o,n,u){if(w==null){w="a"+window.dhx4.newId();}
+while(this.t[w]!=null){w="a"+window.dhx4.newId();}
+var a=new dhtmlXAccordionCell(w,this);a.conf.skin=this.conf.skin;a.setText(v);if(u!=null){a.setIcon(u);}
+a.cell._accId=w;a.cell.childNodes[a.conf.idx.hdr].onselectstart=function(x){x=x||event;if(x.preventDefault){x.preventDefault();}else{x.returnValue=false;}
+return false;};a.cell.childNodes[a.conf.idx.hdr].onclick=function(y){y=y||event;if(y.preventDefault){y.preventDefault();}else{y.returnValue=false;}
+if(g._dnd!=null&&g._dnd.ofs==true){return;}
+var x=y.target||y.srcElement;var A=null;while(x._accId!=this&&A==null){if(x._accId!=null){A=x._accId;}else{x=x.parentNode;}}
+if(A!=null){g._hdrClick(A);}};this.t[w]={cell:a};this.conf.total_count++;if(this.conf.multi_mode){if(typeof o=="undefined"){o=true;}
+this.cont.appendChild(a.cell);a.conf.opened=o==true;if(typeof n=="undefined"||n==null||n=="*"){if(n=="*"){a.conf.h_auto=true;}
+n=this.conf.def_height;}else{n=Math.max(parseInt(n),30);}
+a._setSize(this.ofs.m.left,0,this.conf.cont_w||this._getAvailItemWidth(),a.conf.opened?n:a._getHdrHeight());a.cell.style.marginTop=(a.cell==this.cont.firstChild?this.ofs.m.first:this.ofs.m.between)+"px";if(o!=true){a.conf.size.h=n;a._adjustCell();a.cell.className+=" dhx_cell_closed";}
+this._adjustOpened();if(this._dnd!=null){this._dndAttachEvent(w);}}else{o=this.conf.last_opened==null?true:window.dhx4.s2b(o);var s=this._updateCellsHeight();if(this.conf.last_opened!=null){if(o){this._closeItem(this.conf.last_opened,false);}else{var r=this.t[this.conf.last_opened].cell;r._setSize(r.conf.size.x,r.conf.size.y,r.conf.size.w,s);r=null;}}
+this.cont.appendChild(a.cell);a.conf.opened=o;a.cell.style.marginTop=String(a.cell==this.cont.firstChild?this.ofs.s.first:this.ofs.s.between)+"px";a._setSize(this.ofs.s.left,0,this.conf.cont_w||this._getAvailItemWidth(),o?s:a._getHdrHeight());if(o){this.conf.last_opened=w;}else{a.conf.size.h=s;a._adjustCell();a.cell.className+=" dhx_cell_closed";}}
+a=null;return this.t[w].cell;};this.removeItem=function(a){if(!this.t[a]){return;}
+if(this.conf.last_opened==a){this.conf.last_opened=null;}
+if(this.conf.on_active_id==a){this.conf.on_active_id=null;}
+if(this._dnd!=null){this._dndClearCell(a);}
+this.conf.total_count--;if(!this.conf.multi_mode&&!this.t[a].cell.conf.visible){this.conf.hiden_count--;}
+this.t[a].cell._unload();this.t[a].cell=null;this.t[a]=null;delete this.t[a];if(!this.conf.unloading){if(!this.conf.multi_mode){this._updateCellsMargin();}
+this.setSizes();}};this.cells=function(a){return this.t[a].cell;};this.enableMultiMode=function(a,n){this.conf.multi_mode=true;if(!isNaN(n)){this.conf.def_height=n;}
+if(a=="auto"||a=="scroll"){this.cont.style.overflowX="hidden";this.cont.style.overflowY=a;}else{this.cont.style.overflow="visible";}};this.forEachItem=function(o){for(var n in this.t){if(typeof o=="function"){o.apply(this,[this.t[n].cell]);}else{if(typeof o=="string"&&typeof window[o]=="function"){window[o].apply(this,[this.t[n].cell]);}}}};this._openItem=function(n,a){if(typeof a=="undefined"){a=true;}
+if(this.t[n].cell.conf.opened==false){if(this.conf.multi_mode){this.t[n].cell._open(a);}else{if(this.conf.tr.prop==false){if(this.conf.last_opened!=null){this.t[this.conf.last_opened].cell._close(false);}
+this.t[n].cell._open(false);this.conf.last_opened=n;}else{this.conf.on_active_id=n;this.t[n].cell._open(a);if(this.conf.last_opened!=null){this.t[this.conf.last_opened].cell._close(a);}
+this.conf.last_opened=n;}}}};this._closeItem=function(n,a){if(typeof a=="undefined"){a=true;}
+if(this.t[n].cell.conf.opened==true){this.t[n].cell._close(a);this.conf.last_opened=null;}};this._adjustOpened=function(){if(this.conf.multi_mode==true){if(this._openCache==null){var s=this._getDynData();for(var o in s){this.t[o].cell.conf.size.h=s[o];this.t[o].cell.cell.style.height=s[o]+"px";}}else{var u=false;for(var o in this._openCache){u=u||this._openCache[o];}
+if(u==true){return;}
+this._openCache=this._openId=null;}
+var n=this._getAvailItemWidth();for(var o in this.t){var r=true;if(n==this.t[o].cell.conf.size.w&&(this._openMode=="close"||this.t[o].cell.conf.opened==false)){r=false;}
+if(r){this.t[o].cell._setWidth(n);}}
+this._openMode=null;}else{if(this.conf.last_opened!=null){var v=this.conf.last_opened;this.t[v].cell._setSize(this.t[v].cell.conf.size.x,this.t[v].cell.conf.size.y,this.t[v].cell.conf.size.w,this.t[v].cell.conf.size.h);}}};this._getDynData=function(C,A){if(typeof C=="undefined"||C==null){C={};}
+if(typeof A=="undefined"||A==null){A={};}
+var v={};var y=0;var u=0;var r=0;for(var n=0;n0){var s=this.cont.offsetHeight-u;var u=Math.floor(s/y);for(var D in v){if(v[D]==true){if(y>1){s-=u;}else{u=s;}
+v[D]=u;y--;}}}
+return v;};this.setSizes=function(){this._adjustCont();if(this.conf.multi_mode==true){this._adjustOpened();}else{this.conf.cont_w=null;var o=this._updateCellsHeight();for(var n in this.t){if(this.t[n].cell.conf.visible==true){this.t[n].cell._setSize(this.ofs.s.left,0,this.conf.cont_w||this._getAvailItemWidth(),this.t[n].cell.conf.opened?o:this.t[n].cell._getHdrHeight());if(this.t[n].cell.conf.opened!=true){this.t[n].cell.conf.size.h=o;this.t[n].cell._adjustCell();}}}
+this.conf.size_changed=true;}
+this.callEvent("_onSetSizes",[]);};this.setSkin=function(o){this._setBaseSkin(o);this.conf.skin=o;for(var n in this.t){this.t[n].cell.conf.cells_cont=null;this.t[n].cell.conf.skin=this.conf.skin;}
+this._applyOffsets();this._updateCellsMargin();this.setSizes();};this.setIconsPath=function(a){this.conf.icons_path=a;};this._getAvailItemWidth=function(){var n=this.ofs[this.conf.multi_mode?"m":"s"];var a=Math.max(this.cont.clientWidth-n.left-n.right,10);this.conf.cont_w=a;n=null;return a;};this._updateCellsHeight=function(){if(this.conf.multi_mode==true){return;}
+var o=this.conf.total_count-this.conf.hiden_count;var r=this.cont.offsetHeight-this.ofs.s.last;if(o==0){return r;}
+var u=false;for(var s=0;s";this.cell.insertBefore(a,this.cell.childNodes[this.conf.idx.cont]);a=null;this.conf.ofs_nodes.t._getHdrHeight="func";this.conf.hdr={visible:true};this.conf.idx_data.hdr="dhx_cell_hdr";this._updateIdx();};dhtmlXAccordionCell.prototype._getHdrHeight=function(){return this.cell.childNodes[this.conf.idx.hdr].offsetHeight;};dhtmlXAccordionCell.prototype.showHeader=function(){if(this.conf.hdr.visible==true){return;}
+this.conf.hdr.visible=true;this.cell.childNodes[this.conf.idx.hdr].className="dhx_cell_hdr";this._adjustCont(this._idd);};dhtmlXAccordionCell.prototype.hideHeader=function(){if(this.conf.hdr.visible!=true){return;}
+this.conf.hdr.visible=false;this.cell.childNodes[this.conf.idx.hdr].className="dhx_cell_hdr dhx_cell_hdr_hidden";this._adjustCont(this._idd);};dhtmlXAccordionCell.prototype.isHeaderVisible=function(){return this.conf.hdr.visible==true;};dhtmlXAccordionCell.prototype.setText=function(c){this.conf.text=c;var a=this.cell.childNodes[this.conf.idx.hdr];a.childNodes[a.firstChild.className=="dhx_cell_hdr_icon"?1:0].innerHTML=""+c+"";a=null;};dhtmlXAccordionCell.prototype.getText=function(){return this.conf.text;};dhtmlXAccordionCell.prototype.setIcon=function(e){var c=this.cell.childNodes[this.conf.idx.hdr];if(c.firstChild.className!="dhx_cell_hdr_icon"){c.firstChild.className+=" dhx_cell_hdr_icon";var a=document.createElement("IMG");a.className="dhx_cell_hdr_icon";c.insertBefore(a,c.firstChild);a=null;}
+c.firstChild.src=this.acc.conf.icons_path+e;c=null;};dhtmlXAccordionCell.prototype.clearIcon=function(){var a=this.cell.childNodes[this.conf.idx.hdr];if(a.firstChild.className=="dhx_cell_hdr_icon"){a.removeChild(a.firstChild);a.firstChild.className=String(a.firstChild.className).replace(/\s{1,}dhx_cell_hdr_icon/gi,"");}
+a=null;};dhtmlXAccordionCell.prototype._open=function(c){var h={};if(this.acc.conf.multi_mode){var g={};g[this._idd]=true;h=this.acc._getDynData(g);this.acc._openId=this._idd;this.acc._openCache={};this.acc._openMode="open";}else{h[this._idd]=this.conf.size.h;}
+for(var e in h){if(this.acc._openCache!=null){this.acc._openCache[e]=true;}
+var j=this.acc.t[e].cell;j.cell.className=String(j.cell.className).replace(/\s{1,}dhx_cell_closed/gi,"");j.conf.opened=true;j._trInitEv("open",c);j.conf.size.h=h[e];j.cell.style.height=j.conf.size.h+"px";j=null;}
+if(this.conf.tr.prop==false){this.acc._openId=this.acc._openCache=this.acc._openMode=null;this._onActiveCall(true);}};dhtmlXAccordionCell.prototype._close=function(c){var g={};if(this.acc.conf.multi_mode){var h={};h[this._idd]=true;g=this.acc._getDynData(null,h);this.acc._openId=this._idd;this.acc._openCache={};this.acc._openMode="close";}else{g[this._idd]=this._getHdrHeight();}
+for(var e in g){var j=this.acc.t[e].cell;if(this.acc._openCache!=null){this.acc._openCache[e]=true;}
+if(e==this._idd){j.cell.className+=" dhx_cell_closed";j.conf.opened=false;j._trInitEv("close",c);}else{j.conf.size.h=g[e];j._adjustCell();j._trInitEv("open",c);}
+j.cell.style.height=g[e]+"px";j=null;}
+if(this.conf.tr.prop==false){this.acc._openId=this.acc._openCache=this.acc._openMode=null;this._onActiveCall(false);}};dhtmlXAccordionCell.prototype.isOpened=function(){return this.conf.opened==true;};dhtmlXAccordionCell.prototype._trInitEv=function(c,a){if(this.conf.tr.prop==false){return;}
+this._trAttachEv();if(!this.cell._accObj){this.cell._accObj=this.acc;}
+if(a){this.cell.style[this.conf.tr.prop]=this.conf.tr["height_"+c];}
+this._cellSetOpacity(c,a);};dhtmlXAccordionCell.prototype._trAttachEv=function(){if(!this.conf.tr.ev_attached){this.cell._trProp=this.conf.tr.prop;this.cell.addEventListener(this.conf.tr.ev,this._trOnEnd,false);this.conf.tr.ev_attached=true;}};dhtmlXAccordionCell.prototype._trDetachEv=function(){if(this.conf.tr.ev_attached){this.cell.addEventListener(this.conf.tr.ev,this._trOnEnd,false);this.conf.tr.ev_attached=false;}};dhtmlXAccordionCell.prototype._trOnEnd=function(a){if(a.stopPropagation){a.stopPropagation();}
+if(a.propertyName=="height"&&this._accObj!=null){this.style[this._trProp]="";if(this._accObj.conf.multi_mode){if(this._accObj._openCache!=null){this._accObj._openCache[this._accId]=false;}
+this._accObj._adjustOpened();}
+if(this._accObj.conf.on_active_click==true){if(this._accObj.conf.multi_mode){this._accObj._callMainEvent("onActive",[this._accId,this._accObj.t[this._accId].cell.conf.opened]);this._accObj.conf.on_active_click=false;}else{if(this._accObj.conf.on_active_id!=null){this._accObj._callMainEvent("onActive",[this._accObj.conf.on_active_id,true]);}
+this._accObj.conf.on_active_id=null;this._accObj.conf.on_active_click=false;}}
+this._accObj=null;}};dhtmlXAccordionCell.prototype._cellSetOpacity=function(g,c){for(var e in this.conf.idx){if({hdr:true,pr1:true,pr2:true,cover:true}[e]!=true){if(c){this.cell.childNodes[this.conf.idx[e]].style[this.conf.tr.prop]=this.conf.tr["op_"+g];}
+this.cell.childNodes[this.conf.idx[e]].style.opacity=this.conf.tr["op_v_"+g];}}};dhtmlXAccordionCell.prototype._onActiveCall=function(a){if(this.acc.conf.on_active_click==false){return;}
+if(this.acc.conf.multi_mode==true){this.acc._callMainEvent("onActive",[this._idd,this.conf.opened]);this.acc.conf.on_active_click=false;}else{if(a==true){this.acc._callMainEvent("onActive",[this._idd,true]);this.acc.conf.on_active_click=false;}}};dhtmlXAccordionCell.prototype.show=function(){if(this.conf.visible){return;}
+if(this.conf.docked==false){this.dock();return;}
+this.cell.style.display="";this.conf.visible=true;if(!this.acc.conf.multi_mode){this.acc.conf.hiden_count--;this.acc._updateCellsHeight();this.acc._updateCellsMargin();}
+if(this.acc.conf.size_changed){this.acc.setSizes();this.acc.conf.size_changed=false;}else{this.acc._adjustOpened();}};dhtmlXAccordionCell.prototype.hide=function(){if(!this.conf.visible){return;}
+if(!this.acc.conf.multi_mode&&this.conf.opened){this._close(false);this.acc.conf.last_opened=null;}
+this.cell.style.display="none";this.conf.visible=false;if(!this.acc.conf.multi_mode){this.acc.conf.hiden_count++;this.acc._updateCellsHeight();this.acc._updateCellsMargin();}
+this.acc._adjustOpened();};dhtmlXAccordionCell.prototype.isVisible=function(){return this.conf.visible==true;};dhtmlXAccordionCell.prototype.setHeight=function(a){if(!this.acc.conf.multi_mode){return;}
+if(a=="*"){this.conf.h_auto=true;}else{this.conf.h_auto=false;this.conf.size.h=a;}
+if(this.conf.opened){if(a!="*"){this.cell.style.height=a+"px";}
+this.acc._adjustOpened();}};dhtmlXAccordionCell.prototype.moveOnTop=function(){if(this.cell.parentNode.firstChild==this.cell){return;}
+this.cell.parentNode.insertBefore(this.cell,this.cell.parentNode.firstChild);this.acc._updateCellsMargin();};dhtmlXAccordionCell.prototype._initDocking=function(){var a=this;this.dock=function(){if(this.acc.dhxWins==null||this.conf.docked==true){return;}
+var c=this.acc.dhxWins.window(this._idd);c.close();this._attachFromCell(c);this.conf.docked=true;this.show();if(this.conf.dock_opened){this.open();}
+c=null;this.acc._callMainEvent("onDock",[this._idd]);};this.undock=function(c,l,g,j){if(this.acc.dhxWins==null||this.conf.docked==false){return;}
+this.conf.dock_opened=this.conf.opened;if(this.acc.dhxWins.window(this._idd)!=null){var e=this.acc.dhxWins.window(this._idd);e.show();}else{if(c==null){c=20;}
+if(l==null){l=20;}
+if(g==null){g=320;}
+if(j==null){j=200;}
+var e=this.acc.dhxWins.createWindow(this._idd,c,l,g,j);e.button("close").hide();e.addUserButton("dock",99,"Dock");e.button("dock").show();e.button("dock").attachEvent("onClick",this._doOnDockClick);e.setText(this.getText());e.attachEvent("onClose",this._doOnDockWinClose);}
+this.conf.docked=false;this.hide();e._attachFromCell(this);e=null;this.acc._callMainEvent("onUnDock",[this._idd]);};this._doOnDockClick=function(){a.dock();};this._doOnDockWinClose=function(c){c.hide();return false;};this._unloadDocking=function(){a=null;};};dhtmlXCellObject.prototype.attachAccordion=function(a){this.callEvent("_onBeforeContentAttach",["acc"]);var c=document.createElement("DIV");c.style.width="100%";c.style.height="100%";c.style.position="relative";this._attachObject(c);if(typeof a=="undefined"){a={};}
+if(typeof a.skin=="undefined"){a.skin=this.conf.skin;}
+a.parent=c;if(typeof window.dhtmlXAccordionCell!="undefined"&&this instanceof window.dhtmlXAccordionCell){c._ofs={s:{first:-1},m:{first:4}};}
+if(typeof window.dhtmlXTabBarCell!="undefined"&&this instanceof window.dhtmlXTabBarCell){if(this.conf.skin=="dhx_skyblue"){c._ofs={t:-1,r:-1,b:-1,l:-1};}}
+if(typeof window.dhtmlXSideBarCell!="undefined"&&this instanceof window.dhtmlXSideBarCell){if(this.conf.skin=="dhx_web"){c._ofs={};if(this.sidebar.conf.autohide!=true){c._ofs.l=2;}
+if(this.sidebar.conf.header==true){c._ofs.t=3;}}else{c._ofs={l:-1};if(this.conf.skin=="dhx_terrace"){if(this.sidebar.conf.autohide==true){c._ofs.l=0;}
+if(this.sidebar.conf.header==true){c._ofs.t=-1;}}}}
+if(typeof window.dhtmlXCarouselCell!="undefined"&&this instanceof window.dhtmlXCarouselCell){this._hideBorders();}
+this.dataType="acc";this.dataObj=new dhtmlXAccordion(a);a.parent=null;c=a=null;this.callEvent("_onContentAttach",[]);return this.dataObj;};dhtmlXAccordion.prototype.enableDND=function(){if(this.conf.multi_mode==false||this._dnd!=null){return;}
+var e=this;this._dnd={tr_count:0,tr_items:{}};this._dndAttachEvent=function(g){var a=this.t[g].cell;if(a.conf.dnd_inited!=true){if(typeof window.addEventListener=="function"){a.cell.childNodes[a.conf.idx.hdr].addEventListener("mousedown",this._dndOnMouseDown,false);}else{a.cell.childNodes[a.conf.idx.hdr].attachEvent("onmousedown",this._dndOnMouseDown);}
+a.conf.dnd_inited=true;}
+a=null;};this._dndDetachEvent=function(g){var a=this.t[g].cell;if(a.conf.dnd_inited==true){if(typeof window.addEventListener=="function"){a.cell.childNodes[a.conf.idx.hdr].removeEventListener("mousedown",this._dndOnMouseDown,false);}else{a.cell.childNodes[a.conf.idx.hdr].detachEvent("onmousedown",this._dndOnMouseDown);}
+a.conf.dnd_inited=false;}
+a=null;};this._dndOnMouseDown=function(g){g=g||event;if(g.preventDefault){g.preventDefault();}
+var a=g.target||g.srcElement;while(a!=null&&a.parentNode!=e.cont){a=a.parentNode;}
+if(a!=null){e._dndDragStart(g,a);}
+a=null;};this._dndDragStart=function(l,h){if(this._dnd.tr_waiting==true){return;}
+var a=-1;for(var j=0;j0){this._dnd.dragObj._k0+=this.ofs.m.between-this.ofs.m.first;}
+g=0;}else{g+=this._dnd.dragObj.parentNode.childNodes[j].offsetHeight+parseInt(this._dnd.dragObj.parentNode.childNodes[j].style.marginTop);}}
+this._dnd.dragObj._k1=g;this._dnd.h=this._dnd.dragObj.offsetHeight;this._dnd.ofs=false;};this._dndDoDrag=function(o){if(!this._dnd.dragObj){return;}
+if(this._dnd.tr_waiting==true){return;}
+var l=o.clientY-this._dnd.dy;if(this._dnd.ofs==false&&Math.abs(l)>5){this._dnd.dragObj.className+=" acc_cell_dragged";this._dnd.ofs=true;}
+if(l<0){if(l<-this._dnd.dragObj._k0){l=-this._dnd.dragObj._k0;}}else{if(l>this._dnd.dragObj._k1){l=this._dnd.dragObj._k1;}}
+this._dnd.dragObj.style.top=l+"px";var n=o.clientY-this._dnd.dy;var j=0;var g=0;for(var m=this._dnd.dragObj._ind+1;m<=this._dnd.dragObj.parentNode.lastChild._ind;m++){var a=this._dnd.dragObj.parentNode.childNodes[m].offsetHeight;if(n>j+(a*2)/3){g++;}
+j+=a;}
+var h=this._dnd.dragObj.nextSibling;var m=0;while(h!=null){if(++m<=g&&h!=null){if(!h._ontop){if(h._tm){window.clearTimeout(h._tm);}
+this._dndAnim(h,false,parseInt(h.style.top||0),-this._dnd.h-this.ofs.m.between);h._ontop=true;}}else{if(h._ontop){if(h._tm){window.clearTimeout(h._tm);}
+this._dndAnim(h,true,parseInt(h.style.top||0),0);h._ontop=false;}}
+h=h.nextSibling;}
+var n=this._dnd.dy-o.clientY;var j=0;var g=0;for(var m=this._dnd.dragObj._ind-1;m>=this._dnd.dragObj.parentNode.firstChild._ind;m--){var a=this._dnd.dragObj.parentNode.childNodes[m].offsetHeight;if(n>j+(a*2)/3){g++;}
+j+=a;}
+var h=this._dnd.dragObj.previousSibling;var m=0;while(h!=null){if(++m<=g&&h!=null){if(!h._onbottom){if(h._tm){window.clearTimeout(h._tm);}
+this._dndAnim(h,true,parseInt(h.style.top||0),this._dnd.h+this.ofs.m.between);h._onbottom=true;}}else{if(h._onbottom){if(h._tm){window.clearTimeout(h._tm);}
+this._dndAnim(h,false,parseInt(h.style.top),0);h._onbottom=false;}}
+h=h.previousSibling;}};this._dndDragStop=function(n,l){if(l){}else{if(this._dnd.tr_count>0){this._dnd.tr_waiting=true;return;}}
+if(!this._dnd.dragObj){return;}
+this._dnd.dragObj.className=String(this._dnd.dragObj.className).replace(/\s{0,}acc_cell_dragged/gi,"");this._dnd.dragObj.style.top="0px";var m=false;for(var j=0;j=h){j=h;g=true;}}else{j-=5;if(j<=h){j=h;g=true;}}
+l.style.top=j+"px";if(l._tm){window.clearTimeout(l._tm);}
+if(!g){l._tm=window.setTimeout(function(){e._dndAnim(l,a,j,h);},5);}else{l._tm=null;}};this._dndOnTrEnd=function(a){if(a.stopPropagation){a.stopPropagation();}
+if(a.propertyName=="top"){if(e._dnd.tr_items[this._accId]==true){e._dnd.tr_count--;e._dnd.tr_items[this._accId]=false;}
+this.style[this._dnd_tr_prop]="";if(e._dnd.tr_count==0&&e._dnd.tr_waiting==true){e._dndDragStop(null,true);}}};this._dndOnMouseMove=function(a){e._dndDoDrag(a||event);};this._dndOnMouseUp=function(a){e._dndDragStop(a||event);};this._dndClearCell=function(a){if(this.t[a].cell.cell._dnd_ev){this.t[a].cell.cell.addEventListener(this.conf.tr.ev,this._dndOnTrEnd,false);}
+this._dndDetachEvent(a);};this._unloadDND=function(){for(var g in this){if(String(g).indexOf("_dnd")==0&&typeof this[g]=="function"){this[g]=null;}}
+this._dnd=null;e=null;};for(var c in this.t){this._dndAttachEvent(c);}};function dhtmlXLayoutObject(e,n,v){var s=null;if(e!=null&&typeof e=="object"&&typeof e.tagName=="undefined"&&e._isCell!=true){s={};if(e.autosize!=null){s.autosize=e.autosize;}
+if(e.cells!=null){s.cells=e.cells;}
+if(e.pattern!=null){n=e.pattern;}
+if(e.skin!=null){v=e.skin;}
+if(e.offsets!=null){s.offsets=e.offsets;}
+e=e.parent;}
+this.cdata={};this.conf={skin:v||window.dhx4.skin||(typeof dhtmlx!="undefined"?dhtmlx.skin:null)||window.dhx4.skinDetect("dhxlayout")||"dhx_skyblue",css:"dhxlayout",hh:20,autosize:"b",nextCell:{a:"b",b:"a"},inited:false,b_size:{w:-1,h:-1},};if(typeof e=="object"&&e._isCell==true){var m=typeof s!="undefined"&&s!=null?s:{};if(m.pattern==null&&n!=null){m.pattern=n;}
+if(m.skin==null&&v!=null){m.skin=v;}
+var j=e.attachLayout(m);return j;}
+window.dhtmlXCellTop.apply(this,[e,s==null?null:s.offsets]);this.conf.sw=this._detectSW();var l=this;this._getLayout=function(){return this;};this.mainInst=e._layoutMainInst!=null?e._layoutMainInst:null;this._getMainInst=function(){if(this.mainInst!=null){return this.mainInst._getMainInst();}
+return this;};this._init=function(A){var y=typeof A=="string"?this.tplData[A]:A;this.conf.mode=y.mode;if(this.conf.mode=="c"){this.cdata.a=new dhtmlXLayoutCell("a",this);}else{this.cdata.a=new dhtmlXLayoutCell("a",this);this.cdata.b=new dhtmlXLayoutCell("b",this);}
+for(var x in this.cdata){this.cont.appendChild(this.cdata[x].cell);this.cdata[x].conf.init={w:0.5,h:0.5};}
+if(this.conf.mode!="c"){var w=this._getMainInst();if(w.conf.sep_idx==null){w.conf.sep_idx=1;}else{w.conf.sep_idx++;}
+this.sep=new dhtmlXLayoutSepObject(this.conf.mode,w.conf.sep_idx);this.cont.appendChild(this.sep.sep);this.sep._getLayout=function(){return l._getLayout();};w=null;}
+if(y.cells!=null){for(var x in y.cells){if(y.cells[x].width!=null){this.cdata[x].conf.init.w=y.cells[x].width;}
+if(y.cells[x].height!=null){this.cdata[x].conf.init.h=y.cells[x].height;}
+if(y.cells[x].name!=null){this.cdata[x].conf.name=y.cells[x].name;this.cdata[x].setText(y.cells[x].name);}
+if(y.cells[x].fsize!=null){this.cdata[x].conf.fsize=y.cells[x].fsize;}}}
+this.setSizes();for(var x in this.cdata){this.cdata[x].conf.init={};}
+if(y.cells!=null){for(var x in y.cells){if(y.cells[x].layout!=null){this.cdata[x].dataNested=true;this.cdata[x]._layoutMainInst=this;this.cdata[x].attachLayout({pattern:y.cells[x].layout});this.cdata[x]._layoutMainInst=null;}}}};this.setSizes=function(F,N,J,y){var H=this.conf.inited==true&&this._getMainInst()==this&&this.checkEvent("onResizeFinish")==true?{}:false;this._adjustCont();var M=this.cont.offsetWidth;var D=this.cont.offsetHeight;if(this.conf.mode=="c"){var a=0;var O=0;var x=M;var L=D;this.cdata.a._setSize(a,O,x,L,F,J,y);this.callEvent("_onSetSizes",[]);if(H&&!(this.conf.b_size.w==M&&this.conf.b_size.h==D)){this._callMainEvent("onResizeFinish",[]);}
+this.conf.b_size={w:M,h:D};return;}
+if(typeof N=="undefined"){var A=this.conf.mode=="v"?"w":"h";N=this.conf.autosize;if(this.cdata.a.conf.collapsed){N="b";}else{if(this.cdata.b.conf.collapsed){N="a";}else{if(F=="a"||F=="b"){N=this.conf.nextCell[F];}}}}else{}
+if(this.conf.mode=="v"){if(N=="a"){if(this.cdata.b.conf.init.w!=null){var K=Math.round(M*this.cdata.b.conf.init.w-this.conf.sw/2);}else{var K=this.cdata.b.conf.size.w;}
+var I=M-K;var E=0;var C=D;var a=0;var O=E;var x=I-a-this.conf.sw;var L=C;}else{var a=0;var O=0;if(this.cdata.a.conf.init.w!=null){var x=Math.round(M*this.cdata.a.conf.init.w-this.conf.sw/2)-a;}else{var x=this.cdata.a.conf.size.w;}
+var L=D-O;var I=a+x+this.conf.sw;var E=O;var K=M-I;var C=L;}
+this.cdata.a._setSize(a,O,x,L,F,J,y);this.cdata.b._setSize(I,E,K,C,F,J,y);this.sep._setSize(a+x,O,this.conf.sw,L);}else{if(N=="a"){if(this.cdata.b.conf.init.h!=null){var C=Math.round(D*this.cdata.b.conf.init.h-this.conf.sw/2);}else{var C=this.cdata.b.conf.size.h;}
+var I=0;var E=D-C;var K=M-I;var a=I;var O=0;var x=K;var L=E-O-this.conf.sw;}else{var a=0;var O=0;var x=M-a;if(this.cdata.a.conf.init.h!=null){var L=Math.round(D*this.cdata.a.conf.init.h-this.conf.sw/2);}else{var L=this.cdata.a.conf.size.h;}
+var I=a;var E=O+L+this.conf.sw;var K=x;var C=D-E;}
+this.cdata.a._setSize(a,O,x,L,F,J,y);this.cdata.b._setSize(I,E,K,C,F,J,y);this.sep._setSize(a,O+L,x,this.conf.sw);}
+this.callEvent("_onSetSizes",[]);if(H&&!(this.conf.b_size.w==M&&this.conf.b_size.h==D)){this._callMainEvent("onResizeFinish",[]);}
+this.conf.b_size={w:M,h:D};};this._getAvailWidth=function(){var A=[];for(var E=0;E0?Math.min.apply(window,A):0;return this.cont.offsetWidth-D;};this._getAvailHeight=function(){var A=[];for(var D=0;D=0&&navigator.userAgent.indexOf("Trident")>=0){this.conf.btn_left=1;}
+this.sep=document.createElement("DIV");this.sep.className="dhxlayout_sep";if(window.dhx4.isIE==true){this.sep.onselectstart=function(){return false;};}
+this.sep.className="dhxlayout_sep dhxlayout_sep_resize_"+this.conf.mode;this._setSize=function(g,m,j,l){this.sep.style.left=g+"px";this.sep.style.top=m+"px";this.sep.style.width=Math.max(j,0)+"px";this.sep.style.height=Math.max(l,0)+"px";};this._lockSep=function(g){this.conf.locked=g==true;this._blockSep();};this._setWH=function(g){var h=this._getLayout();h.conf.sw=g==null?h._detectSW():Math.max(parseInt(g)||-1,-1);h._getMainInst().setSizes();h=null;};this._blockSep=function(){var g=this._getLayout();var h=g.cdata.a.conf.collapsed||g.cdata.b.conf.collapsed||this.conf.locked;g=null;if(this.conf.blocked==h){return;}
+this.sep.className="dhxlayout_sep"+(h?"":" dhxlayout_sep_resize_"+this.conf.mode);this.conf.blocked=h;};this._beforeResize=function(h){if(this.conf.blocked){return;}
+if(this.conf.resize!=null&&this.conf.resize.active==true){return;}
+if(h.type==window.dhx4.dnd.evs.start){this.sep.className+=" dhxlayout_sep_resize_actv";var l=h.pageX||h.touches[0].pageX;var j=h.pageY||h.touches[0].pageY;}else{if(h.button!==this.conf.btn_left){return;}
+var l=h.clientX;var j=h.clientY;}
+if(window.dhx4.dnd.p_en==true){window.dhx4.dnd._touchOff();}
+var g=this._getLayout();this.conf.resize={sx:l,sy:j,tx:h.layerX,ty:h.layerY,sep_x:parseInt(this.sep.style.left),sep_y:parseInt(this.sep.style.top),min_wa:g.cdata.a._getAvailWidth("a"),min_wb:g.cdata.b._getAvailWidth("b"),min_ha:g.cdata.a._getAvailHeight("a"),min_hb:g.cdata.b._getAvailHeight("b"),};this.conf.resize.nx=this.conf.resize.sep_x;this.conf.resize.ny=this.conf.resize.sep_y;if(typeof window.addEventListener=="function"){window.addEventListener("mousemove",this._doOnMouseMove,false);window.addEventListener("mouseup",this._doOnMouseUp,false);window.addEventListener(window.dhx4.dnd.evs.move,this._doOnMouseMove,false);window.addEventListener(window.dhx4.dnd.evs.end,this._doOnMouseUp,false);}else{document.body.attachEvent("onmousemove",this._doOnMouseMove);document.body.attachEvent("onmouseup",this._doOnMouseUp);}
+g=null;};this._onResize=function(j){if(!this.conf.resize.active){this._initResizeArea();this.conf.resize.active=true;}
+if(this.conf.mode=="v"){var g=j.type=="mousemove"?j.clientX:j.pageX||j.touches[0].pageX;var h=this.conf.resize.sx-g;this.conf.resize.nx=this.conf.resize.sep_x-h;if(this.conf.resize.nx>this.conf.resize.sep_x+this.conf.resize.min_wb){this.conf.resize.nx=this.conf.resize.sep_x+this.conf.resize.min_wb;}else{if(this.conf.resize.nxthis.conf.resize.sep_y+this.conf.resize.min_hb){this.conf.resize.ny=this.conf.resize.sep_y+this.conf.resize.min_hb;}else{if(this.conf.resize.ny";this.cell.insertBefore(a,this.cell.childNodes[this.conf.idx.cont]);a=null;this.conf.ofs_nodes.t._getHdrHeight="func";this.conf.hdr={visible:true};this.conf.idx_data.hdr="dhx_cell_hdr";this._updateIdx();this.attachEvent("_onSetSize",this._hdrOnSetSize);this.attachEvent("_onBorderChange",this._hdrOnBorderChange);this.attachEvent("_onViewSave",this._hdrOnViewSave);this.attachEvent("_onViewRestore",this._hdrOnViewRestore);};dhtmlXLayoutCell.prototype.showHeader=function(a){if(this.conf.hdr.visible||this.conf.collapsed){return;}
+if(this.conf.hdr.w_saved>this._getAvailWidth()||this.conf.hdr.h_saved>this._getAvailHeight()){return;}
+this.conf.hdr.w_saved=this.conf.hdr.h_saved=null;this.conf.hdr.visible=true;this.cell.childNodes[this.conf.idx.hdr].className="dhx_cell_hdr";if(a!==true){this._adjustCont(this._idd);}};dhtmlXLayoutCell.prototype.hideHeader=function(a){if(!this.conf.hdr.visible||this.conf.collapsed){return;}
+this.conf.hdr.w_saved=this._getMinWidth(this._idd);this.conf.hdr.h_saved=this._getMinHeight(this._idd);this.conf.hdr.visible=false;this.cell.childNodes[this.conf.idx.hdr].className="dhx_cell_hdr dhx_cell_hdr_hidden";this._hdrUpdBorder();this._mtbUpdBorder();if(a!==true){this._adjustCont(this._idd);}};dhtmlXLayoutCell.prototype.isHeaderVisible=function(){return this.conf.hdr.visible==true;};dhtmlXLayoutCell.prototype.showArrow=function(){this.cell.childNodes[this.conf.idx.hdr].childNodes[1].style.display="";};dhtmlXLayoutCell.prototype.hideArrow=function(){this.cell.childNodes[this.conf.idx.hdr].childNodes[1].style.display="none";};dhtmlXLayoutCell.prototype.isArrowVisible=function(){return this.cell.childNodes[this.conf.idx.hdr].childNodes[1].style.display=="";};dhtmlXLayoutCell.prototype.setText=function(a){this.conf.hdr.text=a;this._hdrUpdText();};dhtmlXLayoutCell.prototype.getText=function(){return this.conf.hdr.text;};dhtmlXLayoutCell.prototype.setCollapsedText=function(a){this.conf.hdr.text_collapsed=a;this._hdrUpdText();};dhtmlXLayoutCell.prototype.getCollapsedText=function(){return this.conf.hdr.text_collapsed!=null?this.conf.hdr.text_collapsed:this.conf.hdr.text;};dhtmlXLayoutCell.prototype._hdrUpdText=function(){var a=this.conf.collapsed==true&&this.conf.hdr.text_collapsed!=null?this.conf.hdr.text_collapsed:this.conf.hdr.text;this.cell.childNodes[this.conf.idx.hdr].firstChild.innerHTML=""+a+"";};dhtmlXLayoutCell.prototype._hdrUpdBorder=function(){if(this.conf.borders==true){this.cell.childNodes[this.conf.idx.hdr].className="dhx_cell_hdr"+(this.conf.hdr.visible?"":" dhx_cell_hdr_hidden");}else{if(!this.conf.hdr.visible){this.cell.childNodes[this.conf.idx.hdr].className="dhx_cell_hdr dhx_cell_hdr_hidden_no_borders";}}};dhtmlXLayoutCell.prototype._hdrOnSetSize=function(){if(this.conf.collapsed&&this.conf.mode=="v"){this._fitHdr();}};dhtmlXLayoutCell.prototype._hdrOnBorderChange=function(){this.hideHeader(true);this._hdrUpdBorder();};dhtmlXLayoutCell.prototype._hdrOnViewSave=function(a){this.views[a].hdr_vis=this.conf.hdr.visible;};dhtmlXLayoutCell.prototype._hdrOnViewRestore=function(a){if(this.conf.hdr.visible!=this.views[a].hdr_vis){this[this.views[a].hdr_vis?"showHeader":"hideHeader"](true);}
+this.views[a].hdr_vis=null;delete this.views[a].hdr_vis;};dhtmlXLayoutCell.prototype._getHdrHeight=function(a){if(this.conf.collapsed&&this.conf.mode=="v"&&a!==true){return 27;}
+return this.cell.childNodes[this.conf.idx.hdr].offsetHeight;};dhtmlXLayoutCell.prototype._fitHdr=function(){if(this.conf.collapsed){if(typeof dhtmlXLayoutObject.prototype._confGlob.hdrColH=="undefined"){this.cell.childNodes[this.conf.idx.hdr].style.height=this.cell.offsetHeight+"px";dhtmlXLayoutObject.prototype._confGlob.hdrColH=parseInt(this.cell.childNodes[this.conf.idx.hdr].style.height)-this._getHdrHeight(true);}
+this.cell.childNodes[this.conf.idx.hdr].style.height=this.cell.offsetHeight+dhtmlXLayoutObject.prototype._confGlob.hdrColH+"px";}else{this.cell.childNodes[this.conf.idx.hdr].style.height=null;}};dhtmlXLayoutCell.prototype.expand=function(l){if(!this.conf.collapsed){return true;}
+var e=this.layout;if(this.conf.mode=="v"){var j=l?e.conf.hh:e.cdata[e.conf.nextCell[this._idd]]._getMinWidth(this._idd);var g=e.cont.offsetWidth-e.conf.sw;if(j+this.conf.size.w_avl>g){e=null;return false;}}else{var h=l?e.conf.hh:e.cdata[e.conf.nextCell[this._idd]]._getMinHeight(this._idd)+e.cdata[e.conf.nextCell[this._idd]]._getHdrHeight();var c=e.cont.offsetHeight-e.conf.sw;if(h+this.conf.size.h_avl>c){e=null;return false;}}
+if(this.conf.docked==false){this.dock();return;}
+this.cell.className=String(this.cell.className).replace(/\s{0,}dhxlayout_collapsed_[hv]/gi,"");this.conf.collapsed=false;if(this.conf.mode=="v"){this.conf.size.w=Math.min(g-j,this.conf.size.w_saved);this.conf.size.w_saved=this.conf.size.w_avl=null;}else{this.conf.size.h=Math.min(c-h,this.conf.size.h_saved);this.conf.size.h_saved=this.conf.size.h_avl=null;}
+if(this.conf.mode=="v"){this._fitHdr();}
+e.setSizes(e.conf.nextCell[this._idd],e.conf.nextCell[this._idd],l==true,"expand");e.sep._blockSep();e=null;this._hdrUpdText();var a=this.layout._getMainInst();a._callMainEvent("onExpand",[this.conf.name]);a=null;return true;};dhtmlXLayoutCell.prototype.collapse=function(){if(this.conf.collapsed){return false;}
+var c=this.layout;if(c.cdata[c.conf.nextCell[this._idd]].expand(true)==false){return false;}
+if(this.conf.mode=="v"){this.conf.size.w_saved=this.conf.size.w;this.conf.size.w_avl=this._getMinWidth(this._idd);}else{this.conf.size.h_saved=this.conf.size.h;this.conf.size.h_avl=this._getMinHeight(this._idd)+this._getHdrHeight();}
+this.cell.className+=" dhxlayout_collapsed_"+this.conf.mode;this.conf.collapsed=true;if(this.conf.mode=="v"){this.conf.size.w=c.conf.hh;}else{this.conf.size.h=this._getHdrHeight();}
+c.setSizes(c.conf.nextCell[this._idd],c.conf.nextCell[this._idd],false,"collapse");c.sep._blockSep();c=null;this._hdrUpdText();var a=this.layout._getMainInst();a._callMainEvent("onCollapse",[this.conf.name]);a=null;return true;};dhtmlXLayoutCell.prototype.isCollapsed=function(){return this.conf.collapsed==true;};dhtmlXLayoutCell.prototype.setMinWidth=function(a){this.conf.min_width=parseInt(a)||0;};dhtmlXLayoutCell.prototype.setMinHeight=function(a){this.conf.min_height=parseInt(a)||0;};dhtmlXLayoutCell.prototype._getMinWidth=function(c){if(this.dataType=="layout"&&this.dataObj!=null){if(this.layout._getMainInst()!=this.dataObj._getMainInst()){return this.dataObj._getAvailWidth();}
+if(this.dataObj.conf.pattern=="1C"){return Math.max(this.conf.min_width,this.dataObj.cdata.a._getMinWidth(c));}else{if(this.dataObj.conf.mode=="v"){var a=c||this._idd;if(this.dataObj.cdata[a].conf.collapsed){a=this.dataObj.conf.nextCell[a];}
+return Math.max(this.conf.min_width,this.dataObj.cdata[a]._getMinWidth(c)+this.dataObj.cdata[this.dataObj.conf.nextCell[a]]._getWidth()+this.dataObj.conf.sw);}else{return Math.max(this.conf.min_width,this.dataObj.cdata.a._getMinWidth(c),this.dataObj.cdata.b._getMinWidth(c));}}}
+return Math.max(this.conf.min_width,1);};dhtmlXLayoutCell.prototype._getMinHeight=function(e){var c=0;if(this.conf.idx.menu!=null){c+=this.cell.childNodes[this.conf.idx.menu].offsetHeight;}
+if(this.dataType=="layout"&&this.dataObj!=null){if(this.layout._getMainInst()!=this.dataObj._getMainInst()){return this.dataObj._getAvailHeight();}
+if(this.dataObj.conf.pattern=="1C"){return Math.max(this.conf.min_height,this.dataObj.cdata.a._getMinHeight(e));}else{if(this.dataObj.conf.mode=="h"){var a=e;if(this.dataObj.cdata[a].conf.collapsed){a=this.dataObj.conf.nextCell[a];}
+return Math.max(this.conf.min_height,this.dataObj.cdata[a]._getMinHeight(e)+this.dataObj.cdata[a]._getHdrHeight()+this.dataObj.cdata[this.dataObj.conf.nextCell[a]]._getHeight()+this.dataObj.conf.sw);}else{return Math.max(this.conf.min_height,this.dataObj.cdata.a._getMinHeight(e)+this.dataObj.cdata.a._getHdrHeight(),this.dataObj.cdata.b._getMinHeight(e)+this.dataObj.cdata.b._getHdrHeight());}}}
+return Math.max(this.conf.min_height,c);};dhtmlXLayoutCell.prototype._getAvailWidth=function(e){if(this.dataType=="layout"&&this.dataObj!=null){if(this.dataObj.conf.pattern=="1C"){return this.dataObj.cdata.a._getAvailWidth(e);}else{if(this.dataObj.conf.mode=="v"){var a=this.dataObj.cdata.a.conf.collapsed==true;var c=this.dataObj.cdata.b.conf.collapsed==true;if(e=="a"){return this.dataObj.cdata[c?"a":"b"]._getAvailWidth(e);}else{return this.dataObj.cdata[a?"b":"a"]._getAvailWidth(e);}}else{return Math.min(this.dataObj.cdata.a._getAvailWidth(e),this.dataObj.cdata.b._getAvailWidth(e));}}}
+return this.cell.offsetWidth-this._getMinWidth();};dhtmlXLayoutCell.prototype._getAvailHeight=function(g){if(this.dataType=="layout"&&this.dataObj!=null){if(this.dataObj.conf.pattern=="1C"){return this.dataObj.cdata.a._getAvailHeight(g);}else{if(this.dataObj.conf.mode=="h"){var c=this.dataObj.cdata.a.conf.collapsed==true;var e=this.dataObj.cdata.b.conf.collapsed==true;if(g=="a"){return this.dataObj.cdata[e?"a":"b"]._getAvailHeight(g);}else{return this.dataObj.cdata[c?"b":"a"]._getAvailHeight(g);}}else{return Math.min(this.dataObj.cdata.a._getAvailHeight(g),this.dataObj.cdata.b._getAvailHeight(g));}}}
+var a=this._getHdrHeight();if(this.conf.mode=="v"&&this.conf.collapsed){a=this.conf.hh;}
+return this.cell.offsetHeight-a-this._getMinHeight();};dhtmlXLayoutCell.prototype.setWidth=function(g){if(this.conf.mode=="v"){if(this.conf.collapsed){return;}
+var h=this.layout;var j=h.cdata[h.conf.nextCell[this._idd]];if(j.conf.collapsed){g=g+h.conf.sw+j._getWidth();l=h=j=null;return;}
+var e=this._getMinWidth(this._idd);var m=h.cont.offsetWidth-j._getMinWidth(this._idd)-h.conf.sw;g=Math.max(e,Math.min(g,m));this.conf.size.w=g;h.setSizes(j._idd,j._idd);h=j=null;}else{if(this.layout==null||this.layout.parentLayout==null){return;}
+var l=this.layout.parentLayout;var h=this.layout;var j=h.cdata[h.conf.nextCell[this._idd]];for(var c in l.cdata){if(l.cdata[c].dataObj==h){l.cdata[c].setWidth(g);}}
+l=h=null;}};dhtmlXLayoutCell.prototype.setHeight=function(m){if(this.conf.mode=="h"){if(this.conf.collapsed){return;}
+var g=this.layout;var l=g.cdata[g.conf.nextCell[this._idd]];if(l.conf.collapsed){m=m+g.conf.sw+l._getHeight();var n=this.layout!=null&&this.layout.parentLayout!=null?this.layout.parentLayout:null;if(n!=null){for(var c in n.cdata){if(n.cdata[c].dataObj==g){n.cdata[c].setHeight(m);}}}
+n=g=l=null;return;}
+var j=this._getMinHeight(this._idd)+this._getHdrHeight();var e=g.cont.offsetHeight-l._getMinHeight(this._idd)-l._getHdrHeight()-g.conf.sw;m=Math.max(j,Math.min(m,e));this.conf.size.h=m;g.setSizes(l._idd,l._idd);g=l=null;}else{if(this.layout==null||this.layout.parentLayout==null){return;}
+var n=this.layout.parentLayout;var g=this.layout;var l=g.cdata[g.conf.nextCell[this._idd]];for(var c in n.cdata){if(n.cdata[c].dataObj==g){n.cdata[c].setHeight(m);}}
+n=g=null;}};dhtmlXLayoutCell.prototype.getWidth=function(){return this.conf.size.w;};dhtmlXLayoutCell.prototype.getHeight=function(){return this.conf.size.h;};dhtmlXLayoutCell.prototype.fixSize=function(c,g){this.conf.fixed.w=window.dhx4.s2b(c);this.conf.fixed.h=window.dhx4.s2b(g);var a=this.layout._getMainInst();var e={};a.forEachItem(function(h){if(h.conf.fsize!=null){var n=h.getId();var m={h:h.conf.fixed.w==true,v:h.conf.fixed.h==true};for(var j in m){if(m[j]==true&&h.conf.fsize[j]!=null){if(!(h.conf.fsize[j]instanceof Array)){h.conf.fsize[j]=[h.conf.fsize[j]];}
+for(var l=0;l=0&&(c.indexOf("5.1.7")>=0||(c.match(/7[\.\d]* mobile/gi)!=null&&c.match(/AppleWebKit/gi)!=null))){this.conf.tabsContCss=" safari_517_fix";}
+var j;if(g!=null&&typeof g=="object"&&typeof g.tagName=="undefined"){j=g.parent;if(typeof g.skin!="undefined"){this.conf.skin=g.skin;}
+if(typeof g.mode!="undefined"){this.conf.tabsMode=g.mode=="bottom"?"bottom":"top";}
+if(typeof g.align!="undefined"){this.conf.align=g.align=="right"?"right":"left";}
+if(typeof g.close_button!="undefined"){this.conf.closeButton=window.dhx4.s2b(g.close_button);}
+if(typeof g.content_zone!="undefined"){this.conf.contZone=window.dhx4.s2b(g.content_zone);}
+if(typeof g.xml!="undefined"){this.conf.autoload.xml=g.xml;}
+if(typeof g.json!="undefined"){this.conf.autoload.xml=g.json;}
+if(typeof g.tabs!="undefined"){this.conf.autoload.tabs=g.tabs;}
+if(typeof g.onload!="undefined"){this.conf.autoload.tabs=g.tabs;}
+if(typeof g.arrows_mode!="undefined"){this.conf.autoload.arrows_mode=g.arrows_mode;}}else{j=g;}
+window.dhtmlXCellTop.apply(this,[j,g.offsets]);if(this.base._ofs!=null&&this.base._ofs.t!=null){this.conf.tabsTop=this.base._ofs.t;}
+this.tabsMode=document.createElement("DIV");this.tabsMode.className="dhxtabbar_tabs_"+this.conf.tabsMode;this.cont.appendChild(this.tabsMode);this.tabsArea=document.createElement("DIV");this.tabsArea.className="dhxtabbar_tabs dhxtabbar_tabs_"+this.conf.tabsMode;this.tabsArea.innerHTML="";this.tabsArea.style.top=this.conf.tabsMode=="top"?this.conf.tabsTop+"px":"auto";this.tabsMode.appendChild(this.tabsArea);this.tabsArea.childNodes[1].childNodes[0].style[this.conf.align]="0px";this.tabsArea.childNodes[0].onclick=function(){if(h.conf.align=="left"){h._moveTabs(1);}else{h._moveTabs(-1);}};this.tabsArea.childNodes[2].onclick=function(){if(h.conf.align=="left"){h._moveTabs(-1);}else{h._moveTabs(1);}};this._onTabsAreaClick=function(a){return this._callMainEvent("onTabClose",[a]);};this.tabsArea.onclick=function(m){m=m||event;var a=m.target||m.srcElement;while(a!=null){if(typeof a._tabCloseId!="undefined"){if(h._onTabsAreaClick(a._tabCloseId)!==true){return;}
+h.t[a._tabCloseId].conf.remove=true;h._hideTab(a._tabCloseId);a=null;}else{if(typeof a._tabId!="undefined"){h._doOnClick(a._tabId);a=null;}}
+if(a!=null){a=a.parentNode;if(a==this){a=null;}}}};this.tabsArea.onselectstart=function(a){a=a||event;if(a.preventDefault){a.preventDefault();}else{a.returnValue=false;}};this._doOnClick=function(a){this.callEvent("onTabClick",[a,this.conf.lastActive]);if(this.t[a].conf.enabled){this._setTabActive(a);}};this.t={};this.addTab=function(a,v,n,s,r,w){if(typeof w!="boolean"){w=this.conf.closeButton==true;}
+r=window.dhx4.s2b(r);var o=document.createElement("DIV");o.className="dhxtabbar_tab";o.innerHTML=""+v+"
"+(w?"":"");o._tabId=a;if(w){o.childNodes[1]._tabCloseId=a;}
+var m=this.tabsArea.childNodes[1].firstChild;if(s!=null&&s+1>0&&s+1s.offsetWidth){n={d:-1,id:u};}}}
+a+=m;}}
+if(n!=null){this._moveTabs(n.d,n.id);}else{if(s.offsetWidth>a+1){s.childNodes[0].style[this.conf.align]=Math.min(0,parseInt(s.childNodes[0].style[this.conf.align])+(s.offsetWidth-a))+"px";}}
+s=n=null;};this._moveTabs=function(w,o){var n=this.tabsArea.childNodes[1].childNodes[0];var u=0;var y=[];var C=null;for(var a=0;a=0&&A+y[a].w>0){v=y[a];}
+if(A0){if(v==null){if(y.length>0){D=y[y.length-1];}}else{if(v.ind>0&&y.length>=v.ind){D=y[v.ind-1];}}}else{if(r==null){if(y.length>0){D=y[0];}}else{if(y.length>r.ind){D=y[r.ind+1];}}}}
+if(D!=null){if(w>0){if(A=this.t[m].conf.width){this.t[m].tab.style.visibility="visible";}}else{this.t[m].conf.visible=true;this.t[m].tab.style.display="";if(a||this.t[m].conf.active){this.t[m].conf.active=false;this._setTabActive(m);}else{this._adjustTabs();}}};this._hideTab=function(s,a){if(this.t[s]==null){return;}
+if(this.t[s].conf.transActv==true){if(this.t[s].conf.transMode=="hide"){return;}}else{if(this.t[s].conf.visible!=true){return;}}
+var m=false;if(this.conf.lastActive==s){this.conf.lastActive=null;this.t[s].conf.active=false;this.t[s].tab.className=this._tabCss(s);m=true;}
+var o=this._getPrevVisible(s);var n=this._getNextVisible(s);var r=m&&a!==false?(a==true?null:a)||n||o:null;if(this.conf.transProp!==false){this.t[s].conf.transActv=true;this.t[s].conf.transMode="hide";this.t[s].conf.transProp=this.conf.transProp;this.t[s].conf.transActvId=r;this.t[s].conf.visible=false;if(!this.t[s].conf.transEv){this.t[s].tab.addEventListener(this.conf.transEv,this._doOnTrEnd,false);this.t[s].conf.transEv=true;}
+this.t[s].tab.style.visibility="hidden";this.t[s].tab.className=h._tabCss(s);this.t[s].tab.style[this.conf.transProp]=this.conf.transValueWidth;this.t[s].tab.style.width="0px";}else{this.t[s].tab.style.display="none";this.t[s].conf.visible=false;if(this.conf.contZone){this.t[s].cell.cell.style.visibility="hidden";this.t[s].cell.cell.style.top="-5000px";}
+if(r!=null){this._setTabActive(r);}
+this._adjustTabs();if(this.t[s].conf.remove){this._removeTab(s);}}};this._isTabVisible=function(a){return this.t[a].conf.visible==true;};this._doOnTrEnd=function(){var n=this._tabId;if(h.t[n]==null){return;}
+var a=h.t[n];var m=a.conf.transActvId;if(a.conf.transMode=="hide"){if(a.conf.remove){h._removeTab(n);}else{a.tab.style[a.conf.transProp]="";if(h.conf.contZone){a.cell.cell.style.visibility="hidden";a.cell.cell.style.top="-5000px";}
+a.conf.transActv=false;}}else{if(a.conf.transMode=="show"){a.tab.style[a.conf.transProp]="";a.tab.style.visibility="visible";a.conf.transMode=null;a.conf.transActv=false;}}
+if(m!=null){h._setTabActive(m);}else{h._adjustTabs();}
+a=null;};this.enableTabCloseButton=function(a){this.conf.closeButton=window.dhx4.s2b(a);};this.unload=function(){this.conf.unloading=true;this.clearAll();this.t=null;if(this.tabsTextTest!=null){if(this.tabsTextTest.parentNode){this.tabsTextTest.parentNode.removeChild(this.tabsTextTest);}
+this.tabsTextTest=null;}
+window.dhx4._enableDataLoading(this,null,null,null,"clear");this.tabsArea.childNodes[0].onclick=null;this.tabsArea.childNodes[2].onclick=null;this.tabsArea.onclick=null;this.tabsArea.onselectstart=null;this.tabsArea.parentNode.removeChild(this.tabsArea);this.tabsArea=null;this.tabsMode.parentNode.removeChild(this.tabsMode);this.tabsMode=null;this._unloadTop();window.dhx4._eventable(this,"clear");for(var m in this){this[m]=null;}
+h=null;};this.enableContentZone=function(a){this.conf.contZone=a==true;};this.setSkin=function(n){this._setBaseSkin(n);this.conf.skin=n;if(this.tabsTextTest!=null){this.tabsTextTest.className="dhxtabbar_tabs_text_test_"+this.conf.skin;}
+for(var m in this.t){this.t[m].cell._resetSizeState();if(this.t[m].conf.autowidth==true){this.t[m].conf.width=this._getLabelWidth(this.t[m].conf.text,this.t[m].conf.close);if(this.t[m].conf.visible){this.t[m].tab.style.width=this.t[m].conf.width+"px";}}}
+this.conf.tabsAreaOfs=null;this._fixTabsOfs();this.setSizes();};this.setAlign=function(a){a=a=="left"?"left":"right";if(a==this.conf.align){this.tabsArea.childNodes[1].childNodes[0].style[this.conf.align]="0px";return;}
+if(this.conf.transProp!==false){this.tabsArea.childNodes[1].childNodes[0].style[this.conf.transProp]="";}
+this.tabsArea.childNodes[1].childNodes[0].style[this.conf.align]="";this.conf.align=a;this.tabsArea.childNodes[1].childNodes[0].className="dhxtabbar_tabs_cont_"+this.conf.align+this.conf.tabsContCss;this.tabsArea.childNodes[1].childNodes[0].style[this.conf.align]="0px";if(this.conf.transProp!==false){this.conf.transValuePos=this.conf.align+" "+this.conf.transSpeed;this.tabsArea.childNodes[1].childNodes[0].style[this.conf.transProp]=this.conf.transValuePos;}};this._initObj=function(o){this.conf.initSeq=true;this.clearAll();var a=false;if(o.settings!=null){if(o.settings.skin!=null){this.setSkin(o.settings.skin);}
+if(o.settings.closeButton!=null){this.enableTabCloseButton(window.dhx4.s2b(o.settings.closeButton));}
+if(o.settings.align!=null){this.setAlign(o.settings.align);}
+if(o.settings.hrefmode=="ajax"){a=true;}
+if(o.settings.hrefmode=="ajax-html"){a=true;this.conf.url_demand=true;}}
+if(o.tabs!=null){for(var n=0;n=c.childNodes.length){c.appendChild(this.t[e].tab);}else{c.insertBefore(this.t[e].tab,c.childNodes[a]);}}
+c=null;};dhtmlXTabBar.prototype._getIndex=function(g){var a=-1;var e=this.tabsArea.childNodes[1].firstChild;for(var c=1;cthis.cont.offsetWidth){if(c.className.search(/dhxtabbar_tabs_ar_hidden/)>=0){c.className=c.className.replace(/\s{0,}dhxtabbar_tabs_ar_hidden/,"");j.className=j.className.replace(/\s{0,}dhxtabbar_tabs_ar_hidden/,"");h=true;}}else{if(c.className.search(/dhxtabbar_tabs_ar_hidden/)<1){c.className+=" dhxtabbar_tabs_ar_hidden";j.className+=" dhxtabbar_tabs_ar_hidden";h=true;}}
+c=j=null;}
+return h;};dhtmlXTabBar.prototype._loadURLOnDemand=function(a){if(a!=null&&this.conf.urls[a]!=null){this.cells(a).attachURL(this.conf.urls[a].href,this.conf.urls[a].ajax);this.conf.urls[a]=null;}};window.dhtmlXTabBarCell=function(g,e){dhtmlXCellObject.apply(this,[g,"_tabbar"]);this.tabbar=e;this.conf.skin=this.tabbar.conf.skin;this.conf.tabbar_funcs={show:"_showTab",hide:"_hideTab",isVisible:"_isTabVisible",enable:"_enableTab",disable:"_disableTab",isEnabled:"_isTabEnabled",getIndex:"_getIndex",getText:"_getTabText",setText:"_setTabText",setActive:"_setTabActive",isActive:"_isTabActive",close:"_removeTab",};this._tabbarCall=function(a){return function(){var h=[this._idd];for(var j=0;j