dhtmlx=function(d){for(var a in d){dhtmlx[a]=d[a];}return dhtmlx;};dhtmlx.extend_api=function(f,g,h){var e=window[f];if(!e){return;}window[f]=function(a){if(a&&typeof a=="object"&&!a.tagName){var b=e.apply(this,(g._init?g._init(a):arguments));for(var c in dhtmlx){if(g[c]){this[g[c]](dhtmlx[c]);}}for(var c in a){if(g[c]){this[g[c]](a[c]);}else{if(c.indexOf("on")==0){this.attachEvent(c,a[c]);}}}}else{var b=e.apply(this,arguments);}if(g._patch){g._patch(this);}return b||this;};window[f].prototype=e.prototype;if(h){dhtmlXHeir(window[f].prototype,h);}};dhtmlxAjax={get:function(e,f){var d=new dtmlXMLLoaderObject(true);d.async=(arguments.length<3);d.waitCall=f;d.loadXML(e);return d;},post:function(f,h,g){var e=new dtmlXMLLoaderObject(true);e.async=(arguments.length<4);e.waitCall=g;e.loadXML(f,true,h);return e;},getSync:function(b){return this.get(b,null,true);},postSync:function(d,c){return this.post(d,c,null,true);}};function dtmlXMLLoaderObject(e,g,h,f){this.xmlDoc="";if(typeof(h)!="undefined"){this.async=h;}else{this.async=true;}this.onloadAction=e||null;this.mainObject=g||null;this.waitCall=null;this.rSeed=f||false;return this;}dtmlXMLLoaderObject.prototype.waitLoadFunction=function(c){var d=true;this.check=function(){if((c)&&(c.onloadAction!=null)){if((!c.xmlDoc.readyState)||(c.xmlDoc.readyState==4)){if(!d){return;}d=false;if(typeof c.onloadAction=="function"){c.onloadAction(c.mainObject,null,null,null,c);}if(c.waitCall){c.waitCall.call(this,c);c.waitCall=null;}}}};return this.check;};dtmlXMLLoaderObject.prototype.getXMLTopNode=function(j,g){if(this.xmlDoc.responseXML){var f=this.xmlDoc.responseXML.getElementsByTagName(j);if(f.length==0&&j.indexOf(":")!=-1){var f=this.xmlDoc.responseXML.getElementsByTagName((j.split(":"))[1]);}var h=f[0];}else{var h=this.xmlDoc.documentElement;}if(h){this._retry=false;return h;}if((_isIE)&&(!this._retry)){var i=this.xmlDoc.responseText;var g=this.xmlDoc;this._retry=true;this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=false;this.xmlDoc["loadXM"+"L"](i);return this.getXMLTopNode(j,g);}dhtmlxError.throwError("LoadXML","Incorrect XML",[(g||this.xmlDoc),this.mainObject]);return document.createElement("DIV");};dtmlXMLLoaderObject.prototype.loadXMLString=function(d){try{var f=new DOMParser();this.xmlDoc=f.parseFromString(d,"text/xml");}catch(e){this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=this.async;this.xmlDoc["loadXM"+"L"](d);}this.onloadAction(this.mainObject,null,null,null,this);if(this.waitCall){this.waitCall();this.waitCall=null;}};dtmlXMLLoaderObject.prototype.loadXML=function(h,e,f,g){if(this.rSeed){h+=((h.indexOf("?")!=-1)?"&":"?")+"a_dhx_rSeed="+(new Date()).valueOf();}this.filePath=h;if((!_isIE)&&(window.XMLHttpRequest)){this.xmlDoc=new XMLHttpRequest();}else{if(document.implementation&&document.implementation.createDocument){this.xmlDoc=document.implementation.createDocument("","",null);this.xmlDoc.onload=new this.waitLoadFunction(this);this.xmlDoc.load(h);return;}else{this.xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");}}if(this.async){this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);}this.xmlDoc.open(e?"POST":"GET",h,this.async);if(g){this.xmlDoc.setRequestHeader("User-Agent","dhtmlxRPC v0.1 ("+navigator.userAgent+")");this.xmlDoc.setRequestHeader("Content-type","text/xml");}else{if(e){this.xmlDoc.setRequestHeader("Content-type","application/x-www-form-urlencoded");}}this.xmlDoc.setRequestHeader("X-Requested-With","XMLHttpRequest");this.xmlDoc.send(null||f);if(!this.async){(new this.waitLoadFunction(this))();}};dtmlXMLLoaderObject.prototype.destructor=function(){this.onloadAction=null;this.mainObject=null;this.xmlDoc=null;return null;};dtmlXMLLoaderObject.prototype.xmlNodeToJSON=function(g){var h={};for(var e=0;e<g.attributes.length;e++){h[g.attributes[e].name]=g.attributes[e].value;}h["_tagvalue"]=g.firstChild?g.firstChild.nodeValue:"";for(var e=0;e<g.childNodes.length;e++){var f=g.childNodes[e].tagName;if(f){if(!h[f]){h[f]=[];}h[f].push(this.xmlNodeToJSON(g.childNodes[e]));}}return h;};function callerFunction(d,c){this.handler=function(a){if(!a){a=window.event;}d(a,c);return true;};return this.handler;}function getAbsoluteLeft(b){return getOffset(b).left;}function getAbsoluteTop(b){return getOffset(b).top;}function getOffsetSum(e){var f=0,d=0;while(e){f=f+parseInt(e.offsetTop);d=d+parseInt(e.offsetLeft);e=e.offsetParent;}return{top:f,left:d};}function getOffsetRect(q){var n=q.getBoundingClientRect();var m=document.body;var s=document.documentElement;var t=window.pageYOffset||s.scrollTop||m.scrollTop;var p=window.pageXOffset||s.scrollLeft||m.scrollLeft;var o=s.clientTop||m.clientTop||0;var l=s.clientLeft||m.clientLeft||0;var k=n.top+t-o;var r=n.left+p-l;return{top:Math.round(k),left:Math.round(r)};}function getOffset(b){if(b.getBoundingClientRect&&!_isChrome){return getOffsetRect(b);}else{return getOffsetSum(b);}}function convertStringToBoolean(b){if(typeof(b)=="string"){b=b.toLowerCase();}switch(b){case"1":case"true":case"yes":case"y":case 1:case true:return true;break;default:return false;}}function getUrlSymbol(b){if(b.indexOf("?")!=-1){return"&";}else{return"?";}}function dhtmlDragAndDropObject(){if(window.dhtmlDragAndDrop){return window.dhtmlDragAndDrop;}this.lastLanding=0;this.dragNode=0;this.dragStartNode=0;this.dragStartObject=0;this.tempDOMU=null;this.tempDOMM=null;this.waitDrag=0;window.dhtmlDragAndDrop=this;return this;}dhtmlDragAndDropObject.prototype.removeDraggableItem=function(b){b.onmousedown=null;b.dragStarter=null;b.dragLanding=null;};dhtmlDragAndDropObject.prototype.addDraggableItem=function(d,c){d.onmousedown=this.preCreateDragCopy;d.dragStarter=c;this.addDragLanding(d,c);};dhtmlDragAndDropObject.prototype.addDragLanding=function(d,c){d.dragLanding=c;};dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(b){if((b||event)&&(b||event).button==2){return;}if(window.dhtmlDragAndDrop.waitDrag){window.dhtmlDragAndDrop.waitDrag=0;document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU;document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM;return false;}window.dhtmlDragAndDrop.waitDrag=1;window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;window.dhtmlDragAndDrop.tempDOMM=document.body.onmousemove;window.dhtmlDragAndDrop.dragStartNode=this;window.dhtmlDragAndDrop.dragStartObject=this.dragStarter;document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;if((b)&&(b.preventDefault)){b.preventDefault();return false;}return false;};dhtmlDragAndDropObject.prototype.callDrag=function(j){if(!j){j=window.event;}dragger=window.dhtmlDragAndDrop;if((j.button==0)&&(_isIE)){return dragger.stopDrag();}if(!dragger.dragNode&&dragger.waitDrag){dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode,j);if(!dragger.dragNode){return dragger.stopDrag();}dragger.dragNode.onselectstart=function(){return false;};dragger.gldragNode=dragger.dragNode;document.body.appendChild(dragger.dragNode);document.body.onmouseup=dragger.stopDrag;dragger.waitDrag=0;dragger.dragNode.pWindow=window;dragger.initFrameRoute();}if(dragger.dragNode.parentNode!=window.document.body){var g=dragger.gldragNode;if(dragger.gldragNode.old){g=dragger.gldragNode.old;}g.parentNode.removeChild(g);var e=dragger.dragNode.pWindow;if(_isIE){var h=document.createElement("Div");h.innerHTML=dragger.dragNode.outerHTML;dragger.dragNode=h.childNodes[0];}else{dragger.dragNode=dragger.dragNode.cloneNode(true);}dragger.dragNode.pWindow=window;dragger.gldragNode.old=dragger.dragNode;document.body.appendChild(dragger.dragNode);e.dhtmlDragAndDrop.dragNode=dragger.dragNode;}dragger.dragNode.style.left=j.clientX+15+(dragger.fx?dragger.fx*(-1):0)+(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";dragger.dragNode.style.top=j.clientY+3+(dragger.fy?dragger.fy*(-1):0)+(document.body.scrollTop||document.documentElement.scrollTop)+"px";if(!j.srcElement){var i=j.target;}else{i=j.srcElement;}dragger.checkLanding(i,j);
};dhtmlDragAndDropObject.prototype.calculateFramePosition=function(h){if(window.name){var j=parent.frames[window.name].frameElement.offsetParent;var i=0;var f=0;while(j){i+=j.offsetLeft;f+=j.offsetTop;j=j.offsetParent;}if((parent.dhtmlDragAndDrop)){var g=parent.dhtmlDragAndDrop.calculateFramePosition(1);i+=g.split("_")[0]*1;f+=g.split("_")[1]*1;}if(h){return i+"_"+f;}else{this.fx=i;}this.fy=f;}return"0_0";};dhtmlDragAndDropObject.prototype.checkLanding=function(c,d){if((c)&&(c.dragLanding)){if(this.lastLanding){this.lastLanding.dragLanding._dragOut(this.lastLanding);}this.lastLanding=c;this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding,this.dragStartNode,d.clientX,d.clientY,d);this.lastLanding_scr=(_isIE?d.srcElement:d.target);}else{if((c)&&(c.tagName!="BODY")){this.checkLanding(c.parentNode,d);}else{if(this.lastLanding){this.lastLanding.dragLanding._dragOut(this.lastLanding,d.clientX,d.clientY,d);}this.lastLanding=0;if(this._onNotFound){this._onNotFound();}}}};dhtmlDragAndDropObject.prototype.stopDrag=function(d,f){dragger=window.dhtmlDragAndDrop;if(!f){dragger.stopFrameRoute();var e=dragger.lastLanding;dragger.lastLanding=null;if(e){e.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,e,(_isIE?event.srcElement:d.target));}}dragger.lastLanding=null;if((dragger.dragNode)&&(dragger.dragNode.parentNode==document.body)){dragger.dragNode.parentNode.removeChild(dragger.dragNode);}dragger.dragNode=0;dragger.gldragNode=0;dragger.fx=0;dragger.fy=0;dragger.dragStartNode=0;dragger.dragStartObject=0;document.body.onmouseup=dragger.tempDOMU;document.body.onmousemove=dragger.tempDOMM;dragger.tempDOMU=null;dragger.tempDOMM=null;dragger.waitDrag=0;};dhtmlDragAndDropObject.prototype.stopFrameRoute=function(f){if(f){window.dhtmlDragAndDrop.stopDrag(1,1);}for(var e=0;e<window.frames.length;e++){try{if((window.frames[e]!=f)&&(window.frames[e].dhtmlDragAndDrop)){window.frames[e].dhtmlDragAndDrop.stopFrameRoute(window);}}catch(d){}}try{if((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=f)){parent.dhtmlDragAndDrop.stopFrameRoute(window);}}catch(d){}};dhtmlDragAndDropObject.prototype.initFrameRoute=function(h,g){if(h){window.dhtmlDragAndDrop.preCreateDragCopy();window.dhtmlDragAndDrop.dragStartNode=h.dhtmlDragAndDrop.dragStartNode;window.dhtmlDragAndDrop.dragStartObject=h.dhtmlDragAndDrop.dragStartObject;window.dhtmlDragAndDrop.dragNode=h.dhtmlDragAndDrop.dragNode;window.dhtmlDragAndDrop.gldragNode=h.dhtmlDragAndDrop.dragNode;window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag;window.waitDrag=0;if(((!_isIE)&&(g))&&((!_isFF)||(_FFrv<1.8))){window.dhtmlDragAndDrop.calculateFramePosition();}}try{if((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=h)){parent.dhtmlDragAndDrop.initFrameRoute(window);}}catch(e){}for(var f=0;f<window.frames.length;f++){try{if((window.frames[f]!=h)&&(window.frames[f].dhtmlDragAndDrop)){window.frames[f].dhtmlDragAndDrop.initFrameRoute(window,((!h||g)?1:0));}}catch(e){}}};var _isFF=false;var _isIE=false;var _isOpera=false;var _isKHTML=false;var _isMacOS=false;var _isChrome=false;if(navigator.userAgent.indexOf("Macintosh")!=-1){_isMacOS=true;}if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){_isChrome=true;}if((navigator.userAgent.indexOf("Safari")!=-1)||(navigator.userAgent.indexOf("Konqueror")!=-1)){var _KHTMLrv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Safari")+7,5));if(_KHTMLrv>525){_isFF=true;var _FFrv=1.9;}else{_isKHTML=true;}}else{if(navigator.userAgent.indexOf("Opera")!=-1){_isOpera=true;_OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Opera")+6,3));}else{if(navigator.appName.indexOf("Microsoft")!=-1){_isIE=true;if(navigator.appVersion.indexOf("MSIE 8.0")!=-1&&document.compatMode!="BackCompat"){_isIE=8;}}else{_isFF=true;var _FFrv=parseFloat(navigator.userAgent.split("rv:")[1]);}}}dtmlXMLLoaderObject.prototype.doXPath=function(p,n,o,j){if(_isKHTML||(!_isIE&&!window.XPathResult)){return this.doXPathOpera(p,n);}if(_isIE){if(!n){if(!this.xmlDoc.nodeName){n=this.xmlDoc.responseXML;}else{n=this.xmlDoc;}}if(!n){dhtmlxError.throwError("LoadXML","Incorrect XML",[(n||this.xmlDoc),this.mainObject]);}if(o!=null){n.setProperty("SelectionNamespaces","xmlns:xsl='"+o+"'");}if(j=="single"){return n.selectSingleNode(p);}else{return n.selectNodes(p)||new Array(0);}}else{var r=n;if(!n){if(!this.xmlDoc.nodeName){n=this.xmlDoc.responseXML;}else{n=this.xmlDoc;}}if(!n){dhtmlxError.throwError("LoadXML","Incorrect XML",[(n||this.xmlDoc),this.mainObject]);}if(n.nodeName.indexOf("document")!=-1){r=n;}else{r=n;n=n.ownerDocument;}var l=XPathResult.ANY_TYPE;if(j=="single"){l=XPathResult.FIRST_ORDERED_NODE_TYPE;}var m=new Array();var q=n.evaluate(p,r,function(a){return o;},l,null);if(l==XPathResult.FIRST_ORDERED_NODE_TYPE){return q.singleNodeValue;}var k=q.iterateNext();while(k){m[m.length]=k;k=q.iterateNext();}return m;}};function _dhtmlxError(d,e,f){if(!this.catches){this.catches=new Array();}return this;}_dhtmlxError.prototype.catchError=function(c,d){this.catches[c]=d;};_dhtmlxError.prototype.throwError=function(d,e,f){if(this.catches[d]){return this.catches[d](d,e,f);}if(this.catches["ALL"]){return this.catches["ALL"](d,e,f);}alert("Error type: "+arguments[0]+"\nDescription: "+arguments[1]);return null;};window.dhtmlxError=new _dhtmlxError();dtmlXMLLoaderObject.prototype.doXPathOpera=function(j,g){var h=j.replace(/[\/]+/gi,"/").split("/");var i=null;var f=1;if(!h.length){return[];}if(h[0]=="."){i=[g];}else{if(h[0]==""){i=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(h[f].replace(/\[[^\]]*\]/g,""));f++;}else{return[];}}for(f;f<h.length;f++){i=this._getAllNamedChilds(i,h[f]);}if(h[f-1].indexOf("[")!=-1){i=this._filterXPath(i,h[f-1]);}return i;};dtmlXMLLoaderObject.prototype._filterXPath=function(c,h){var a=new Array();var h=h.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,"");for(var b=0;b<c.length;b++){if(c[b].getAttribute(h)){a[a.length]=c[b];}}return a;};dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(i,j){var a=new Array();if(_isKHTML){j=j.toUpperCase();}for(var b=0;b<i.length;b++){for(var c=0;c<i[b].childNodes.length;c++){if(_isKHTML){if(i[b].childNodes[c].tagName&&i[b].childNodes[c].tagName.toUpperCase()==j){a[a.length]=i[b].childNodes[c];}}else{if(i[b].childNodes[c].tagName==j){a[a.length]=i[b].childNodes[c];}}}}return a;};function dhtmlXHeir(b,c){for(var a in c){if(typeof(c[a])=="function"){b[a]=c[a];}}return b;}function dhtmlxEvent(d,f,e){if(d.addEventListener){d.addEventListener(f,e,false);}else{if(d.attachEvent){d.attachEvent("on"+f,e);}}}dtmlXMLLoaderObject.prototype.xslDoc=null;dtmlXMLLoaderObject.prototype.setXSLParamValue=function(e,h,g){if(!g){g=this.xslDoc;}if(g.responseXML){g=g.responseXML;}var f=this.doXPath("/xsl:stylesheet/xsl:variable[@name='"+e+"']",g,"http://www.w3.org/1999/XSL/Transform","single");if(f!=null){f.firstChild.nodeValue=h;}};dtmlXMLLoaderObject.prototype.doXSLTransToObject=function(g,e){if(!g){g=this.xslDoc;}if(g.responseXML){g=g.responseXML;}if(!e){e=this.xmlDoc;}if(e.responseXML){e=e.responseXML;}if(!_isIE){if(!this.XSLProcessor){this.XSLProcessor=new XSLTProcessor();this.XSLProcessor.importStylesheet(g);}var f=this.XSLProcessor.transformToDocument(e);}else{var f=new ActiveXObject("Msxml2.DOMDocument.3.0");try{e.transformNodeToObject(g,f);}catch(h){f=e.transformNode(g);}}return f;};dtmlXMLLoaderObject.prototype.doXSLTransToString=function(f,d){var e=this.doXSLTransToObject(f,d);if(typeof(e)=="string"){return e;}return this.doSerialization(e);};dtmlXMLLoaderObject.prototype.doSerialization=function(c){if(!c){c=this.xmlDoc;}if(c.responseXML){c=c.responseXML;}if(!_isIE){var d=new XMLSerializer();return d.serializeToString(c);}else{return c.xml;}};dhtmlxEventable=function(obj){obj.dhx_SeverCatcherPath="";obj.attachEvent=function(name,catcher,callObj){name="ev_"+name.toLowerCase();if(!this[name]){this[name]=new this.eventCatcher(callObj||this);}return(name+":"+this[name].addEvent(catcher));};obj.callEvent=function(name,arg0){name="ev_"+name.toLowerCase();
if(this[name]){return this[name].apply(this,arg0);}return true;};obj.checkEvent=function(name){return(!!this["ev_"+name.toLowerCase()]);};obj.eventCatcher=function(obj){var dhx_catch=[];var z=function(){var res=true;for(var i=0;i<dhx_catch.length;i++){if(dhx_catch[i]!=null){var zr=dhx_catch[i].apply(obj,arguments);res=res&&zr;}}return res;};z.addEvent=function(ev){if(typeof(ev)!="function"){ev=eval(ev);}if(ev){return dhx_catch.push(ev)-1;}return false;};z.removeEvent=function(id){dhx_catch[id]=null;};return z;};obj.detachEvent=function(id){if(id!=false){var list=id.split(":");this[list[0]].removeEvent(list[1]);}};};function dhtmlXComboFromSelect(m,i){if(typeof(m)=="string"){m=document.getElementById(m);}i=i||m.getAttribute("width")||(window.getComputedStyle?window.getComputedStyle(m,null)["width"]:(m.currentStyle?m.currentStyle["width"]:0));if((!i)||(i=="auto")){i=m.offsetWidth||100;}var q=document.createElement("SPAN");if(m.style.direction=="rtl"){q.style.direction="rtl";}m.parentNode.insertBefore(q,m);m.style.display="none";var p=m.getAttribute("opt_type");var l=new dhtmlXCombo(q,m.name,i,p,m.tabIndex);var n=new Array();var t=0;for(var r=0;r<m.options.length;r++){if(m.options[r].selected){t=r;}var o=m.options[r].innerHTML;var s=m.options[r].getAttribute("value");if((typeof(s)=="undefined")||(s===null)){s=o;}n[r]={value:s,text:o,img_src:m.options[r].getAttribute("img_src")};}l.addOption(n);m.parentNode.removeChild(m);l.selectOption(t,null,true);if(m.onchange){l.attachEvent("onChange",m.onchange);}return l;}var dhtmlXCombo_optionTypes=[];function dhtmlXCombo(i,f,j,h,g){if(typeof(i)=="string"){i=document.getElementById(i);}this.dhx_Event();this.optionType=(h!=window.undefined&&dhtmlXCombo_optionTypes[h])?h:"default";this._optionObject=dhtmlXCombo_optionTypes[this.optionType];this._disabled=false;if(i.style.direction=="rtl"){this.rtl=true;}else{this.rtl=false;}if(!window.dhx_glbSelectAr){window.dhx_glbSelectAr=new Array();window.dhx_openedSelect=null;window.dhx_SelectId=1;dhtmlxEvent(document.body,"click",this.closeAll);dhtmlxEvent(document.body,"keydown",function(a){try{if((a||event).keyCode==9){window.dhx_glbSelectAr[0].closeAll();}}catch(a){}return true;});}if(i.tagName=="SELECT"){return dhtmlXComboFromSelect(i);}else{this._createSelf(i,f,j,g);}dhx_glbSelectAr.push(this);}dhtmlXCombo.prototype.setSize=function(b){this.DOMlist.style.width=b+"px";if(this.DOMlistF){this.DOMlistF.style.width=b+"px";}this.DOMelem.style.width=b+"px";this.DOMelem_input.style.width=Math.max(0,(b-19))+"px";};dhtmlXCombo.prototype.enableFilteringMode=function(g,h,e,f){this._filter=convertStringToBoolean(g);if(h){this._xml=h;this._autoxml=convertStringToBoolean(f);}if(convertStringToBoolean(e)){this._xmlCache=[];}};dhtmlXCombo.prototype.setFilteringParam=function(d,c){if(!this._prs){this._prs=[];}this._prs.push([d,c]);};dhtmlXCombo.prototype.disable=function(c){var d=convertStringToBoolean(c);if(this._disabled==d){return;}this.DOMelem_input.disabled=d;this._disabled=d;};dhtmlXCombo.prototype.readonly=function(d,f){this.DOMelem_input.readOnly=d?true:false;if(f===false||d===false){this.DOMelem.onkeyup=function(a){};}else{var e=this;this.DOMelem.onkeyup=function(b){b=b||window.event;if(b.keyCode!=9){b.cancelBubble=true;}if((b.keyCode>=48&&b.keyCode<=57)||(b.keyCode>=65&&b.keyCode<=90)){for(var c=0;c<e.optionsArr.length;c++){var a=e.optionsArr[c].text;if(a.toString().toUpperCase().indexOf(String.fromCharCode(b.keyCode))==0){e.selectOption(c);break;}}b.cancelBubble=true;}};}};dhtmlXCombo.prototype.getOption=function(c){for(var d=0;d<this.optionsArr.length;d++){if(this.optionsArr[d].value==c){return this.optionsArr[d];}}return null;};dhtmlXCombo.prototype.getOptionByLabel=function(c){for(var d=0;d<this.optionsArr.length;d++){if(this.optionsArr[d].text==c||this.optionsArr[d]._ctext==c){return this.optionsArr[d];}}return null;};dhtmlXCombo.prototype.getOptionByIndex=function(b){return this.optionsArr[b];};dhtmlXCombo.prototype.clearAll=function(b){if(b){this.setComboText("");}this.optionsArr=new Array();this.redrawOptions();if(b){this._confirmSelection();}};dhtmlXCombo.prototype.deleteOption=function(c){var d=this.getIndexByValue(c);if(d<0){return;}if(this.optionsArr[d]==this._selOption){this._selOption=null;}this.optionsArr.splice(d,1);this.redrawOptions();};dhtmlXCombo.prototype.render=function(b){this._skiprender=(!convertStringToBoolean(b));this.redrawOptions();};dhtmlXCombo.prototype.updateOption=function(i,g,j,h){var f=this.getOption(i);if(typeof(g)!="object"){g={text:j,value:g,css:h};}f.setValue(g);this.redrawOptions();};dhtmlXCombo.prototype.addOption=function(d){if(!arguments[0].length||typeof(arguments[0])!="object"){args=[arguments];}else{args=d;}this.render(false);for(var f=0;f<args.length;f++){var e=args[f];if(e.length){e.value=e[0]||"";e.text=e[1]||"";e.css=e[2]||"";}this._addOption(e);}this.render(true);};dhtmlXCombo.prototype._addOption=function(b){dOpt=new this._optionObject();this.optionsArr.push(dOpt);dOpt.setValue.apply(dOpt,[b]);this.redrawOptions();};dhtmlXCombo.prototype.getIndexByValue=function(c){for(var d=0;d<this.optionsArr.length;d++){if(this.optionsArr[d].value==c){return d;}}return -1;};dhtmlXCombo.prototype.getSelectedValue=function(){return(this._selOption?this._selOption.value:null);};dhtmlXCombo.prototype.getComboText=function(){return this.DOMelem_input.value;};dhtmlXCombo.prototype.setComboText=function(b){this.DOMelem_input.value=b;};dhtmlXCombo.prototype.setComboValue=function(c){this.setComboText(c);for(var d=0;d<this.optionsArr.length;d++){if(this.optionsArr[d].data()[0]==c){return this.selectOption(d,null,true);}}this.DOMelem_hidden_input.value=c;};dhtmlXCombo.prototype.getActualValue=function(){return this.DOMelem_hidden_input.value;};dhtmlXCombo.prototype.getSelectedText=function(){return(this._selOption?this._selOption.text:"");};dhtmlXCombo.prototype.getSelectedIndex=function(){for(var b=0;b<this.optionsArr.length;b++){if(this.optionsArr[b]==this._selOption){return b;}}return -1;};dhtmlXCombo.prototype.setName=function(b){this.DOMelem_hidden_input.name=b;this.DOMelem_hidden_input2=b+"_new_value";this.name=b;};dhtmlXCombo.prototype.show=function(b){if(convertStringToBoolean(b)){this.DOMelem.style.display="";}else{this.DOMelem.style.display="none";}};dhtmlXCombo.prototype.destructor=function(){var e=this._inID;this.DOMParent.removeChild(this.DOMelem);this.DOMlist.parentNode.removeChild(this.DOMlist);var f=dhx_glbSelectAr;this.DOMParent=this.DOMlist=this.DOMelem=0;this.DOMlist.combo=this.DOMelem.combo=0;for(var d=0;d<f.length;d++){if(f[d]._inID==e){f[d]=null;f.splice(d,1);return;}}};dhtmlXCombo.prototype._createSelf=function(m,h,j,k){if(j.toString().indexOf("%")!=-1){var i=this;var l=parseInt(j)/100;window.setInterval(function(){if(!m.parentNode){return;}var a=m.parentNode.offsetWidth*l-2;if(a<0){return;}if(a==i._lastTs){return;}i.setSize(i._lastTs=a);},500);var j=parseInt(m.offsetWidth);}var j=parseInt(j||100);this.ListPosition="Bottom";this.DOMParent=m;this._inID=null;this.name=h;this._selOption=null;this.optionsArr=Array();var n=new this._optionObject();n.DrawHeader(this,h,j,k);this.DOMlist=document.createElement("DIV");this.DOMlist.className="dhx_combo_list"+(this.rtl?"_rtl":"")+" "+(dhtmlx.skin?dhtmlx.skin+"_list":"");this.DOMlist.style.width=j-(_isIE?0:0)+"px";if(_isOpera||_isKHTML){this.DOMlist.style.overflow="auto";}this.DOMlist.style.display="none";document.body.insertBefore(this.DOMlist,document.body.firstChild);if(_isIE){this.DOMlistF=document.createElement("IFRAME");this.DOMlistF.style.border="0px";this.DOMlistF.className="dhx_combo_list";this.DOMlistF.style.width=j-(_isIE?0:0)+"px";this.DOMlistF.style.display="none";this.DOMlistF.src="javascript:false;";document.body.insertBefore(this.DOMlistF,document.body.firstChild);}this.DOMlist.combo=this.DOMelem.combo=this;this.DOMelem_input.onkeydown=this._onKey;this.DOMelem_input.onkeypress=this._onKeyF;this.DOMelem_input.onblur=this._onBlur;this.DOMelem.onclick=this._toggleSelect;this.DOMlist.onclick=this._selectOption;
this.DOMlist.onmousedown=function(){this._skipBlur=true;};this.DOMlist.onkeydown=function(a){this.combo.DOMelem_input.focus();(a||event).cancelBubble=true;this.combo.DOMelem_input.onkeydown(a);};this.DOMlist.onmouseover=this._listOver;};dhtmlXCombo.prototype._listOver=function(i){i=i||event;i.cancelBubble=true;var j=(_isIE?event.srcElement:i.target);var e=this.combo;if(j.parentNode==e.DOMlist){if(e._selOption){e._selOption.deselect();}if(e._tempSel){e._tempSel.deselect();}var g=0;for(g;g<e.DOMlist.childNodes.length;g++){if(e.DOMlist.childNodes[g]==j){break;}}var h=e.optionsArr[g];e._tempSel=h;e._tempSel.select();if((e._autoxml)&&((g+1)==e._lastLength)){e._fetchOptions(g+1,e._lasttext||"");}}};dhtmlXCombo.prototype._positList=function(){var b=this.getPosition(this.DOMelem);if(this.ListPosition=="Bottom"){this.DOMlist.style.top=b[1]+this.DOMelem.offsetHeight-1+"px";this.DOMlist.style.left=b[0]+"px";}else{if(this.ListPosition=="Top"){this.DOMlist.style.top=b[1]-this.DOMlist.offsetHeight+"px";this.DOMlist.style.left=b[0]+"px";}else{this.DOMlist.style.top=b[1]+"px";this.DOMlist.style.left=b[0]+this.DOMelem.offsetWidth+"px";}}};dhtmlXCombo.prototype.getPosition=function(j,g){if(_isChrome){if(!g){var g=document.body;}var h=j;var k=0;var l=0;while((h)&&(h!=g)){k+=h.offsetLeft-h.scrollLeft;l+=h.offsetTop-h.scrollTop;h=h.offsetParent;}if(g==document.body){if(_isIE&&_isIE<8){if(document.documentElement.scrollTop){l+=document.documentElement.scrollTop;}if(document.documentElement.scrollLeft){k+=document.documentElement.scrollLeft;}}else{if(!_isFF){k+=document.body.offsetLeft;l+=document.body.offsetTop;}}}return new Array(k,l);}var i=getOffset(j);return[i.left,i.top];};dhtmlXCombo.prototype._correctSelection=function(){if(this.getComboText()!=""){for(var b=0;b<this.optionsArr.length;b++){if(!this.optionsArr[b].isHidden()){return this.selectOption(b,true,false);}}}this.unSelectOption();};dhtmlXCombo.prototype.selectNext=function(d){var c=this.getSelectedIndex()+d;while(this.optionsArr[c]){if(!this.optionsArr[c].isHidden()){return this.selectOption(c,false,false);}c+=d;}};dhtmlXCombo.prototype._onKeyF=function(f){var d=this.parentNode.combo;var e=f||event;e.cancelBubble=true;if(e.keyCode=="13"||e.keyCode=="9"){d._confirmSelection();d.closeAll();}else{if(e.keyCode=="27"){d._resetSelection();d.closeAll();}else{d._activeMode=true;}}if(e.keyCode=="13"||e.keyCode=="27"){d.callEvent("onKeyPressed",[e.keyCode]);return false;}return true;};dhtmlXCombo.prototype._onKey=function(f){var d=this.parentNode.combo;(f||event).cancelBubble=true;var e=(f||event).keyCode;if(e>15&&e<19){return true;}if(e==27){return;}if((d.DOMlist.style.display!="block")&&(e!="13")&&(e!="9")&&((!d._filter)||(d._filterAny))){d.DOMelem.onclick(f||event);}if((e!="13")&&(e!="9")){window.setTimeout(function(){d._onKeyB(e);},1);if(e=="40"||e=="38"){return false;}}else{if(e==9){d.closeAll();(f||event).cancelBubble=false;}}};dhtmlXCombo.prototype._onKeyB=function(d){if(d=="40"){var f=this.selectNext(1);}else{if(d=="38"){this.selectNext(-1);}else{this.callEvent("onKeyPressed",[d]);if(this._filter){return this.filterSelf((d==8)||(d==46));}for(var e=0;e<this.optionsArr.length;e++){if(this.optionsArr[e].data()[1]==this.DOMelem_input.value){this.selectOption(e,false,false);return false;}}this.unSelectOption();}}return true;};dhtmlXCombo.prototype._onBlur=function(){var b=this.parentNode._self;window.setTimeout(function(){if(b.DOMlist._skipBlur){return !(b.DOMlist._skipBlur=false);}b._confirmSelection();b.callEvent("onBlur",[]);},100);};dhtmlXCombo.prototype.redrawOptions=function(){if(this._skiprender){return;}for(var b=this.DOMlist.childNodes.length-1;b>=0;b--){this.DOMlist.removeChild(this.DOMlist.childNodes[b]);}for(var b=0;b<this.optionsArr.length;b++){this.DOMlist.appendChild(this.optionsArr[b].render());}};dhtmlXCombo.prototype.loadXML=function(e,g){this._load=true;this.callEvent("onXLS",[]);if((this._xmlCache)&&(this._xmlCache[e])){this._fillFromXML(this,null,null,null,this._xmlCache[e]);if(g){g();}}else{var f=(new dtmlXMLLoaderObject(this._fillFromXML,this,true,true));if(g){f.waitCall=g;}if(this._prs){for(var h=0;h<this._prs.length;h++){e+=[getUrlSymbol(e),escape(this._prs[h][0]),"=",escape(this._prs[h][1])].join("");}}f._cPath=e;f.loadXML(e);}};dhtmlXCombo.prototype.loadXMLString=function(d){var c=(new dtmlXMLLoaderObject(this._fillFromXML,this,true,true));c.loadXMLString(d);};dhtmlXCombo.prototype._fillFromXML=function(w,b,i,j,v){if(w._xmlCache){w._xmlCache[v._cPath]=v;}var d=v.getXMLTopNode("complete");if(d.tagName!="complete"){return;}var c=v.doXPath("//complete");var A=v.doXPath("//option");var B=false;w.render(false);if((!c[0])||(!c[0].getAttribute("add"))){w.clearAll();w._lastLength=A.length;if(w._xml){if((!A)||(!A.length)){w.closeAll();}else{if(w._activeMode){w._positList();w.DOMlist.style.display="block";if(_isIE){w._IEFix(true);}}}}}else{w._lastLength+=A.length;B=true;}for(var x=0;x<A.length;x++){var u=new Object();u.text=A[x].firstChild?A[x].firstChild.nodeValue:"";for(var y=0;y<A[x].attributes.length;y++){var a=A[x].attributes[y];if(a){u[a.nodeName]=a.nodeValue;}}w._addOption(u);}w.render(B!=true||A.length);if((w._load)&&(w._load!==true)){w.loadXML(w._load);}else{w._load=false;if((!w._lkmode)&&(!w._filter)){w._correctSelection();}}var z=v.doXPath("//option[@selected]");if(z.length){w.selectOption(w.getIndexByValue(z[0].getAttribute("value")),false,true);}w.callEvent("onXLE",[]);};dhtmlXCombo.prototype.unSelectOption=function(){if(this._selOption){this._selOption.deselect();}if(this._tempSel){this._tempSel.deselect();}this._tempSel=this._selOption=null;};dhtmlXCombo.prototype._confirmSelection=function(d,e){if(arguments.length==0){var f=this.getOptionByLabel(this.DOMelem_input.value);d=f?f.value:this.DOMelem_input.value;e=(f==null);if(d==this.getActualValue()){return;}}this.DOMelem_hidden_input.value=d;this.DOMelem_hidden_input2.value=(e?"true":"false");this.callEvent("onChange",[]);this._activeMode=false;};dhtmlXCombo.prototype._resetSelection=function(d,e){var f=this.getOption(this.DOMelem_hidden_input.value);this.setComboValue(f?f.data()[0]:this.DOMelem_hidden_input.value);this.setComboText(f?f.data()[1]:this.DOMelem_hidden_input.value);};dhtmlXCombo.prototype.selectOption=function(m,h,i){if(arguments.length<3){i=true;}this.unSelectOption();var k=this.optionsArr[m];if(!k){return;}this._selOption=k;this._selOption.select();var j=this._selOption.content.offsetTop+this._selOption.content.offsetHeight-this.DOMlist.scrollTop-this.DOMlist.offsetHeight;if(j>0){this.DOMlist.scrollTop+=j;}j=this.DOMlist.scrollTop-this._selOption.content.offsetTop;if(j>0){this.DOMlist.scrollTop-=j;}var n=this._selOption.data();if(i){this.setComboText(n[1]);this._confirmSelection(n[0],false);}if((this._autoxml)&&((m+1)==this._lastLength)){this._fetchOptions(m+1,this._lasttext||"");}if(h){var l=this.getComboText();if(l!=n[1]){this.setComboText(n[1]);dhtmlXRange(this.DOMelem_input,l.length+1,n[1].length);}}else{this.setComboText(n[1]);}this._selOption.RedrawHeader(this);this.callEvent("onSelectionChange",[]);};dhtmlXCombo.prototype._selectOption=function(g){(g||event).cancelBubble=true;var h=(_isIE?event.srcElement:g.target);var e=this.combo;while(!h._self){h=h.parentNode;if(!h){return;}}var f=0;for(f;f<e.DOMlist.childNodes.length;f++){if(e.DOMlist.childNodes[f]==h){break;}}e.selectOption(f,false,true);e.closeAll();e.callEvent("onBlur",[]);e._activeMode=false;};dhtmlXCombo.prototype.openSelect=function(){if(this._disabled){return;}this.closeAll();this._positList();this.DOMlist.style.display="block";this.callEvent("onOpen",[]);if(this._tempSel){this._tempSel.deselect();}if(this._selOption){this._selOption.select();}if(this._selOption){var b=this._selOption.content.offsetTop+this._selOption.content.offsetHeight-this.DOMlist.scrollTop-this.DOMlist.offsetHeight;if(b>0){this.DOMlist.scrollTop+=b;}b=this.DOMlist.scrollTop-this._selOption.content.offsetTop;if(b>0){this.DOMlist.scrollTop-=b;}}if(_isIE){this._IEFix(true);}this.DOMelem_input.focus();
if(this._filter){this.filterSelf();}};dhtmlXCombo.prototype._toggleSelect=function(c){var d=this.combo;if(d.DOMlist.style.display=="block"){d.closeAll();}else{d.openSelect();}(c||event).cancelBubble=true;};dhtmlXCombo.prototype._fetchOptions=function(d,f){if(f==""){this.closeAll();return this.clearAll();}var e=this._xml+((this._xml.indexOf("?")!=-1)?"&":"?")+"pos="+d+"&mask="+encodeURIComponent(f);this._lasttext=f;if(this._load){this._load=e;}else{this.loadXML(e);}};dhtmlXCombo.prototype.filterSelf=function(i){var j=this.getComboText();if(this._xml){this._lkmode=i;this._fetchOptions(0,j);}try{var e=new RegExp("^"+j,"i");}catch(l){var e=new RegExp("^"+j.replace(/([\[\]\{\}\(\)\+\*\\])/g,"\\$1"));}this.filterAny=false;for(var h=0;h<this.optionsArr.length;h++){var k=e.test(this.optionsArr[h].text);this.filterAny|=k;this.optionsArr[h].hide(!k);}if(!this.filterAny){this.closeAll();this._activeMode=true;}else{if(this.DOMlist.style.display!="block"){this.openSelect();}if(_isIE){this._IEFix(true);}}if(!i){this._correctSelection();}else{this.unSelectOption();}};dhtmlXCombo.prototype._IEFix=function(b){this.DOMlistF.style.display=(b?"block":"none");this.DOMlistF.style.top=this.DOMlist.style.top;this.DOMlistF.style.left=this.DOMlist.style.left;};dhtmlXCombo.prototype.closeAll=function(){if(window.dhx_glbSelectAr){for(var b=0;b<dhx_glbSelectAr.length;b++){if(dhx_glbSelectAr[b].DOMlist.style.display=="block"){dhx_glbSelectAr[b].DOMlist.style.display="none";if(_isIE){dhx_glbSelectAr[b]._IEFix(false);}}dhx_glbSelectAr[b]._activeMode=false;}}};function dhtmlXRange(i,m,j){var k=typeof(i)=="object"?i:document.getElementById(i);try{k.focus();}catch(l){}var n=k.value.length;m--;if(m<0||m>j||m>n){m=0;}if(j>n){j=n;}if(m==j){return;}if(k.setSelectionRange){k.setSelectionRange(m,j);}else{if(k.createTextRange){var e=k.createTextRange();e.moveStart("character",m);e.moveEnd("character",j-n);e.select();}}}dhtmlXCombo_defaultOption=function(){this.init();};dhtmlXCombo_defaultOption.prototype.init=function(){this.value=null;this.text="";this.selected=false;this.css="";};dhtmlXCombo_defaultOption.prototype.select=function(){if(this.content){this.content.className="dhx_selected_option"+(dhtmlx.skin?" combo_"+dhtmlx.skin+"_sel":"");}};dhtmlXCombo_defaultOption.prototype.hide=function(b){this.render().style.display=b?"none":"";};dhtmlXCombo_defaultOption.prototype.isHidden=function(){return(this.render().style.display=="none");};dhtmlXCombo_defaultOption.prototype.deselect=function(){if(this.content){this.render();}this.content.className="";};dhtmlXCombo_defaultOption.prototype.setValue=function(b){this.value=b.value||"";this.text=b.text||"";this.css=b.css||"";this.content=null;};dhtmlXCombo_defaultOption.prototype.render=function(){if(!this.content){this.content=document.createElement("DIV");this.content._self=this;this.content.style.cssText="width:100%; overflow:hidden;"+this.css;if(_isOpera||_isKHTML){this.content.style.padding="2px 0px 2px 0px";}this.content.innerHTML=this.text;this._ctext=_isIE?this.content.innerText:this.content.textContent;}return this.content;};dhtmlXCombo_defaultOption.prototype.data=function(){if(this.content){return[this.value,this._ctext?this._ctext:this.text];}};dhtmlXCombo_defaultOption.prototype.DrawHeader=function(g,f,i,j){var h=document.createElement("DIV");h.style.width=i+"px";h.className="dhx_combo_box "+(dhtmlx.skin||"");h._self=g;g.DOMelem=h;this._DrawHeaderInput(g,f,i,j);this._DrawHeaderButton(g,f,i);g.DOMParent.appendChild(g.DOMelem);};dhtmlXCombo_defaultOption.prototype._DrawHeaderInput=function(g,f,i,j){if(g.rtl&&_isIE){var h=document.createElement("textarea");h.style.overflow="hidden";h.style.whiteSpace="nowrap";}else{var h=document.createElement("input");h.setAttribute("autocomplete","off");h.type="text";}h.className="dhx_combo_input";if(g.rtl){h.style.left="18px";h.style.direction="rtl";h.style.unicodeBidi="bidi-override";}if(j){h.tabIndex=j;}h.style.width=(i-19)+"px";g.DOMelem.appendChild(h);g.DOMelem_input=h;h=document.createElement("input");h.type="hidden";h.name=f;g.DOMelem.appendChild(h);g.DOMelem_hidden_input=h;h=document.createElement("input");h.type="hidden";h.name=f+"_new_value";h.value="true";g.DOMelem.appendChild(h);g.DOMelem_hidden_input2=h;};dhtmlXCombo_defaultOption.prototype._DrawHeaderButton=function(f,e,h){var g=document.createElement("img");g.className=(f.rtl)?"dhx_combo_img_rtl":"dhx_combo_img";if(dhtmlx.image_path){dhx_globalImgPath=dhtmlx.image_path;}g.src=(window.dhx_globalImgPath?dhx_globalImgPath:"")+"combo_select"+(dhtmlx.skin?"_"+dhtmlx.skin:"")+".png";f.DOMelem.appendChild(g);f.DOMelem_button=g;};dhtmlXCombo_defaultOption.prototype.RedrawHeader=function(b){};dhtmlXCombo_optionTypes["default"]=dhtmlXCombo_defaultOption;dhtmlXCombo.prototype.dhx_Event=function(){this.dhx_SeverCatcherPath="";this.attachEvent=function(original,catcher,CallObj){CallObj=CallObj||this;original="ev_"+original;if((!this[original])||(!this[original].addEvent)){var z=new this.eventCatcher(CallObj);z.addEvent(this[original]);this[original]=z;}return(original+":"+this[original].addEvent(catcher));};this.callEvent=function(name,arg0){if(this["ev_"+name]){return this["ev_"+name].apply(this,arg0);}return true;};this.checkEvent=function(name){if(this["ev_"+name]){return true;}return false;};this.eventCatcher=function(obj){var dhx_catch=new Array();var m_obj=obj;var func_server=function(catcher,rpc){catcher=catcher.split(":");var postVar="";var postVar2="";var target=catcher[1];if(catcher[1]=="rpc"){postVar='<?xml version="1.0"?><methodCall><methodName>'+catcher[2]+"</methodName><params>";postVar2="</params></methodCall>";target=rpc;}var z=function(){};return z;};var z=function(){if(dhx_catch){var res=true;}for(var i=0;i<dhx_catch.length;i++){if(dhx_catch[i]!=null){var zr=dhx_catch[i].apply(m_obj,arguments);res=res&&zr;}}return res;};z.addEvent=function(ev){if(typeof(ev)!="function"){if(ev&&ev.indexOf&&ev.indexOf("server:")==0){ev=new func_server(ev,m_obj.rpcServer);}else{ev=eval(ev);}}if(ev){return dhx_catch.push(ev)-1;}return false;};z.removeEvent=function(id){dhx_catch[id]=null;};return z;};this.detachEvent=function(id){if(id!=false){var list=id.split(":");this[list[0]].removeEvent(list[1]);}};};(function(){dhtmlx.extend_api("dhtmlXCombo",{_init:function(b){if(b.image_path){dhx_globalImgPath=b.image_path;}return[b.parent,b.name,(b.width||"100%"),b.type,b.index];},filter:"filter_command",auto_height:"enableOptionAutoHeight",auto_position:"enableOptionAutoPositioning",auto_width:"enableOptionAutoWidth",xml:"loadXML",readonly:"readonly",items:"addOption"},{filter_command:function(b){if(typeof b=="string"){this.enableFilteringMode(true,b);}else{this.enableFilteringMode(b);}}});})();dhtmlXCombo.prototype.enableOptionAutoPositioning=function(b){if(!this.ListAutoPosit){this.ListAutoPosit=1;}this.attachEvent("onOpen",function(){this._setOptionAutoPositioning(b);});};dhtmlXCombo.prototype._setOptionAutoPositioning=function(h){if((typeof(h)!="undefined")&&(!convertStringToBoolean(h))){this.ListPosition="Bottom";this.ListAutoPosit=0;return true;}var g=this.getPosition(this.DOMelem);var e=this._getClientHeight()-g[1]-this.DOMelem.offsetHeight;var f=(this.autoHeight)?(this.DOMlist.scrollHeight):parseInt(this.DOMlist.offsetHeight);if((e<f)&&(g[1]>f)){this.ListPosition="Top";}else{this.ListPosition="Bottom";}this._positList();};dhtmlXCombo.prototype._getClientHeight=function(){return((document.compatMode=="CSS1Compat")&&(!window.opera))?document.documentElement.clientHeight:document.body.clientHeight;};dhtmlXCombo.prototype.setOptionWidth=function(b){if(arguments.length>0){this.DOMlist.style.width=b+"px";if(this.DOMlistF){this.DOMlistF.style.width=b+"px";}}};dhtmlXCombo.prototype.setOptionHeight=function(b){if(arguments.length>0){if(_isIE){this.DOMlist.style.height=this.DOMlistF.style.height=b+"px";}else{this.DOMlist.style.height=b+"px";}this._positList();}};dhtmlXCombo.prototype.enableOptionAutoWidth=function(b){if(!this._listWidthConf){this._listWidthConf=parseInt(this.DOMlist.style.width);
}if(arguments.length==0){var b=1;}if(convertStringToBoolean(b)){this.autoOptionWidth=1;awOnOpen=this.attachEvent("onOpen",function(){this._setOptionAutoWidth();});}else{if(typeof(awOnOpen)!="undefined"){this.autoOptionWidth=0;this.detachEvent(awOnOpen);this.setOptionWidth(this._listWidthConf);}}};dhtmlXCombo.prototype._setOptionAutoWidth=function(){this.setOptionWidth(1);var e=this.DOMlist.offsetWidth;for(var d=0;d<this.optionsArr.length;d++){var f=(_isFF)?(this.DOMlist.childNodes[d].scrollWidth-2):this.DOMlist.childNodes[d].scrollWidth;if(f>e){e=this.DOMlist.childNodes[d].scrollWidth;}}this.setOptionWidth(e);};dhtmlXCombo.prototype.enableOptionAutoHeight=function(c,d){if(!this._listHeightConf){this._listHeightConf=(this.DOMlist.style.height=="")?100:parseInt(this.DOMlist.style.height);}if(arguments.length==0){var c=1;}this.autoHeight=convertStringToBoolean(c);if(this.autoHeight){ahOnOpen=this.attachEvent("onOpen",function(){this._setOptionAutoHeight(c,d);if(_isIE){this._setOptionAutoHeight(c,d);}});}else{if(typeof(ahOnOpen)!="undefined"){this.detachEvent(ahOnOpen);this.setOptionHeight(this._listHeightConf);}}};dhtmlXCombo.prototype._setOptionAutoHeight=function(f,d){if(convertStringToBoolean(f)){this.setOptionHeight(1);var e=0;if(this.optionsArr.length>0){if(this.DOMlist.scrollHeight>this.DOMlist.offsetHeight){e=this.DOMlist.scrollHeight+2;}else{e=this.DOMlist.offsetHeight;}if((arguments.length>1)&&(d)){var d=parseInt(d);e=(e>d)?d:e;}this.setOptionHeight(e);}}};
