dhtmlxAjax={get:function(url,Eq){var t=new ag(true);t.async=(arguments.length<3);t.bs=Eq;t.bD(url);return t},post:function(url,post,Eq){var t=new ag(true);t.async=(arguments.length<4);t.bs=Eq;t.bD(url,true,post);return t},getSync:function(url){return this.get(url,null,true)},postSync:function(url,post){return this.post(url,post,null,true)}};function ag(dR,Ll,async,hN){this.xmlDoc="";if(typeof(async)!="undefined")this.async=async;else this.async=true;this.UR=dR||null;this.cT=Ll||null;this.bs=null;this.hN=hN||false;return this};ag.prototype.cz=function(Ll){var alV=true;this.jC=function(){if((Ll)&&(Ll.UR!=null)){if((!Ll.xmlDoc.readyState)||(Ll.xmlDoc.readyState==4)){if(!alV)return;alV=false;if(typeof Ll.UR=="function")Ll.UR(Ll.cT,null,null,null,Ll);if(Ll.bs){Ll.bs.call(this,Ll);Ll.bs=null}}}};return this.jC};ag.prototype.cR=function(tagName,Db){if(this.xmlDoc.responseXML){var AT=this.xmlDoc.responseXML.getElementsByTagName(tagName);if(AT.length==0&&tagName.indexOf(":")!= -1)var AT=this.xmlDoc.responseXML.getElementsByTagName((tagName.split(":"))[1]);var z=AT[0]}else var z=this.xmlDoc.documentElement;if(z){this.jV=false;return z};if((_isIE)&&(!this.jV)){var RA=this.xmlDoc.responseText;var Db=this.xmlDoc;this.jV=true;this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=false;this.xmlDoc["loadXM"+"L"](RA);return this.cR(tagName,Db)};ey.gn("LoadXML","Incorrect XML",[(Db||this.xmlDoc),this.cT]);return document.createElement("DIV")};ag.prototype.bE=function(RA){{try{var qi=new DOMParser();this.xmlDoc=qi.parseFromString(RA,"text/xml")}catch(e){this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=this.async;this.xmlDoc["loadXM"+"L"](RA)}};this.UR(this.cT,null,null,null,this);if(this.bs){this.bs();this.bs=null}};ag.prototype.bD=function(bU,fk,iV,rpc){if(this.hN)bU+=((bU.indexOf("?")!= -1)?"&":"?")+"a_dhx_rSeed="+(new Date()).valueOf();this.bU=bU;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.cz(this);this.xmlDoc.load(bU);return}else this.xmlDoc=new ActiveXObject("Microsoft.XMLHTTP")};if(this.async)this.xmlDoc.onreadystatechange=new this.cz(this);this.xmlDoc.open(fk?"POST":"GET",bU,this.async);if(rpc){this.xmlDoc.setRequestHeader("User-Agent","dhtmlxRPC v0.1 ("+navigator.userAgent+")");this.xmlDoc.setRequestHeader("Content-type","text/xml")}else if(fk)this.xmlDoc.setRequestHeader('Content-type','application/x-www-form-urlencoded');this.xmlDoc.setRequestHeader("X-Requested-With","XMLHttpRequest");this.xmlDoc.send(null||iV);if(!this.async)(new this.cz(this))()};ag.prototype.fA=function(){this.UR=null;this.cT=null;this.xmlDoc=null;return null};ag.prototype.eU=function(node){var t={};for(var i=0;i<node.attributes.length;i++)t[node.attributes[i].name]=node.attributes[i].value;t["_tagvalue"]=node.firstChild?node.firstChild.nodeValue:"";for(var i=0;i<node.childNodes.length;i++){var name=node.childNodes[i].tagName;if(name){if(!t[name])t[name]=[];t[name].push(this.eU(node.childNodes[i]))}};return t};function jP(dR,Ll){this.handler=function(e){if(!e)e=window.event;dR(e,Ll);return true};return this.handler};function ej(pP){var qb=pP.offsetLeft;var AT=pP.offsetParent;while(AT!=null){qb+=AT.offsetLeft;AT=AT.offsetParent};return qb};function dg(pP){var qm=pP.offsetTop;var AT=pP.offsetParent;while(AT!=null){qm+=AT.offsetTop;AT=AT.offsetParent};return qm};function K(cy){if(typeof(cy)=="string")cy=cy.toLowerCase();switch(cy){case "1":case "true":case "yes":case "y":case 1:case true:return true;break;default:return false}};function jv(str){if(str.indexOf("?")!= -1)return "&";else return "?"};function J(){if(window.F)return window.F;this.aG=0;this.al=0;this.I=0;this.bg=0;this.dG=null;this.dH=null;this.PF=0;window.F=this;return this};J.prototype.fG=function(ao){ao.onmousedown=null;ao.eO=null;ao.pU=null};J.prototype.dS=function(ao,Ll){ao.onmousedown=this.bR;ao.eO=Ll;this.eH(ao,Ll)};J.prototype.eH=function(ao,Ll){ao.pU=Ll};J.prototype.bR=function(e){if(e&&(e||event).button==2)return;if(window.F.PF){window.F.PF=0;document.body.onmouseup=window.F.dG;document.body.onmousemove=window.F.dH;return false};window.F.PF=1;window.F.dG=document.body.onmouseup;window.F.dH=document.body.onmousemove;window.F.I=this;window.F.bg=this.eO;document.body.onmouseup=window.F.bR;document.body.onmousemove=window.F.kU;if((e)&&(e.preventDefault)){e.preventDefault();return false};return false};J.prototype.kU=function(e){if(!e)e=window.event;M=window.F;if((e.button==0)&&(_isIE))return M.dc();if(!M.al&&M.PF){M.al=M.bg.gL(M.I,e);if(!M.al)return M.dc();M.al.onselectstart=function(){return false};M.bN=M.al;document.body.appendChild(M.al);document.body.onmouseup=M.dc;M.PF=0;M.al.qQ=window;M.bm()};if(M.al.parentNode!=window.document.body){var qp=M.bN;if(M.bN.qw)qp=M.bN.qw;qp.parentNode.removeChild(qp);var nD=M.al.qQ;if(_isIE){var div=document.createElement("Div");div.innerHTML=M.al.outerHTML;M.al=div.childNodes[0]}else M.al=M.al.cloneNode(true);M.al.qQ=window;M.bN.qw=M.al;document.body.appendChild(M.al);nD.F.al=M.al};M.al.style.left=e.clientX+15+(M.fx?M.fx*(-1):0)+(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";M.al.style.top=e.clientY+3+(M.fy?M.fy*(-1):0)+(document.body.scrollTop||document.documentElement.scrollTop)+"px";if(!e.srcElement)var z=e.target;else z=e.srcElement;M.eq(z,e)};J.prototype.bS=function(n){if(window.name){var el=parent.frames[window.name].frameElement.offsetParent;var fx=0;var fy=0;while(el){fx+=el.offsetLeft;fy+=el.offsetTop;el=el.offsetParent};if((parent.F)){var ls=parent.F.bS(1);fx+=ls.split('_')[0]*1;fy+=ls.split('_')[1]*1};if(n)return fx+"_"+fy;else this.fx=fx;this.fy=fy};return "0_0"};J.prototype.eq=function(pP,e){if((pP)&&(pP.pU)){if(this.aG)this.aG.pU.iX(this.aG);this.aG=pP;this.aG=this.aG.pU.tY(this.aG,this.I,e.clientX,e.clientY,e);this.wS=(_isIE?e.srcElement:e.target)}else{if((pP)&&(pP.tagName!="BODY"))this.eq(pP.parentNode,e);else{if(this.aG)this.aG.pU.iX(this.aG,e.clientX,e.clientY,e);this.aG=0;if(this.hq)this.hq()}}};J.prototype.dc=function(e,mode){M=window.F;if(!mode){M.PE();var AT=M.aG;M.aG=null;if(AT)AT.pU.BK(M.I,M.bg,AT,(_isIE?event.srcElement:e.target))};M.aG=null;if((M.al)&&(M.al.parentNode==document.body))M.al.parentNode.removeChild(M.al);M.al=0;M.bN=0;M.fx=0;M.fy=0;M.I=0;M.bg=0;document.body.onmouseup=M.dG;document.body.onmousemove=M.dH;M.dG=null;M.dH=null;M.PF=0};J.prototype.PE=function(win){if(win)window.F.dc(1,1);for(var i=0;i<window.frames.length;i++)if((window.frames[i]!=win)&&(window.frames[i].F))window.frames[i].F.PE(window);if((parent.F)&&(parent!=window)&&(parent!=win))parent.F.PE(window)};J.prototype.bm=function(win,mode){if(win){window.F.bR();window.F.I=win.F.I;window.F.bg=win.F.bg;window.F.al=win.F.al;window.F.bN=win.F.al;window.document.body.onmouseup=window.F.dc;window.PF=0;if(((!_isIE)&&(mode))&&((!aq)||(qG<1.8)))window.F.bS()};if((parent.F)&&(parent!=window)&&(parent!=win))parent.F.bm(window);for(var i=0;i<window.frames.length;i++)if((window.frames[i]!=win)&&(window.frames[i].F))window.frames[i].F.bm(window,((!win||mode)?1:0))};var aq=false;var _isIE=false;var cU=false;var cn=false;var gP=false;if(navigator.userAgent.indexOf('Macintosh')!= -1)gP=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){aq=true;var qG=1.9}else cn=true}else if(navigator.userAgent.indexOf('Opera')!= -1){cU=true;pe=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{aq=true;var qG=parseFloat(navigator.userAgent.split("rv:")[1])};ag.prototype.et=function(df,bc,namespace,result_type){if((cn))return this.hi(df,bc);if(_isIE){if(!bc)if(!this.xmlDoc.nodeName)bc=this.xmlDoc.responseXML;else bc=this.xmlDoc;if(!bc)ey.gn("LoadXML","Incorrect XML",[(bc||this.xmlDoc),this.cT]);if(namespace!=null)bc.setProperty("SelectionNamespaces","xmlns:xsl='"+namespace+"'");if(result_type=='single'){return bc.selectSingleNode(df)}else{return bc.selectNodes(df)||new Array(0)}}else{var gb=bc;if(!bc){if(!this.xmlDoc.nodeName){bc=this.xmlDoc.responseXML}else{bc=this.xmlDoc}};if(!bc)ey.gn("LoadXML","Incorrect XML",[(bc||this.xmlDoc),this.cT]);if(bc.nodeName.indexOf("document")!= -1){gb=bc}else{gb=bc;bc=bc.ownerDocument};var retType=XPathResult.ANY_TYPE;if(result_type=='single')retType=XPathResult.FIRST_ORDERED_NODE_TYPE;var P=new Array();var col=bc.evaluate(df,gb,function(apG){return namespace},retType,null);if(retType==XPathResult.FIRST_ORDERED_NODE_TYPE){return col.singleNodeValue};var dv=col.iterateNext();while(dv){P[P.length]=dv;dv=col.iterateNext()};return P}};function de(type,name,params){if(!this.cW)this.cW=new Array();return this};de.prototype.mP=function(type,jT){this.cW[type]=jT};de.prototype.gn=function(type,name,params){if(this.cW[type])return this.cW[type](type,name,params);if(this.cW["ALL"])return this.cW["ALL"](type,name,params);alert("Error type: "+arguments[0]+"\nDescription: "+arguments[1]);return null};window.ey=new de();ag.prototype.hi=function(df,bc){var z=df.replace(/[\/]+/gi,"/").split('/');var obj=null;var i=1;if(!z.length)return[];if(z[0]==".")obj=[bc];else if(z[0]==""){obj=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(z[i].replace(/\[[^\]]*\]/g,""));i++}else return[];for(i;i<z.length;i++)obj=this.eo(obj,z[i]);if(z[i-1].indexOf("[")!= -1)obj=this.hj(obj,z[i-1]);return obj};ag.prototype.hj=function(a,b){var c=new Array();var b=b.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,"");for(var i=0;i<a.length;i++)if(a[i].getAttribute(b))c[c.length]=a[i];return c};ag.prototype.eo=function(a,b){var c=new Array();if(cn)b=b.toUpperCase();for(var i=0;i<a.length;i++)for(var j=0;j<a[i].childNodes.length;j++){if(cn){if(a[i].childNodes[j].tagName&&a[i].childNodes[j].tagName.toUpperCase()==b)c[c.length]=a[i].childNodes[j]}else if(a[i].childNodes[j].tagName==b)c[c.length]=a[i].childNodes[j]};return c};function oT(a,b){for(var c in b)if(typeof(b[c])=="function")a[c]=b[c];return a};function dE(el,event,handler){if(el.addEventListener)el.addEventListener(event,handler,false);else if(el.attachEvent)el.attachEvent("on"+event,handler)};ag.prototype.xslDoc=null;ag.prototype.setXSLParamValue=function(paramName,paramValue,xslDoc){if(!xslDoc)xslDoc=this.xslDoc;if(xslDoc.responseXML)xslDoc=xslDoc.responseXML;var item=this.et("/xsl:stylesheet/xsl:variable[@name='"+paramName+"']",xslDoc,"http:/\/www.w3.org/1999/XSL/Transform","single");if(item!=null)item.firstChild.nodeValue=paramValue};ag.prototype.doXSLTransToObject=function(xslDoc,xmlDoc){if(!xslDoc)xslDoc=this.xslDoc;if(xslDoc.responseXML)xslDoc=xslDoc.responseXML;if(!xmlDoc)xmlDoc=this.xmlDoc;if(xmlDoc.responseXML)xmlDoc=xmlDoc.responseXML;if(!_isIE){if(!this.XSLProcessor){this.XSLProcessor=new XSLTProcessor();this.XSLProcessor.importStylesheet(xslDoc)};var result=this.XSLProcessor.transformToDocument(xmlDoc)}else{var result=new ActiveXObject("Msxml2.DOMDocument.3.0");try{xmlDoc.transformNodeToObject(xslDoc,result)}catch(e){result=xmlDoc.transformNode(xslDoc)}};return result};ag.prototype.doXSLTransToString=function(xslDoc,xmlDoc){var res=this.doXSLTransToObject(xslDoc,xmlDoc);if(typeof(res)=="string")return res;return this.doSerialization(res)};ag.prototype.doSerialization=function(xmlDoc){if(!xmlDoc)xmlDoc=this.xmlDoc;if(xmlDoc.responseXML)xmlDoc=xmlDoc.responseXML;if(!_isIE){var kE=new XMLSerializer();return kE.serializeToString(xmlDoc)}else return xmlDoc.xml};dhtmlxEventable=function(obj){obj.xw="";obj.attachEvent=function(name,hk,callObj){name='ev_'+name.toLowerCase();if(!this[name])this[name]=new this.sI(callObj||this);return(name+':'+this[name].oe(hk))};obj.callEvent=function(name,afo){name='ev_'+name.toLowerCase();if(this[name])return this[name].apply(this,afo);return true};obj.mR=function(name){return(! !this['ev_'+name.toLowerCase()])};obj.sI=function(obj){var gu=[];var z=function(){var res=true;for(var i=0;i<gu.length;i++){if(gu[i]!=null){var O=gu[i].apply(obj,arguments);res=res&&O}};return res};z.oe=function(ev){if(typeof(ev)!="function")ev=eval(ev);if(ev)return gu.push(ev)-1;return false};z.uI=function(id){gu[id]=null};return z};obj.detachEvent=function(id){if(id!=false){var list=id.split(':');this[list[0]].uI(list[1])}}};
function gq(parent,size){if(typeof(parent)=="string")parent=document.getElementById(parent);size=size||parent.getAttribute("width")||(window.getComputedStyle?window.getComputedStyle(parent,null)["width"]:(parent.currentStyle?parent.currentStyle["width"]:0));if((!size)||(size=="auto"))size=parent.offsetWidth||100;var z=document.createElement("SPAN");if(parent.style.direction=="rtl")z.style.direction="rtl";parent.parentNode.insertBefore(z,parent);parent.style.display='none';var alE=parent.getAttribute('opt_type');var w=new be(z,parent.name,size,alE,parent.tabIndex);var x=new Array();var sel=0;for(var i=0;i<parent.options.length;i++){if(parent.options[i].selected)sel=i;var label=parent.options[i].innerHTML;var val=parent.options[i].getAttribute("value");if((typeof(val)=="undefined")||(val===null))val=label;x[i]={value:val,text:label,img_src:parent.options[i].getAttribute("img_src")}};w.jW(x);parent.parentNode.removeChild(parent);w.oa(sel,null,true);if(parent.onchange)w.attachEvent("onChange",parent.onchange);return w};var iT=[];function be(parent,name,width,xk,tabIndex){if(typeof(parent)=="string")parent=document.getElementById(parent);dhtmlxEventable(this);this.xk=(xk!=window.undefined&&iT[xk])?xk:'default';this.HX=iT[this.xk];this._disabled=false;if(parent.style.direction=="rtl")this.rtl=true;else this.rtl=false;if(!window.ib){window.ib=new Array();window.afP=null;window.alz=1;dE(document.body,"click",this.pl);dE(document.body,"keydown",function(e){try{if((e||event).keyCode==9)window.ib[0].pl()}catch(e){};return true})};if(parent.tagName=="SELECT")return gq(parent);else this.na(parent,name,width,tabIndex);ib.push(this)};be.prototype.Gl=function(GB){this.dr.style.width=GB+"px";if(this.nZ)this.nZ.style.width=GB+"px";this.fR.style.width=GB+"px";this.fK.style.width=Math.max(0,(GB-19))+'px'};be.prototype.fF=function(mode,url,cache,XJ){this._filter=K(mode);if(url){this.Q=url;this.Vz=K(XJ)};if(K(cache))this.zj=[]};be.prototype.aeS=function(name,value){if(!this.RC)this.RC=[];this.RC.push([name,value])};be.prototype.kB=function(mode){var z=K(mode);if(this._disabled==z)return;this.fK.disabled=z;this._disabled=z};be.prototype.readonly=function(mode,autosearch){this.fK.readOnly=mode?true:false;if(autosearch===false||mode===false){this.fR.onkeyup=function(ev){}}else{var that=this;this.fR.onkeyup=function(ev){ev=ev||window.event;if(ev.keyCode!=9)ev.cancelBubble=true;if((ev.keyCode>=48&&ev.keyCode<=57)||(ev.keyCode>=65&&ev.keyCode<=90)){for(var i=0;i<that.du.length;i++){var text=that.du[i].text;if(text.toString().toUpperCase().indexOf(String.fromCharCode(ev.keyCode))==0){that.oa(i);break}};ev.cancelBubble=true}}}};be.prototype.acS=function(value){for(var i=0;i<this.du.length;i++)if(this.du[i].value==value)return this.du[i];return null};be.prototype.MV=function(value){for(var i=0;i<this.du.length;i++)if(this.du[i].text==value||this.du[i].adL==value)return this.du[i];return null};be.prototype.afy=function(ind){return this.du[ind]};be.prototype.clearAll=function(all){if(all)this.nQ("");this.du=new Array();this.rA();if(all)this.Sn()};be.prototype.Xp=function(value){var ind=this.gg(value);if(ind<0)return;if(this.du[ind]==this.gG)this.gG=null;this.du.splice(ind,1);this.rA()};be.prototype.ht=function(mode){this.XR=(!K(mode));this.rA()};be.prototype.VL=function(afX,QM,amX,apZ){var UW=this.acS(afX);if(typeof(QM)!="object")QM={text:amX,value:QM,css:apZ};UW.setValue(QM);this.rA()};be.prototype.jW=function(options){if(!arguments[0].length||typeof(arguments[0])!="object")CF=[arguments];else CF=options;this.ht(false);for(var i=0;i<CF.length;i++){var lf=CF[i];if(lf.length){lf.value=lf[0]||"";lf.text=lf[1]||"";lf.css=lf[2]||""};this.Pi(lf)};this.ht(true)};be.prototype.Pi=function(lf){UW=new this.HX();this.du.push(UW);UW.setValue.apply(UW,[lf]);this.rA()};be.prototype.gg=function(val){for(var i=0;i<this.du.length;i++)if(this.du[i].value==val)return i;return-1};be.prototype.vL=function(){return(this.gG?this.gG.value:null)};be.prototype.nK=function(){return this.fK.value};be.prototype.nQ=function(text){this.fK.value=text};be.prototype.Um=function(text){this.nQ(text);for(var i=0;i<this.du.length;i++)if(this.du[i].data()[0]==text)return this.oa(i,null,true);this.qS.value=text};be.prototype.FV=function(){return this.qS.value};be.prototype.xn=function(){return(this.gG?this.gG.text:"")};be.prototype.Nn=function(){for(var i=0;i<this.du.length;i++)if(this.du[i]==this.gG)return i;return-1};be.prototype.aqJ=function(name){this.qS.name=name;this.vR=name+"_new_value";this.name=name};be.prototype.show=function(mode){if(K(mode))this.fR.style.display="";else this.fR.style.display="none"};be.prototype.fA=function(){var aps=this.ahZ;this.zZ.removeChild(this.fR);this.dr.parentNode.removeChild(this.dr);var s=ib;this.zZ=this.dr=this.fR=0;this.dr.combo=this.fR.combo=0;for(var i=0;i<s.length;i++){if(s[i].ahZ==aps){s[i]=null;s.splice(i,1);return}}};be.prototype.na=function(JZ,name,width,tab){if(width.toString().indexOf("%")!= -1){var self=this;var agu=parseInt(width)/100;window.setInterval(function(){if(!JZ.parentNode)return;var ts=JZ.parentNode.offsetWidth*agu-2;if(ts<0)return;if(ts==self.ajq)return;self.Gl(self.ajq=ts)},500);var width=parseInt(JZ.offsetWidth)};var width=parseInt(width||100);this.Wd="Bottom";this.zZ=JZ;this.ahZ=null;this.name=name;this.gG=null;this.du=Array();var arU=new this.HX();arU.GT(this,name,width,tab);this.dr=document.createElement("DIV");this.dr.className='dhx_combo_list';if(this.rtl)this.dr.className='dhx_combo_list_rtl';this.dr.style.width=width-(_isIE?0:0)+"px";if(cU||cn)this.dr.style.overflow="auto";this.dr.style.display="none";document.body.insertBefore(this.dr,document.body.firstChild);if(_isIE){this.nZ=document.createElement("IFRAME");this.nZ.style.border="0px";this.nZ.className='dhx_combo_list';this.nZ.style.width=width-(_isIE?0:0)+"px";this.nZ.style.display="none";this.nZ.src="javascript:false;";document.body.insertBefore(this.nZ,document.body.firstChild)};this.dr.combo=this.fR.combo=this;this.fK.onkeydown=this.akJ;this.fK.onkeypress=this._onKeyF;this.fK.onblur=this.adF;this.fR.onclick=this.Uo;this.dr.onclick=this.TU;this.dr.onmousedown=function(){this.ago=true};this.dr.onkeydown=function(e){this.combo.fK.focus();(e||event).cancelBubble=true;this.combo.fK.onkeydown(e)};this.dr.onmouseover=this.acH};be.prototype.acH=function(e){e=e||event;e.cancelBubble=true;var node=(_isIE?event.srcElement:e.target);var that=this.combo;if(node.parentNode==that.dr){if(that.gG)that.gG.Hs();if(that.BE)that.BE.Hs();var i=0;for(i;i<that.dr.childNodes.length;i++){if(that.dr.childNodes[i]==node)break};var z=that.du[i];that.BE=z;that.BE.select();if((that.Vz)&&((i+1)==that.Ff))that.AI(i+1,that.Ts||"")}};be.prototype.aaD=function(){var pos=this.fI(this.fR);if(this.Wd=='Bottom'){this.dr.style.top=pos[1]+this.fR.offsetHeight+"px";this.dr.style.left=pos[0]+"px"}else if(this.Wd=='Top'){this.dr.style.top=pos[1]-this.dr.offsetHeight+"px";this.dr.style.left=pos[0]+"px"}else{this.dr.style.top=pos[1]+"px";this.dr.style.left=pos[0]+this.fR.offsetWidth+"px"}};be.prototype.fI=function(PN,Bx){if(!Bx)var Bx=document.body;var dJ=PN;var uW=0;var AP=0;while((dJ)&&(dJ!=Bx)){uW+=dJ.offsetLeft-dJ.scrollLeft;AP+=dJ.offsetTop-dJ.scrollTop;dJ=dJ.offsetParent};if(Bx==document.body){if(_isIE){if(document.documentElement.scrollTop)AP+=document.documentElement.scrollTop;if(document.documentElement.scrollLeft)uW+=document.documentElement.scrollLeft}else if(!aq){uW+=document.body.offsetLeft;AP+=document.body.offsetTop}};return new Array(uW,AP)};be.prototype.Bg=function(){if(this.nK()!="")for(var i=0;i<this.du.length;i++)if(!this.du[i].WQ()){return this.oa(i,true,false)};this.Sv()};be.prototype.PD=function(step){var z=this.Nn()+step;while(this.du[z]){if(!this.du[z].WQ())return this.oa(z,false,false);z+=step}};be.prototype._onKeyF=function(e){var that=this.parentNode.combo;var ev=e||event;ev.cancelBubble=true;if(ev.keyCode=="13"||ev.keyCode=="9"){that.Sn();that.pl()}else if(ev.keyCode=="27"){that.Zb();that.pl()}else that.AS=true;if(ev.keyCode=="13"||ev.keyCode=="27"){that.callEvent("onKeyPressed",[ev.keyCode]);return false};return true};be.prototype.akJ=function(e){var that=this.parentNode.combo;(e||event).cancelBubble=true;var ev=(e||event).keyCode;if(ev>15&&ev<19)return true;if(ev==27)return;if((that.dr.style.display!="block")&&(ev!="13")&&(ev!="9")&&((!that._filter)||(that.amS)))that.fR.onclick(e||event);if((ev!="13")&&(ev!="9")){window.setTimeout(function(){that._onKeyB(ev)},1);if(ev=="40"||ev=="38")return false}else if(ev==9){that.pl();(e||event).cancelBubble=false}};be.prototype._onKeyB=function(ev){if(ev=="40"){var z=this.PD(1)}else if(ev=="38"){this.PD(-1)}else{this.callEvent("onKeyPressed",[ev]);if(this._filter)return this.Qm((ev==8)||(ev==46));for(var i=0;i<this.du.length;i++)if(this.du[i].data()[1]==this.fK.value){this.oa(i,false,false);return false};this.Sv()};return true};be.prototype.adF=function(){var self=this.parentNode.GU;window.setTimeout(function(){if(self.dr.ago)return!(self.dr.ago=false);self.Sn();self.callEvent("onBlur",[])},100)};be.prototype.rA=function(){if(this.XR)return;for(var i=this.dr.childNodes.length-1;i>=0;i--)this.dr.removeChild(this.dr.childNodes[i]);for(var i=0;i<this.du.length;i++)this.dr.appendChild(this.du[i].ht())};be.prototype.bD=function(url,bo){this.BI=true;this.callEvent("onXLS",[]);if((this.zj)&&(this.zj[url])){this.Cb(this,null,null,null,this.zj[url]);if(bo)bo()}else{var xml=(new ag(this.Cb,this,true,true));if(bo)xml.bs=bo;if(this.RC)for(var i=0;i<this.RC.length;i++)url+=[jv(url),escape(this.RC[i][0]),"=",escape(this.RC[i][1])].join("");xml.akz=url;xml.bD(url)}};be.prototype.bE=function(ajK){var xml=(new ag(this.Cb,this,true,true));xml.bE(ajK)};be.prototype.Cb=function(obj,b,c,d,xml){if(obj.zj)obj.zj[xml.akz]=xml;var toptag=xml.cR("complete");if(toptag.tagName!="complete")return;var top=xml.et("//complete");var options=xml.et("//option");obj.ht(false);if((!top[0])||(!top[0].getAttribute("add"))){obj.clearAll();obj.Ff=options.length;if(obj.Q){if((!options)||(!options.length))obj.pl();else{if(obj.AS){obj.aaD();obj.dr.style.display="block";if(_isIE)obj.Qr(true)}}}}else obj.Ff+=options.length;for(var i=0;i<options.length;i++){var lf=new Object();lf.text=options[i].firstChild?options[i].firstChild.nodeValue:"";for(var j=0;j<options[i].attributes.length;j++){var a=options[i].attributes[j];if(a)lf[a.nodeName]=a.nodeValue};obj.Pi(lf)};obj.ht(true);if((obj.BI)&&(obj.BI!==true))obj.bD(obj.BI);else{obj.BI=false;if((!obj.aiP)&&(!obj._filter))obj.Bg()};var selected=xml.et("//option[@selected]");if(selected.length)obj.oa(obj.gg(selected[0].getAttribute("value")),false,true);obj.callEvent("onXLE",[])};be.prototype.Sv=function(){if(this.gG)this.gG.Hs();if(this.BE)this.BE.Hs();this.BE=this.gG=null};be.prototype.Sn=function(data,status){if(arguments.length==0){var z=this.MV(this.fK.value);data=z?z.value:this.fK.value;status=(z==null);if(data==this.FV())return};this.qS.value=data;this.vR.value=(status?"true":"false");this.callEvent("onChange",[]);this.AS=false};be.prototype.Zb=function(data,status){var z=this.acS(this.qS.value);this.Um(z?z.data()[0]:this.qS.value);this.nQ(z?z.data()[1]:this.qS.value)};be.prototype.oa=function(ind,filter,conf){if(arguments.length<3)conf=true;this.Sv();var z=this.du[ind];if(!z)return;this.gG=z;this.gG.select();var Ww=this.gG.content.offsetTop+this.gG.content.offsetHeight-this.dr.scrollTop-this.dr.offsetHeight;if(Ww>0)this.dr.scrollTop+=Ww;Ww=this.dr.scrollTop-this.gG.content.offsetTop;if(Ww>0)this.dr.scrollTop-=Ww;var data=this.gG.data();if(conf){this.nQ(data[1]);this.Sn(data[0],false)};if((this.Vz)&&((ind+1)==this.Ff))this.AI(ind+1,this.Ts||"");if(filter){var text=this.nK();if(text!=data[1]){this.nQ(data[1]);XL(this.fK,text.length+1,data[1].length)}}else this.nQ(data[1]);this.gG.Dw(this);this.callEvent("onSelectionChange",[])};be.prototype.TU=function(e){(e||event).cancelBubble=true;var node=(_isIE?event.srcElement:e.target);var that=this.combo;while(!node.GU){node=node.parentNode;if(!node)return};var i=0;for(i;i<that.dr.childNodes.length;i++){if(that.dr.childNodes[i]==node)break};that.oa(i,false,true);that.pl();that.callEvent("onBlur",[]);that.AS=false};be.prototype.BJ=function(){if(this._disabled)return;this.pl();this.aaD();this.dr.style.display="block";this.callEvent("onOpen",[]);if(this.BE)this.BE.Hs();if(this.gG)this.gG.select();if(this.gG){var Ww=this.gG.content.offsetTop+this.gG.content.offsetHeight-this.dr.scrollTop-this.dr.offsetHeight;if(Ww>0)this.dr.scrollTop+=Ww;Ww=this.dr.scrollTop-this.gG.content.offsetTop;if(Ww>0)this.dr.scrollTop-=Ww};if(_isIE)this.Qr(true);this.fK.focus();if(this._filter)this.Qm()};be.prototype.Uo=function(e){var that=this.combo;if(that.dr.style.display=="block"){that.pl()}else{that.BJ()};(e||event).cancelBubble=true};be.prototype.AI=function(ind,text){if(text==""){this.pl();return this.clearAll()};var url=this.Q+((this.Q.indexOf("?")!= -1)?"&":"?")+"pos="+ind+"&mask="+encodeURIComponent(text);this.Ts=text;if(this.BI)this.BI=url;else this.bD(url)};be.prototype.Qm=function(mode){var text=this.nK();if(this.Q){this.aiP=mode;this.AI(0,text)};try{var filter=new RegExp("^"+text,"i")}catch(e){var filter=new RegExp("^"+text.replace(/([\[\]\{\}\(\)\+\*\\])/g,"\\$1"))};this.Tx=false;for(var i=0;i<this.du.length;i++){var z=filter.test(this.du[i].text);this.Tx|=z;this.du[i].hide(!z)};if(!this.Tx){this.pl();this.AS=true}else{if(this.dr.style.display!="block")this.BJ();if(_isIE)this.Qr(true)};if(!mode)this.Bg();else this.Sv()};be.prototype.Qr=function(mode){this.nZ.style.display=(mode?"block":"none");this.nZ.style.top=this.dr.style.top;this.nZ.style.left=this.dr.style.left};be.prototype.pl=function(){if(window.ib)for(var i=0;i<ib.length;i++){if(ib[i].dr.style.display=="block"){ib[i].dr.style.display="none";if(_isIE)ib[i].Qr(false)};ib[i].AS=false}};function XL(SD,Gy,End){var Lv=typeof(SD)=='object'?SD:document.getElementById(SD);try{Lv.focus()}catch(e){};var Pm=Lv.value.length;Gy--;if(Gy<0||Gy>End||Gy>Pm)Gy=0;if(End>Pm)End=Pm;if(Gy==End)return;if(Lv.setSelectionRange){Lv.setSelectionRange(Gy,End)}else if(Lv.createTextRange){var vi=Lv.createTextRange();vi.moveStart('character',Gy);vi.moveEnd('character',End-Pm);vi.select()}};co=function(){this.init()};co.prototype.init=function(){this.value=null;this.text="";this.selected=false;this.css=""};co.prototype.select=function(){if(this.content)this.content.className="dhx_selected_option"};co.prototype.hide=function(mode){this.ht().style.display=mode?"none":""};co.prototype.WQ=function(){return(this.ht().style.display=="none")};co.prototype.Hs=function(){if(this.content)this.ht();this.content.className=""};co.prototype.setValue=function(lf){this.value=lf.value||"";this.text=lf.text||"";this.css=lf.css||"";this.content=null};co.prototype.ht=function(){if(!this.content){this.content=document.createElement("DIV");this.content.GU=this;this.content.style.cssText='width:100%;overflow:hidden;'+this.css;if(cU||cn)this.content.style.padding="2px 0px 2px 0px";this.content.innerHTML=this.text;this.adL=_isIE?this.content.innerText:this.content.textContent};return this.content};co.prototype.data=function(){if(this.content)return[this.value,this.adL?this.adL:this.text]};co.prototype.GT=function(self,name,width,tab){var z=document.createElement("DIV");z.style.width=width+"px";z.className='dhx_combo_box';z.GU=self;self.fR=z;this.vA(self,name,width,tab);this.un(self,name,width);self.zZ.appendChild(self.fR)};co.prototype.vA=function(self,name,width,tab){if(self.rtl&&_isIE){var z=document.createElement('textarea');z.style.overflow="hidden";z.style.whiteSpace="nowrap"}else{var z=document.createElement('input');z.setAttribute("autocomplete","off");z.type='text'};z.className='dhx_combo_input';if(self.rtl){z.style.left="18px";z.style.direction="rtl";z.style.unicodeBidi="bidi-override"};if(tab)z.tabIndex=tab;z.style.width=(width-19)+'px';self.fR.appendChild(z);self.fK=z;z=document.createElement('input');z.type='hidden';z.name=name;self.fR.appendChild(z);self.qS=z;z=document.createElement('input');z.type='hidden';z.name=name+"_new_value";z.value="true";self.fR.appendChild(z);self.vR=z};co.prototype.un=function(self,name,width){var z=document.createElement('img');z.className=(self.rtl)?'dhx_combo_img_rtl':'dhx_combo_img';z.src=(window.fe?fe:"")+'input-dropdown.gif';self.fR.appendChild(z);self.ajs=z};co.prototype.Dw=function(self){};iT['default']=co;
