var gx={O:null,pO:null,oldValues:[],oldKeyValues:[],newRows:[],suggestControls:[],disabledControls:[],usrPtys:[],usrFocusControl:"",currentRows:[],attachedControls:[],languageCode:"eng",dateFormat:"MDY",timeFormat:12,blankWhenEmpty:false,centuryFirstYear:40,decimalPoint:".",thousandSeparator:",",staticDirectory:"/",basePath:"",theme:"",msg:{},setParentObj:function(a){gx.pO=a;gx.O=gx.pO},setExecutableComponent:function(a){if(gx.pO==null){gx.setParentObj(gx.createComponent(a,""))}},setMasterPage:function(a){if(gx.pO!=null){gx.pO.MasterPage=a}},addComponent:function(a){if(gx.pO!=null){gx.pO.setWebComponent(a)}},createComponent:function(d,b){var e=null;var c=gx.lang.getType(d);if(c!=null){c.prototype=new gx.GxObject;var a=gx.csv.cmpCtx;gx.csv.cmpCtx=b;e=new c(b);gx.csv.cmpCtx=a}return e},getObj:function(b,a){if(b==""){if(a==true){return gx.pO.MasterPage}else{return gx.pO}}else{return gx.pO.getWebComponent(b)}},setGxO:function(b,a){gx.csv.cmpCtx=b;if(b==""){if(a==true){gx.O=gx.pO.MasterPage}else{gx.O=gx.pO}}else{gx.O=gx.pO.getWebComponent(b)}gx.O=gx.O||gx.pO},setVar:function(b,a){gx.O.setVariable(b,a)},getVar:function(a){return gx.O.getVariable(a)},prefixVar:function(a){return"gx.O."+a},unprefixVar:function(c){var a=new RegExp("^(?:gx.O.)(.+)$");var b=a.exec(c);if(b!=null&&b[1]){c=b[1]}else{a=new RegExp("^(?:.+)?((?:gx.O.)([a-zA-Z0-9_]+)(?:,)?(?:.*))$");b=a.exec(c);if(b!=null&&b[2]){c=b[2]}}return c},getMessage:function(a){if(gx.msg[a]==undefined){return a}else{return gx.msg[a]}},setLanguageCode:function(a){gx.languageCode=a},setDateFormat:function(a){gx.dateFormat=a},setTimeFormat:function(a){gx.timeFormat=a},setCenturyFirstYear:function(a){gx.centuryFirstYear=a},setBlankWhenEmptyDate:function(a){gx.blankWhenEmpty=a},setDecimalPoint:function(a){gx.decimalPoint=a},setThousandSeparator:function(a){gx.thousandSeparator=a},setStaticDirectory:function(d){gx.staticDirectory=d;if(gx.staticDirectory==""){gx.staticDirectory="/"}else{var b=gx.staticDirectory.length;var c=(gx.staticDirectory.charAt(0)!="/");var a=(gx.staticDirectory.charAt(b-1)!="/");gx.staticDirectory=((c?"/":"")+gx.staticDirectory+(a?"/":""))}},setTheme:function(){this.theme=gx.fn.getHidden("GX_THEME");if(!this.theme){this.theme=""}},SetOld:function(a,c,e){var b=c;var d=gx.fn.controlGridId(a);if(d>0){b=c+"_"+gx.fn.currentGridRow(d)}gx.fn.setHidden(b,gx.getVar(e))},Old:function(a,d){try{var b=d;var g=gx.fn.controlGridId(a);if(g>0){b=d+"_"+gx.fn.currentGridRow(g)}var c=gx.fn.getHidden(b);if(typeof(c)=="undefined"&&(gx.O.CmpContext!="")){c=gx.fn.getHidden(gx.O.CmpContext+b)}return c}catch(f){gx.dbg.logEx(f,"gxapi.js","Old")}return""},OldInteger:function(a,c){var b=parseInt(gx.Old(a,c),10);return isNaN(b)?0:b},OldDecimal:function(a,c){var b=gx.num.parseFloat(gx.Old(a,c),gx.thousandSeparator,gx.decimalPoint);return isNaN(b)?0:b},OldDate:function(a,c){var b=new gx.date.gxdate(gx.Old(a,c),"Y4MD");return b.getStringWithFmt(gx.dateFormat)},OldDateTime:function(a,c){var b=new gx.date.gxdate(gx.Old(a,c),"Y4MD");
return b.getStringWithFmt(gx.dateFormat)+" "+b.getTimeString(true,true)},typedOld:function(a,c,b){switch(b){case"int":return this.OldInteger(a,c);case"decimal":return this.OldDecimal(a,c,true);case"date":return this.OldDate(a,c);case"dtime":return this.OldDateTime(a,c);default:return this.Old(a,c)}},types:{numeric:0,character:1,date:2,dateTime:3,blob:4,varChar:5,longVarChar:6,bool:7},gen:{net:false,isDotNet:function(){return this.net}},dom:{_form:null,_avoidLeaksDiv:null,id:function(a){return((a.id==undefined||a.id=="")?a.name:a.id)},byId:function(a){return document.getElementById(a)},byName:function(a){return document.getElementsByName(a)},byTag:function(a){return document.getElementsByTagName(a)},byClass:function(c,b){if(document.getElementsByClassName){return document.getElementsByClassName(c)}else{var e=[];var d=gx.dom.byTag(b||"*");var a=d.length;var f=new RegExp("(^|\\s)"+c+"(\\s|$)");for(i=0,j=0;i<a;i++){if(f.test(d[i].className)){e[j]=d[i];j++}}return e}},el:function(b){if(b==""){return null}else{var a=this.byId(b);if(a!=null){return a}a=this.byId("span_"+b);if(a!=null){return a}a=this.byName(b);if(a!=null&&a.length>0){return a[0]}return null}},hasClass:function(c,b){var a=typeof c=="object"?c:gx.dom.el(c);if(a){return b&&(" "+a.className+" ").indexOf(" "+b+" ")!=-1}},form:function(){if(this._form==null){this._form=document.forms.MAINFORM;if(!this._form){this._form=document.forms[0]}}return this._form},indexElements:function(){if(!document.all){var c=this.form().elements;var a=c.length;for(var b=0;b<a;b++){c[b].gxIndex=b}}},setAttribute:function(g,h,c){try{var f=gx.dom.byName(g);if(f!=null&&f.length>0){var d=f.length;for(var b=0;b<d;b++){f[b].setAttribute(h,c)}}else{var a=gx.dom.byId(g);if(a!=null){a.setAttribute(h,c)}}}catch(k){gx.dbg.logEx(k,"gxapi.js","setAttribute")}},createInput:function(c,a){var b=document.createElement("input");b.type=a;b.id=c;b.name=c;gx.dom.form().appendChild(b)},hasSubmitControl:function(){var b=this.byTag("input");var a=b.length;if(!a){return false}for(var c=0;c<a;c++){var d=b[c].getAttribute("type");if((d=="submit")||(d=="image")){return true}}return false},scripts:function(){var c=document.scripts;if(!c){c=document.getElementsByTagName("script")}if(typeof(c)!="undefined"){var b=[];var a=c.length;for(var e=0;e<a;e++){var d=c[e].attributes.src;if(d&&d.value){d=d.value;if(d!="//:"){b.push(d)}}}return b}return[]},styles:function(){var e=document.styleSheets;if(typeof(e)!="undefined"){var d=[];var a=e.length;for(var c=0;c<a;c++){var b=e[c].href;if(!gx.lang.emptyObject(b)){d.push(b)}}return d}return[]},getStyle:function(d,b){var c="";try{if(typeof(window.getComputedStyle)=="function"){c=window.getComputedStyle(d,null)[b]}else{if(typeof(d.currentStyle)!="undefined"){c=d.currentStyle[b]}else{c=d.style[b]}}var a=parseInt(c);if(!isNaN(a)){c=a}}catch(f){gx.dbg.logEx(f,"gxapi.js","getStyle")}return c},isButton:function(a){if(a!=undefined&&a!=null){return(a.type=="submit")||(a.type=="button")}return false},iFrameDoc:function(a){if(a.contentDocument){return a.contentDocument
}if(a.contentWindow){try{return a.contentWindow.document}catch(b){}}return null},forEachChild:function(e,b,d){if(e&&e.childNodes&&typeof(d)=="function"){var a=e.childNodes.length;for(var c=0;c<a;c++){if(d.call(b,e.childNodes[c])===false){break}}}},isTextWithLink:function(b){if(b!=null){if((b.tagName=="A")&&b.childNodes&&(b.childNodes.length>0)){var a=b.firstChild;if(this.innerChildIsText(a)){return true}}}return false},isChildNode:function(b,a){if(b.frameElement){b=b.frameElement}if(b==a){return true}while(b.parentNode){if(b==a){return true}if(b.parentNode==a){return true}b=b.parentNode}return false},findParentByTagName:function(c,a){var b=c.parentNode;a=a.toUpperCase();while(b){if(b.tagName==a){return b}b=b.parentNode}},innerChildIsText:function(a){while(a!=null){if(a.nodeName&&(a.nodeName=="#text")){return true}a=a.firstChild}return false},position:function(a){var c=0;var b=0;while(a.offsetParent){c+=a.offsetLeft+(a.currentStyle?(gx.num.intval(a.currentStyle.borderLeftWidth)):0)-(a.scrollLeft||0);b+=a.offsetTop+(a.currentStyle?(gx.num.intval(a.currentStyle.borderTopWidth)):0)-(a.scrollTop||0);a=a.offsetParent}c+=a.offsetLeft+(a.currentStyle?(gx.num.intval(a.currentStyle.borderLeftWidth)):0);b+=a.offsetTop+(a.currentStyle?(gx.num.intval(a.currentStyle.borderTopWidth)):0);return{x:c,y:b}},dimensions:function(f){var e=f.offsetWidth;var h=f.offsetHeight;var g=f.childNodes;if(!gx.util.browser.isIE()&&!gx.lang.emptyObject(g)){var b=g.length;for(var d=0;d<b;d++){var a=g[d].offsetWidth;var c=g[d].offsetHeight;if(a>e){e=a}if(c>h){h=c}}}return{w:e,h:h}},windowDimensions:function(e){var f=e.documentElement;var b=e.body;if(f&&f.scrollHeight){var c=Math.max(f.scrollHeight,b.scrollHeight);var g=Math.max(f.scrollWidth,b.scrollWidth);var d=Math.max(f.clientHeight,b.clientHeight);var a=Math.max(f.clientWidth,b.clientWidth);return{scrollWidth:g,scrollHeight:c,clientHeight:d,clientWidth:a}}else{return{scrollWidth:b.scrollWidth,scrollHeight:b.scrollHeight,clientHeight:b.clientHeight,clientWidth:b.clientWidth}}},autofitIFrame:function(a){var b=window.event||a;var e=gx.evt.source(b);var d=window.frames[e.name].document;if(!d||e.width!=""||e.height!=""){return}var g=gx.dom.windowDimensions(d);var c=g.scrollWidth?(g.scrollWidth+10):null;var f=g.scrollHeight?(g.scrollHeight+10):null;if(c&&f){e.style.width=c+"px";e.style.height=f+"px"}},fitToParent:function(e){if(!gx.util.browser.isIE()){if(e&&e.childNodes){var c=null;var a=e.childNodes.length;for(var b=0;b<a;b++){var d=e.childNodes[b];if(d.nodeName=="TABLE"){c=d;break}}if(c!=null){if(c.style.width.indexOf("%")!=-1){e.style.width=c.style.width}if(c.style.height.indexOf("%")!=-1){e.style.height=c.style.height}}}}},redrawControl:function(a){if(!gx.util.browser.isIE()||(gx.util.browser.ieVersion()>=7)){gx.html.setOuterHtml(a,a.outerHTML)}else{setTimeout(function(){gx.html.setOuterHtml(a,a.outerHTML)},100)}},setCaretPosition:function(b,c){if(b!=null){if(b.createTextRange){var a=b.createTextRange();a.move("character",c);a.select()
}else{if(b.selectionStart){b.focus();b.setSelectionRange(c,c)}else{b.focus()}}}},spanValue:function(a){var b=a.nodeValue;if(gx.lang.emptyObject(b)){b=a.innerText||a.textContent}if(gx.lang.emptyObject(b)){b=""}return b},removeControlSafe:function(a){if(!this._avoidLeaksDiv){this._avoidLeaksDiv=document.createElement("DIV");this._avoidLeaksDiv.style.display="none";document.body.appendChild(this._avoidLeaksDiv)}this._avoidLeaksDiv.appendChild(a);this._avoidLeaksDiv.innerHTML=""},removeControl:function(b){if(document.createRange==null){b.removeNode(true)}else{var a=document.createRange();if(b){a.selectNode(b);a.deleteContents()}}},comboBoxToObj:function(c,d){try{var g={s:"",v:[]};if(c.tagName=="SELECT"){g.s=c.value;var a=c.options.length;for(var b=0;b<a;b++){var h="";if(typeof(c.options[b].innerText)!="undefined"){h=c.options[b].innerText}else{h=c.options[b].text}g.v.push([c.options[b].value,h])}}else{if(c.tagName=="SPAN"&&typeof(d)=="string"){g.v.push([d,d]);g.s=d}}return g}catch(f){gx.dbg.logEx(f,"gxapi.js","comboBoxToObj")}return null},_init:function(){Function.prototype.closure=function(e,b){if(!window.__objs){window.__objs=[];window.__funs=[];window.__args=[]}var a=this;var c=e.__objId;if(!c){__objs[c=e.__objId=__objs.length]=e}var f=a.__funId;if(!f){__funs[f=a.__funId=__funs.length]=a}if(!b){b=[]}var d=a.__argsId;if(!d){__args[d=a.__argsId=__args.length]=b}e=null;a=null;b=null;return function(){if(!__funs){return}var h=__args[d];if(h.length==0&&arguments.length>0){h=arguments}var g=__funs[f].apply(__objs[c],h);delete __objs[c]["__objId"];delete __funs[f]["__funId"];delete __funs[f]["__argsId"];return g}}},_deinit:function(){this._form=null;if(this._avoidLeaksDiv!=null){this._avoidLeaksDiv.parentNode.removeChild(this._avoidLeaksDiv);this._avoidLeaksDiv=null}window.__objs=null;window.__funs=null;window.__args=null}},util:{contentTypes:{txt:"text/plain",rtx:"text/richtext",htm:"text/html",html:"text/html",xml:"text/xml",aif:"audio/x-aiff",au:"audio/basic",wav:"audio/wav",bmp:"image/bmp",gif:"image/gif",jpe:"image/jpeg",jpeg:"image/jpeg",jpg:"image/jpeg",jfif:"image/pjpeg",tif:"image/tiff",tiff:"image/tiff",png:"image/x-png",mpg:"video/mpeg",mpeg:"video/mpeg",mov:"video/quicktime",qt:"video/quicktime",avi:"video/x-msvideo",exe:"application/octet-stream",dll:"application/x-msdownload",ps:"application/postscript",pdf:"application/pdf",tgz:"application/x-compressed",zip:"application/x-zip-compressed",gz:"application/x-gzip"},isKnownContentType:function(a){for(var b in this.contentTypes){if(this.contentTypes[b]==a){return true}}return false},getContentTypeFromExt:function(a){var b=a.lastIndexOf(".");if(b!=-1){a=a.substring(b+1)}return this.getContentType(a)},getContentType:function(b){if(gx.lang.emptyObject(b)){return"text/html"}b=b.toLowerCase();b=gx.text.trim(b);if(this.isKnownContentType(b)){return b}var c=b.lastIndexOf(".");if(c!=-1){b=b.substring(c+1)}var a=this.contentTypes[b];if(gx.lang.emptyObject(a)){return"text/html"}return a},browser:{w3c:true,ns4:false,ie5:true,ns6:false,ie:(navigator.userAgent.indexOf("MSIE")!=-1),ff:(navigator.userAgent.indexOf("Firefox")!=-1),winCE:(navigator.userAgent.indexOf("Windows CE")!=-1),iphone:(navigator.userAgent.indexOf("iPhone")!=-1),ipad:(navigator.userAgent.indexOf("iPad")!=-1),blackBerry:(navigator.userAgent.indexOf("BlackBerry")!=-1),operaMini:(navigator.userAgent.indexOf("Opera Mini")!=-1),chrome:(navigator.userAgent.indexOf("Chrome")!=-1),webkit:(navigator.userAgent.search(/webkit/ig)!=-1),isIE:function(){return this.ie
},isFirefox:function(){return this.ff},isChrome:function(){return this.chrome},isWinCE:function(){return this.winCE},isIPhone:function(){return this.iphone},isIPad:function(){return this.ipad},isBlackBerry:function(){return this.blackBerry},isOperaMini:function(){return this.operaMini},isWebkit:function(){return this.webkit},isSmartDevice:function(){return this.isWinCE()||this.isIPhone()||this.isBlackBerry()||this.isOperaMini()},ieVersion:function(){if(this.isIE()){try{var b=navigator.userAgent.indexOf("MSIE");var c=navigator.userAgent.indexOf(";",b);var a=navigator.userAgent.substring(b+5,c);return parseFloat(a,10)}catch(d){gx.dbg.logEx(d,"gxapi.js","ieVersion")}}return -1},setupFF:function(){if(this.isFirefox()){var a={IMG:true,BR:true,INPUT:true,META:true,LINK:true,PARAM:true,HR:true};HTMLElement.prototype.__defineGetter__("outerHTML",function(){var c=this.attributes;var e="<"+this.tagName;var b=c.length;for(var d=0;d<b;d++){e+=" "+c[d].name+'="'+c[d].value+'"'}if(a[this.tagName]){return e+">"}return e+">"+this.innerHTML+"</"+this.tagName+">"});HTMLElement.prototype.__defineSetter__("outerHTML",function(c){var b=this.ownerDocument.createRange();b.setStartBefore(this);var d=b.createContextualFragment(c);this.parentNode.replaceChild(d,this)})}},_init:function(){if(!this.isWinCE()){this.w3c=(document.getElementById)?true:false;this.ns4=(document.layers)?true:false;this.ie5=(this.ie&&document.getElementById&&document.all)?true:false;this.ns6=(document.getElementById&&!document.all)?true:false}this.setupFF()}},addOnce:function(c,b,a){if(c[a]==undefined){c[a]=b}},inArray:function(d,b){if((d==null)||!(b instanceof Array)){return false}var a=b.length;for(var c=0;c<a;c++){if(b[c]==d){return true}}return false},noParmsUrl:function(a){var b=a.indexOf("?");if(b!=-1){a=a.substring(0,b)}return a},resourceUrl:function(f,b){if(typeof(f)=="undefined"){return""}if(f.indexOf("://")!=-1||f.charAt(0)=="."){return f}var a=gx.basePath.length;var d=(gx.basePath.charAt(a-1)!="/");var e=f.indexOf(gx.basePath);if(e==0&&!b){return((f.charAt(0)=="/")?"":"/")+f}if((e!=-1)||b){var c="";if(e!=-1){c=gx.text.replaceAll(f.substring(e+gx.basePath.length),"\\","/")}else{c=f}if(f.charAt(0)=="/"){return location.protocol+"//"+location.host+f}else{var g=(gx.basePath.charAt(0)!="/");d=(d&&(c.charAt(0)!="/"));return location.protocol+"//"+location.host+(g?"/":"")+gx.basePath+(d?"/":"")+c}}return f},sameAppUrl:function(a){a=new this.Url(a);if(a.isRelative()){return true}return a.isSameApp(location.href)},removeBaseUrl:function(c){var a=gx.staticDirectory.length;var f=(gx.staticDirectory.charAt(0)!="/");var b=(gx.staticDirectory.charAt(a-1)!="/");var e=new RegExp("(?:/)?(?:"+gx.basePath+(f?"/":"")+gx.staticDirectory+(b?"/":"")+")?((?:[\\S]*))");var d=e.exec(c);if(d!=null&&d[1]){c=d[1]}return c},Url:function(a){this.url=a;this.protocol="";this.host="";this.port="";this.path="";this.query="";this.hash="";this.user="";function b(g,c){var f=/^(([^\:\/\?#]+)\:)?(\/\/([^\/\?#]*))?([^\?#]*)(\?([^#]*))?(#(.*))?$/;
var h=f.exec(c);var d=!gx.lang.emptyObject(h);if(d){g.protocol=(h[2]?h[2]:"");var e=(h[4]?h[4]:"");g.path=(h[5]?h[5]:"");g.query=(h[7]?h[7]:"");g.hash=(h[9]?h[9]:"");f=/^(([^@]+)@)?([^\:]+)(:(.+))?$/;h=f.exec(e);d=!gx.lang.emptyObject(h);if(d){g.user=(h[2]?h[2]:"");g.host=(h[3]?h[3]:"");g.port=(h[5]?h[5]:"")}}}this.isRelative=function(){return gx.lang.emptyObject(this.host)};this.isSameApp=function(c){c=new gx.util.Url(c);return((this.protocol==c.protocol)&&(this.host==c.host))};b(this,a)},regExp:{isMatch:function(b,c){var a=new RegExp(c).exec(b);return(a!==null)},replace:function(b,c,a){return b.replace(c,a)},split:function(a,b){return a.split(b)},matches:function(b,c){var a=new RegExp(c).exec(b);if(a!==null){return a}else{return[]}}},autoRefresh:{arTimer:null,getProps:function(){var a=gx.fn.getHidden("_GxRefreshTimeout");if(a!=null){a=gx.json.evalJSON(a);a.Time=parseInt(a.Time)}return a},install:function(){var a=this.getProps();if(a!=null){this.create();if(a.Type=="focus"){gx.evt.attach(window,"blur",this.destroy)}}},create:function(){if(this.arTimer==null){var a=this.getProps();if(a!=null){this.arTimer=setTimeout(function(){gx.http.reload()},a.Time*1000)}}},destroy:function(){if(gx.util.autoRefresh.arTimer!=null){window.clearTimeout(gx.util.autoRefresh.arTimer);gx.util.autoRefresh.arTimer=null}}},accessKey:function(b){var d="";if(b.indexOf("&")!=-1){var a=b.length;for(var c=0;c<a-1;c++){if(b[c]=="&"&&b[c+1]!="&"){d=d+b[c+1];break}}}return d},accessKeyCaption:function(b){var d="";if(b.indexOf("&")==-1){return b}var a=b.length;for(var c=0;c<a-1;c++){if(b[c]=="&"&&b[c+1]!="&"){d+=b.substring(c+1);break}else{d+=b[c]}}return d},invalidFunc:function(a){throw"gxInvalidFunc: "+a},urlValue:function(b){var a=b;if(typeof(a)!="string"){a=gx.fn.getControlValueInt(b)}return encodeURIComponent(a)},help:function(a){open(a,"gxHelpWindow","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no")},_init:function(){this.browser._init();Array.prototype.removeAt=function(a){this.splice(a,1)}}},lang:{inherits:function(b,d){var c=b.prototype;b.prototype=new d();for(var a in c){if(typeof(b.prototype[a])=="undefined"){b.prototype[a]=c[a]}}if(typeof(b.prototype.base)=="undefined"){b.prototype.base=d}},instanceOf:function(c,a){if((c==null)||(a==null)){return false}if(c instanceof a){return true}if((a==String)&&(typeof(c)=="string")){return true}if((a==Number)&&(typeof(c)=="number")){return true}if((a==Array)&&(typeof(c)=="array")){return true}if((a==Function)&&(typeof(c)=="function")){return true}if((typeof(c)=="string")||(typeof(c)=="number")||(typeof(c)=="array")){return false}var b=c.base;while(typeof(b)!="undefined"){if(b==a){return true}b=b.base}return false},clone:function(b){var a={};for(var c in b){a[c]=b[c]}return a},isNumericType:function(a){return a=="int"||a=="decimal"},isBooleanType:function(a){return a=="boolean"||a=="bool"},isArray:function(a){return a&&typeof a.length=="number"&&typeof a.splice=="function"},booleanValue:function(a){if(a==true||a==false){return a
}else{if(typeof(a)=="string"){if(a.toLowerCase()=="true"){return true}else{return false}}}return false},gxBoolean:function(a){if(typeof(a)=="undefined"){return false}else{if(typeof(a)=="boolean"){return a}else{if(typeof(a)=="number"){if(a==0){return false}}else{if(typeof(a)=="string"){if(a.toLowerCase()=="false"){return false}else{if(a.replace(/^ */,"").replace(/ *$/,"")=="0"){return false}}}}}}return true},arrayToSource:function(d){if(d.toSource!=null){return d.toSource()}var e="[";var a=d.length;var c=a-1;for(var b=0;b<a;b++){e+=this.objectToSource(d[b]);if(b<c){e+=","}}e+="]";return e},objectToSource:function(b){if(this.isArray(b)){return this.arrayToSource(b)}if(typeof(b)=="object"){var e="{";var d="";for(var a in b){var c=a;if(c==""){c="''"}else{if(typeof(c)=="string"){c="'"+c+"'"}}e+=d;if(typeof(b[a])=="object"){e+=c+":"+this.objectToSource(b[a])}else{if(typeof(b[a])=="string"){e+=c+":'"+this.encodeValue(b[a])+"'"}else{e+=c+":"+b[a]}}d=","}e+="}";return e}return"'"+this.encodeValue(b.toString())+"'"},emptyObject:function(a){if((typeof(a)=="undefined")||(a==null)||(a=="")||(typeof(a)=="number"&&isNaN(a))){return true}return false},supEval:function(b,a){var c=null;if(a instanceof String||typeof(a)=="string"){c=b[a]}else{c=a}return function(){return c.apply(b,arguments)}},getType:function(typeName){var typeObj=null;try{typeObj=eval(typeName)}catch(e){gx.dbg.logEx(e,"gxapi.js","getType")}return typeObj},doEval:function(src,scope){scope=scope||window;if(scope.execScript){return scope.execScript(src)}else{if(eval.call){return eval.call(scope,src)}else{return eval(src)}}},doCall:function(){try{var d=arguments[0];var b=[];var a=arguments.length;for(var c=1;c<a;c++){b.push(arguments[c])}d.apply(this,b)}catch(f){gx.dbg.logEx(f,"gxapi.js","doCall")}},doCallTimeout:function(c,a,b,d){setTimeout(c.closure(a,b),d)},encodeValue:function(a){return gx.text.charReplace(a,['"',"'","\r","\n"],["\\042","\\047","\\015","\\012"])},decodeValue:function(a){a=gx.text.replaceAll(a,"\\042",'"');return gx.text.replaceAll(a,"\\015\\012","\r\n")}},cache:{remoteFiles:[],inlineCode:[],addRemoteFile:function(b){b=gx.util.noParmsUrl(b);var a=gx.util.resourceUrl(b,true);this.remoteFiles[a]=true},addLoadedFile:function(b){b=gx.util.noParmsUrl(b);var a=gx.util.resourceUrl(b,true);this.remoteFiles[a]=true},removeRemoteFile:function(b){b=gx.util.noParmsUrl(b);var a=gx.util.resourceUrl(b,true);this.remoteFiles[a]=false},fileLoaded:function(b){b=gx.util.noParmsUrl(b);var a=gx.util.resourceUrl(b,true);if(this.remoteFiles[a]){return true}return false},updateStyles:function(h,k){var a=[];var e=h.length;for(var d=0;d<e;d++){var g=h[d];if(!gx.lang.emptyObject(g)){var l=false;var c=k.length;for(var b=0;b<c;b++){if(g==k[b]){l=true;break}}if(!l){a.push(g)}}}var f=gx.staticDirectory;if(f.charAt(0)=="/"){f=f.substring(1)}e=a.length;for(var d=0;d<e;d++){var g=a[d];if(g.charAt(0)!="/"){g=f+g}this.removeRemoteFile(g)}},addInlineCode:function(a){this.inlineCode[a]=true},deleteInlineCode:function(a){delete this.inlineCode[a]
},codeLoaded:function(a){if(this.inlineCode[a]){return true}return false},_init:function(){var g=gx.staticDirectory;if(g.charAt(0)=="/"){g=g.substring(1)}var b=gx.dom.scripts();var a=b.length;for(var e=0;e<a;e++){var d=b[e];if(!gx.lang.emptyObject(d)){if(d.charAt(0)!="/"&&!gx.ajax.isabsoluteurl(d)){d=g+d}this.addRemoteFile(d)}}var f=gx.dom.styles();var a=f.length;for(var e=0;e<a;e++){var c=f[e];if(!gx.lang.emptyObject(c)){if(c.charAt(0)!="/"&&!gx.ajax.isabsoluteurl(c)){c=g+c}this.addRemoteFile(c)}}}},evt:{enter:false,lastKey:-1,lastControl:null,lastEvent:null,dummyCtrl:{},keyListeners:{},shiftPressed:false,execLoad:true,autoSkip:false,hooks:[],controlKeys:[3,6,8,9,12,13,14,16,17,18,19,20,27,32,33,34,35,36,37,38,39,40,44,45,46],triggerKeys:[13,32],processing:true,userReady:false,addHook:function(c,a,b){this.hooks[this.hooks.length]={c:c,e:a,f:b}},clearHooks:function(){var a=this.hooks.length;for(var b=0;b<a;b++){var c=this.hooks[b];this.detach(c.c,c.e,c.f);c.c=null;c.f=null;this.hooks[b]=null;c=null}this.hooks=[]},source:function(a){return(a.target||a.currentTarget||a.srcElement)},attach:function(c,a,b){if(c.attachEvent){c.attachEvent("on"+a,b)}else{if(c.addEventListener){c.addEventListener(a,b,false)}else{c["on"+a]=b}}this.addHook(c,a,b)},detach:function(c,a,b){if(c.detachEvent){c.detachEvent("on"+a,b)}else{if(c.removeEventListener){c.removeEventListener(a,b,false)}else{c["on"+a]=null}}},cancel:function(a,b){if(b&&gx.util.browser.isIE()&&typeof(a.keyCode!="undefined")){try{a.keyCode=0}catch(c){}}if(typeof(a.preventDefault)=="undefined"){a.cancelBubble=b;a.returnValue=!b}else{if(b){a.preventDefault();a.stopPropagation()}}},checkCtrlFocus:function(a){try{if(gx.util.browser.isChrome()&&a.type=="button"){if(gx.fn.isAccepted(a)){if(a.onfocus!=undefined){a.onfocus()}}}}catch(b){gx.dbg.logEx(b,"gxapi.js","checkCtrlFocus")}},doClick:function(d,a){var c=gx.evt.source(a);if(c.type!="button"&&c.type!="submit"){var b=gx.dom.el(d);if(gx.fn.isAccepted(b)){if(b.onfocus!=undefined){b.onfocus()}if(b.onclick!=undefined){b.onclick()}if(b.nodeName=="INPUT"&&b.type=="submit"){gx.dom.form().submit()}}}},executeOnblur:function(c){var b=gx.csv.lastId;var a=gx.O.focusControl;gx.O.focusControl=c;this.onblur(gx.O.focusControl);gx.O.focusControl=a;gx.csv.lastId=b},onblur:function(c){gx.csv.lastId=c;try{var f=gx.fn.validStruct(c);if(f&&f.gxgrid!=null){f.gxgrid.updateControlValue(f,false)}var b=gx.csv.lastControl;var a=b.getAttribute("maxlength");if(a>0&&b.value.length>=a){b.value=b.value.substring(0,a)}}catch(d){gx.dbg.logEx(d,"gxapi.js","onblur")}},onfocus:function(o,c,n,m,k,u,t){gx.evt.userReady=false;if(!gx.fn.checkPopupFocus(o)){gx.evt.userReady=true;return false}var q=false;if(gx.csv.cmpCtx!=n){q=true;gx.O.fromValid=0}gx.setGxO(n,m);if(q){gx.fn.changeCmpContext()}gx.fn.initOld(o);try{if(gx.grid.lastFocusCtrl!=null){gx.csv.lastId=gx.grid.lastFocusCtrl;gx.grid.lastFocusCtrl=null}}catch(r){gx.dbg.logEx(r,"gxapi.js","onfocus")}gx.csv.rowChanged=false;gx.csv.lastControl=o;gx.fx.installSuggest(o);
if(u==0||k!=""){gx.fn.setCurrentGridRow(u,k)}var f=false;if(gx.csv.lastGrid!=u){gx.csv.lastRow[u]=null;if(!t){if(gx.csv.lastGrid<u){var b=gx.fn.firstGridControl(u);if(gx.O.fromValid>b){gx.O.fromValid=b}}gx.csv.lastGrid=u}f=true}gx.O.focusControl=c;if(!gx.csv.onloadFocus){try{gx.fx.ctx.notify(o)}catch(r){gx.dbg.logEx(r,"gxapi.js","onfocus")}}if(gx.csv.disableFocus){gx.csv.disableFocus=false;gx.evt.userReady=true;return true}try{var s=gx.fn.getControlValue("Mode");if(s=="DLT"||s=="DSP"){gx.evt.userReady=true;return true}if(gx.O.isTransaction()&&gx.dom.isButton(o)&&!gx.evt.isEnterEvtCtrl(o)&&!gx.evt.isCheckEvtCtrl(o)&&!t){gx.evt.userReady=true;return true}}catch(r){gx.dbg.logEx(r,"gxapi.js","onfocus")}if(gx.O.isTransaction()){if(o.gxdisabled&&gx.csv.lastControl!=null){cn=gx.fn.getControlIndex(o)+1;if(cn!=-1){NextFocus=gx.fn.searchFocusFwd(cn);if(NextFocus!=null){gx.fn.setFocus(NextFocus);gx.evt.userReady=true;return true}}gx.fn.setFocus(gx.csv.lastControl);gx.evt.userReady=true;return true}}if(gx.csv.invalidForcedCtrl){gx.fn.setFocus(gx.csv.invalidForcedCtrl);gx.csv.invalidForcedCtrl=null;gx.evt.userReady=true;return true}if(gx.csv.invalidControl!=null&&gx.csv.invalidControl!=o&&gx.O.focusControl>=gx.csv.invalidId){if(gx.csv.invalidControl==o&&gx.csv.validate(gx.csv.invalidControl,gx.csv.invalidId,false)){gx.csv.invalidControl=null;gx.evt.userReady=true;return true}}if(t){gx.O.fromValid=gx.fn.firstGridControl(gx.csv.lastGrid);gx.O.toValid=gx.fn.firstCtrlAfterGrid(gx.O.fromValid,gx.csv.lastGrid);gx.O.focusControl=gx.O.toValid}else{gx.O.toValid=gx.O.focusControl;if(gx.O.focusControl<gx.O.fromValid){gx.O.fromValid=gx.O.focusControl}}if((gx.csv.lastRow[u]!=undefined)&&(gx.csv.lastRow[u]!=k)&&!f){if(gx.O.fromValid==gx.O.toValid){gx.csv.lastId=gx.O.fromValid}}var l=gx.fn.controlIds();if(l.length>0){if(gx.O.fromValid<l[0]){gx.O.fromValid=l[0]}}if(gx.lang.emptyObject(gx.csv.lastRow[u])&&u!=0){gx.csv.rowChanged=true;gx.csv.lastRow[u]=k}var d=gx.csv.checkRowChange(gx.csv.lastId,f);var p=false;if(!gx.lang.emptyObject(gx.csv.lastRow[u])&&!gx.lang.emptyObject(k)&&gx.csv.lastRow[u].length>k.length){var a=k.length;var g=gx.csv.lastRow[u].substring((gx.csv.lastRow[u]).length-a);p=parseInt(g)<parseInt(k)}if(!d&&(gx.O.focusControl>=gx.csv.lastId||p)){if(gx.fn.lastMainLevelCtrlId(gx.csv.lastId,u)){var h=gx.fn.getControlRefById(gx.csv.lastId);if(h&&h.getAttribute("gxvalid")===1){gx.O.fromValid=gx.csv.lastId+1}}gx.csv.validateAll()}else{gx.O.toValid=gx.O.focusControl}if(gx.csv.invalidControl==null){if(o.nodeName=="SELECT"){if(!gx.util.browser.isIE()||gx.util.browser.ieVersion()>=7){gx.fn.setSelection(o)}}else{gx.fn.setSelection(o)}}gx.csv.disableFocusCondition();gx.evt.userReady=true;return false},userOnload:function(){try{if(typeof(window.GXOnloadUsr)=="function"){GXOnloadUsr()}}catch(a){gx.dbg.logEx(a,"gxapi.js","userOnload")}},onload:function(){if(!gx.evt.execLoad){return}gx.fx.obs.notify("gx.onready");gx.sec.loadKey();gx.setTheme();gx.ajax._init();gx.grid._init();gx.evt.attach(window,"unload",gx.evt.onunload);
gx.csv.lastActiveControl=window.document.activeElement;if(!gx.csv.lastActiveControl){gx.csv.lastActiveControl=gx.csv.lastControl}gx.fx.delayedSuggest();gx.http.notification.node();gx.cache._init();gx.fn.installComponents(true);gx.http.loadStyles();gx.fn.objectOnload();gx.dom.indexElements();gx.fn.doAttachs();document.gxReadyState="complete";gx.util.autoRefresh.install();if(!gx.util.browser.isIE()||gx.util.browser.ieVersion()>8){gx.fn.setOpacity(100,"body")}setTimeout(function(){gx.fn.setFocusOnload()},100);gx.evt.setProcessing(false);gx.fx.obs.notify("gx.onload");gx.evt.userOnload();gx.http.doCommands();gx.evt.userReady=true},onready:function(a){if(gx.lang.emptyObject(a)){if(document.readyState=="complete"){gx.evt.onload()}else{setTimeout(function(){gx.evt.onready(null)},250)}}else{if(gx.util.browser.isIE()){if(document.readyState=="complete"){gx.evt.onload()}}else{if(gx.util.browser.isFirefox()){gx.evt.onload()}}}},on_ready:function(a,b){gx.fx.obs.addObserver("gx.onload",a,b)},onunload:function(){gx.http.saveState(true);gx.evt.clearHooks();gx.fx.obs.removeAll();gx.http.notification.cleanup();gx.fn.objectOnUnload();gx._deinit()},onclick:function(a){gx.evt.userReady=false;if(gx.grid.drawAtServer&&gx.evt.processing){gx.evt.cancel(a,true)}gx.evt.mouse.update(a);setTimeout(function(){gx.fx.ctx.notify()},10);gx.evt.userReady=true},onmousedown:function(c){gx.evt.mouse.update(c);var d=gx.fx.dnd;var b=window.event||c;d.deleteClonControl();var a=d.getSource(b);if(a!=null){gx.evt.cancel(b,true);gx.setGxO(a.obj.CmpContext,a.obj.IsMasterPage);d.drag(a.obj,a.types,a.hdl)}},onmousemove:function(b){gx.evt.mouse.update(b);var d=gx.fx.dnd;var c=gx.util.browser.isIE();if(gx.popup.ispopup()){var e=gx.popup.ext;e.movepopup();if((e.currIDb!=null)||(e.currRS!=null)){return false}}if(d.obj!=null){var a=window.event||b;gx.evt.cancel(a,true);var f=gx.fx.dnd.getTarget(a,d.obj.gxDragTypes);if(f!=null){d.over()}d.moveControl(d.dragCtrl)}},onmouseup:function(b){gx.evt.mouse.update(b);var c=gx.fx.dnd;if(c.dragCtrl!=null){var a=window.event||b;var d=c.getTarget(a,c.obj.gxDragTypes);if(d!=null){c.deleteClonControl();gx.setGxO(d.obj.CmpContext,d.obj.IsMasterPage);c.drop(c.dropCtrl,d.obj,d.hdl)}else{c.restoreControl()}var a=window.event||b;gx.evt.cancel(a,true)}c.out();c.dragCtrl=null;c.obj=null;if(gx.popup.ispopup()){gx.popup.ext.currRS=null}},ondblclick:function(b){gx.evt.mouse.update(b);var a=window.event||b;gx.fx.dom.raiseEvent("dblclick",a)},onwindowblur:function(a){gx.fx.dnd.deleteClonControl()},onkeypress:function(k,l,f){if((k==null)&&(!window.event)){return}if((k!=null)&&(window.event)){return}var b=(k==null?window.event:k);if(b.keyCode==27){if(gx.popup.ispopup()){gx.fn.closeWindow();return}}if(!gx.O||(gx.O.isTransaction()&&gx.O.Gx_mode=="DSP"&&this.invalidDSPKey(b))){this.cancel(b,true);return false}this.lastKey=b.keyCode;this.shiftPressed=b.shiftKey;var h=b.ctrlKey;var e=gx.evt.source(b)||document.activeElement||gx.csv.lastControl;gx.csv.invalidateCtrl(e,b);if(this.isEnterEvtCtrl(e)&&this.isTriggerKey(b)){if(this.cancelAndRefresh(b)){return
}}this.checkFuncKey(b,e);if(b.charCode==32||b.keyCode==32||(b.keyCode==13&&!f)){if(gx.dom.hasClass(e,"gx_newrow")){var g=gx.dom.findParentByTagName(e,"DIV");if(g){var a=gx.O.getGridById(g.getAttribute("gxgridid"));if(a){a.getNewRows(1,b)}}}}if(b.keyCode==13){var d=this.triggersEvt(e);if(f){if(e.value&&gx.util.browser.isIE()&&e.tagName!="SELECT"){var c=e.value;e.value="";e.value=c}if(gx.fn.enterHasFocus()){gx.O.executeEnterEvent(b,e)}else{if(h&&(e.nodeName=="TEXTAREA")){e.value+="\n";gx.dom.setCaretPosition(e,e.value.length);return}else{gx.fn.skipFocus(f);this.cancel(b,true);this.enter=false}}}else{if(!d){gx.O.executeEnterEvent(b,e)}}}},onkeyup:function(h){var f=window.event?window.event:h;var a=gx.evt.source(f);var d=a.getAttribute("maxlength");var g=typeof(a.value)=="undefined"?"":a.value;if((a.type==""&&this.lastKey==9)||(this.autoSkip&&a.type!=""&&!this.isControlKey(this.lastKey)&&g.length>=d)){if(gx.dom.isTextWithLink(a)){return}var b=a.getAttribute("gxfocusable");if(b!=null&&b=="1"){return}var c=gx.fn.getControlIndex(gx.csv.invalidControl?gx.csv.invalidControl:gx.csv.lastControl);if(c==-1){return true}var e=gx.fn.searchFocus(this.shiftPressed?c-1:c+1,!this.shiftPressed);gx.fn.setFocus(e)}},setEventRow:function(c,d){var a=gx.fn.rowGridId(d);var b=gx.fn.controlRowId(d)||gx.fn.currentGridRowImpl(a)||"0001";if((a!=null)&&(b!=null)){if(d.gxGridName!=undefined){gx.fn.setHidden(c.CmpContext+d.gxGridName.toUpperCase()+"_ROW",b)}gx.csv.lastEvtRow=b;gx.fn.setCurrentGridRow(a,b)}},ctrlOnchange:function(e,d,c,a,b){gx.csv.pkDirty=c;if(e.value=="UPD"){if(d.value=="1"){if(c){if(a!=null){a.value=gx.getMessage("GXM_captionadd")}}else{if(a!=null){a.value=gx.getMessage("GXM_captionupdate")}}d.value="0"}else{if(c){if(a!=null){a.value=gx.getMessage("GXM_captionadd")}}}}else{if(e.value=="INS"){if(d.value=="1"){if(a!=null){a.value=gx.getMessage("GXM_captionadd")}d.value="0"}}}},onchange:function(c){gx.evt.userReady=false;gx.evt.lastControl=c;var m=gx.fn.getControlValue(gx.dom.id(c));var k=(gx.util.browser.isWebkit()&&(c.type=="radio"||c.type=="checkbox"));if(k){c.onfocus()}var g;var f=false;if(c.getAttribute("gxoldvalue")!=m){f=true;gx.fn.setControlValue("IsModified","1");var o="";var b=true;g=gx.O.getValidStruct(gx.O.focusControl);if(g){if(typeof(g.c2v)=="function"){g.c2v()}if(typeof(g.v2bc)=="function"){g.v2bc.call(gx.O)}}if(c.type=="select-one"||c.type=="checkbox"||c.type=="radio"){if(gx.csv.validate(c,gx.O.focusControl,true)){if(gx.csv.invalidControl==c){gx.csv.invalidControl=null}}else{b=false}}if(c.type=="radio"){var l=gx.dom.byName(gx.dom.id(c));var n=l.length;for(var e=0;e<n;e++){l[e].setAttribute("gxoldvalue",m)}}else{c.setAttribute("gxoldvalue",m)}if(b){gx.evt.execOnchange(c)}}var a=gx.evt.execUsrOnchange(c);gx.evt.userReady=true;var h=k,d=false;if(f&&g&&gx.fn.lastMainLevelCtrlId(gx.O.focusControl,g.grid)){h=true;d=true}if(h&&c.onblur){c.onblur()}if(d){gx.csv.validControls(gx.O.focusControl,gx.O.focusControl+1,true)}return a},execOnchange:function(Ctrl){var jsCode="";
if(Ctrl.attributes.gxoch1){try{jsCode+=Ctrl.attributes.gxoch1.value+";"}catch(e){gx.dbg.logEx(e,"gxapi.js","execOnchange")}}if(gx.fn.isAccepted(Ctrl)&&Ctrl.attributes.gxoch2){try{jsCode+=Ctrl.attributes.gxoch2.value+";"}catch(e){gx.dbg.logEx(e,"gxapi.js","execOnchange")}}try{if(jsCode!=""){eval(jsCode)}}catch(e){gx.dbg.logEx(e,"gxapi.js","execOnchange")}Ctrl.setAttribute("gxvalid","0");Ctrl.setAttribute("gxctrlchanged","1");gx.fn.setControlValue("IsModified","1")},execUsrOnchange:function(b){var c="";try{c=b.attributes.gxoch0.value}catch(d){return true}var f=new Function(c);var a=f.call(b);return a},jsEvent:function(ctrl){var evtCode=ctrl.getAttribute?ctrl.getAttribute("jsevent"):ctrl.jsevent;if(!gx.lang.emptyObject(evtCode)){return eval(evtCode)}return true},isEnterEvtCtrl:function(b){if(!gx.lang.emptyObject(gx.O.EnterCtrl)){var a=gx.dom.id(b);for(var d in gx.O.EnterCtrl){if(gx.O.EnterCtrl[d]==a){return true}if((gx.O.CmpContext+gx.O.EnterCtrl[d])==a){return true}}}return false},isCheckEvtCtrl:function(b){if(!gx.lang.emptyObject(gx.O.CheckCtrl)){var a=gx.dom.id(b);for(var d in gx.O.CheckCtrl){if(gx.O.CheckCtrl[d]==a){return true}if((gx.O.CmpContext+gx.O.CheckCtrl[d])==a){return true}}}return false},isTriggerKey:function(c){var a=this.triggerKeys.length;for(var b=0;b<a;b++){if((c.keyCode==this.triggerKeys[b])||(c.charCode==this.triggerKeys[b])){return true}}return false},isControlKey:function(c){var a=this.controlKeys.length;for(var b=0;b<a;b++){if(c==this.controlKeys[b]){return true}}return false},invalidDSPKey:function(a){var b=event.keyCode-111;if(a.shiftKey){b+=12}if(this.keyListeners[b][gx.O.CmpContext]=="ENTER"){return true}if(a.keyCode==13){return true}return false},addKeyListener:function(c,b,a){if(b==1){document.body.onhelp=function(){return false}}if(this.keyListeners[b]==undefined){this.keyListeners[b]=[]}this.keyListeners[b][c]=a},setEvtName:function(a,b){gx.fn.setHidden("_EventName",a)},cancelAndRefresh:function(a){if(gx.O.conditionsChanged){this.cancel(a,true);gx.O.executeServerEvent("RFR",true);return true}return false},setGridEvt:function(a,c){if(!gx.lang.emptyObject(a)){if(gx.lang.emptyObject(c)){var b=gx.fn.getGridObj(a);if(b){c=gx.fn.getHidden(gx.O.CmpContext+b.gridName.toUpperCase()+"_ROW")}}gx.fn.setHidden("_EventGridId",a);gx.fn.setHidden("_EventRowId",c);gx.fn.setCurrentGridRow(a,c)}},checkFuncKey:function(a,c){var b=this.lastKey-111;if(a.shiftKey){b+=12}if(b>0&&b<=24&&(this.keyListeners[b]!=undefined)){var f=this.keyListeners[b][gx.O.CmpContext];if(typeof(f)!="undefined"){this.execFnKeyEvt(a,gx.O,f,c)}else{for(var e in this.keyListeners[b]){f=this.keyListeners[b][e];if(typeof(f)!="undefined"){var d=gx.getObj(e,false);if(d!=null){this.execFnKeyEvt(a,d,f,c);break}}}}}},execFnKeyEvt:function(n,c,l,b){if(gx.evt.processing){return}this.cancel(n,true);if(typeof(c[l])=="function"){var m=c.isServerEvent(l);gx.evt.setProcessing(true,!m);c[l].call(c);gx.evt.setProcessing(false,!m)}else{if(l=="PROMPT"){var g=c.getValidStructFld(b.id);if(g){var d=g.attachedCtrls;
for(var f=0,h=d.length;f<h;f++){var a=d[f];if(a&&a.info&&a.info.isPrompt){var e=d[f].id;if(typeof(c.promptKeyHandlers[e])=="function"){c.promptKeyHandlers[e].call(c)}}}}}else{if(c.isTransaction()&&l=="SELECT"){var k=gx.dom.el(c.CmpContext+"BTN_SELECT");if(k&&typeof(k.onclick)=="function"){k.onclick()}}else{gx.evt.execEvt(c.CmpContext+"E"+l+".",gx.evt.dummyCtrl)}}}},keyModifiesValue:function(a){if((a.keyCode>=32&&a.keyCode<=127)||a.keyCode==229){return true}return false},triggersEvt:function(a){if(!gx.lang.emptyObject(a)){if(a==gx.evt.dummyCtrl){return true}if(a.nodeName=="A"||a.nodeName=="TEXTAREA"){return true}else{if(a.nodeName=="INPUT"){if(a.type=="button"||a.type=="image"){return true}}}}return false},setProcessing:function(b,a){if((typeof(a)=="undefined")||a){gx.evt.processing=b;gx.evt.userReady=!gx.evt.processing}},execEvt:function(c,e,d,a){if(gx.lang.emptyObject(c)){return}if(a){gx.evt.srvCommand=true}if(gx.csv.lastId>0&&gx.evt.isEnterEvtCtrl(e)){var b=gx.fn.getControlRefById(gx.csv.lastId);if(b&&b.GXFormatError==true){return}}else{if(gx.evt.enter&&!gx.lang.emptyObject(gx.csv.lastControl)&&gx.csv.lastControl.GXFormatError==true){return}}this.setEvtName(c,e);this.lastEvent=c;if(gx.grid.drawAtServer||(e&&e.nodeName=="INPUT"&&e.type=="submit")){this.execEvtSubmit(c,e)}else{gx.ajax.doPost(gx.ajax.encryptParms(gx.pO,"gxajaxEvt"),d)}},execEvtSubmit:function(a,d){if(gx.evt.processing&&!gx.csv.validating){return}gx.evt.setProcessing(true);gx.ajax.disableForm();gx.fx.obs.notify("gx.onbeforeevent",[a,d]);gx.fn.objectOnpost();gx.http.saveState();gx.fn.forceEnableControls(false);var c=gx.dom.form();var g=gx.popup.getPopup();if(g!=null){var b=c.action;var e=g.window.gx.popup.lvl;if(e!=-1){var f=(b.indexOf("?")!=-1)?",":"?";f+=encodeURIComponent("gxPopupLevel="+e+";");b+=f;c.action=b}}if(!(d&&d.nodeName=="INPUT"&&d.type=="submit")){c.submit()}},execCliEvt:function(h,a,e,b,g,c){if(gx.evt.processing&&!gx.csv.validating){return}c=(c!=undefined)?c:[];var f=gx.getObj(h,a);if(f!=null){gx.setGxO(h,a);if(typeof(b)=="string"&&b!=""&&(arguments.length>4)){f.getGrid(b).instanciateRow(g)}var d=f.isServerEvent(e);gx.evt.setProcessing(true,!d);f[e](c);gx.popup.waitCallback(function(){gx.evt.setProcessing(false,(!gx.csv.validating&&!d))});if(f.conditionsChanged){f.executeServerEvent("RFR",true)}}},mouse:{x:-1,y:-1,update:function(a){try{var b=gx.util.browser.isIE();this.x=(b)?event.clientX+document.body.scrollLeft:a.pageX;this.y=(b)?event.clientY+document.body.scrollTop:a.pageY}catch(c){gx.dbg.logEx(c,"gxapi.js","mouse update")}}},_init:function(){document.gxReadyState="loading";if(gx.util.browser.isIE()&&!gx.util.browser.isWinCE()){this.attach(document,"readystatechange",this.onready)}else{if(gx.util.browser.isFirefox()){this.attach(document,"DOMContentLoaded",this.onready)}else{if(gx.util.browser.isBlackBerry()||gx.util.browser.isOperaMini()||gx.util.browser.isIPhone()){this.attach(window,"load",this.onload)}else{this.onready(null)}}}this.attach(document,"mousedown",this.onmousedown);
this.attach(document,"mousemove",this.onmousemove);this.attach(document,"mouseup",this.onmouseup);this.attach(document,"click",this.onclick);this.attach(document,"dblclick",this.ondblclick);this.attach(window,"blur",this.onwindowblur)},_deinit:function(){this.lastControl=null;this.lastEvent=null;this.dummyCtrl={};this.keyListeners={};this.hooks=[]}},csv:{pkDirty:false,validating:false,lastRow:[],rowChanged:false,currentId:0,lastId:0,lastControl:null,lastActiveControl:null,lastGrid:0,cmpCtx:"",anyError:false,userFocus:null,focusControl:null,invalidControl:null,invalidForcedCtrl:null,validActivatedControl:null,disableFocus:false,validatingUC:null,validatingGrid:null,lastEvtResponse:null,lastEvtRow:null,invalidId:0,validForm:function(){var a=true;try{if(gx.fn.getControlValue("IsConfirmed")!="1"&&gx.fn.getHidden("_EventName")=="EENTER."){a=this.validControls(this.lastId,gx.fn.lastCtrlId()+1,false)}}catch(b){gx.dbg.logEx(b,"gxapi.js","validForm")}if(a){gx.fn.forceEnableControls(false)}return a},validateAll:function(){try{this.validControls(gx.O.fromValid,gx.O.toValid,false);if(this.invalidControl==null&&!(this.rowChanged&&!this.targetRowIsMod(this.toValid))){gx.O.fromValid=gx.O.toValid}}catch(a){gx.dbg.logEx(a,"gxapi.js","validateAll")}},validControls:function(a,f,d){var b=true;var h=-1;try{gx.csv.validActivatedControl=null;gx.csv.invalidControl=null;gx.csv.invalidId=0;if(f>a){for(var g=a;g<f;g++){var l=this.validControl(g,d);var n=l.ret;if(b&&!n){h=l.ctrl;b=false}}}if(h!=-1){var m=gx.fn.validStruct(h);var c=gx.fn.getControlGridRef(m.fld,m.grid);gx.csv.disableFocus=true;if(gx.fn.isAccepted(c)){gx.fn.setFocus(c)}else{gx.fn.setFocus(gx.evt.lastControl)}}else{if(!gx.dom.isButton(gx.csv.lastControl)&&gx.csv.validActivatedControl!=null){gx.fn.setFocus(gx.csv.validActivatedControl)}}}catch(k){gx.dbg.logEx(k,"gxapi.js","validControls")}return b},validControl:function(d,c){var a=true;var g=-1;var k=gx.fn.validStruct(d);if(k!=undefined){if(k.grid!=0){var f=gx.fn.currentGridRow(k.grid);if(f!=undefined){gx.fn.setCurrentGridRow(k.grid,f)}}if(k.isuc==true){k.uc.execC2VFunctions()}else{if(typeof(k.c2v)=="function"){k.c2v()}}if(typeof(k.v2bc)=="function"){k.v2bc.call(gx.O)}try{if(k.lvl==0||((k.grid!=0)&&gx.fn.gridRowIsMod(k.lvl,gx.fn.currentGridRow(k.grid)))||!gx.O.isTransaction()){var b=null;if(k.isuc==true){b=k.uc.getRealControl()}else{b=gx.fn.getControlGridRef(k.fld,k.grid)}if(b){var l=this.validate(b,d,c);var m=false;if(k.grid!=0){m=gx.fn.rowIsRemoved(k.grid,gx.fn.currentGridRow(k.grid))}if(!l&&a&&!m){gx.csv.invalidControl=b;gx.csv.invalidId=d;g=d;a=false}gx.csv.lastId=d;if(gx.fn.isAccepted(b)==false){gx.evt.executeOnblur(d);if(b.getAttribute("gxhiddenonchange")!=b.value){b.setAttribute("gxhiddenonchange",b.value);gx.evt.execOnchange(b)}}}}}catch(h){gx.dbg.logEx(h,"gxapi.js","validControl")}}return{ret:a,ctrl:g}},validate:function(f,d,b){gx.csv.anyError=false;var k=gx.fn.validStruct(d);if(k==undefined){return true}gx.csv.refreshVars(k);if((k.fnc==null)&&(k.isvalid==null)){if(f.tagName!="SELECT"&&f.type!="checkbox"&&gx.lang.isNumericType(k.type)&&!gx.lang.emptyObject(k.rgrid)){var a=k.rgrid.length;
for(var d=0;d<a;d++){k.rgrid[d].filterVarChanged()}}return true}try{var g="";if(d!=-1&&(b||(f.getAttribute("gxvalid")!="1"))){gx.evt.setProcessing(true);gx.csv.currentId=d;gx.csv.validatingGrid=k.gxgrid;gx.csv.validating=true;gx.csv.refreshVars(k);var c=false;if(k.isuc==true){c=k.fnc.call(k.uc)}else{if(k.fnc!=null){c=k.fnc.call(gx.O)}else{c=true}}if(gx.O.AnyError==1){if(gx.lang.emptyObject(gx.csv.invalidControl)){gx.csv.invalidControl=f}gx.csv.anyError=true;gx.O.AnyError=0}if(gx.csv.anyError==true){c=!gx.csv.anyError}if(c==false){gx.csv.validatingGrid=null;gx.csv.validating=false;gx.evt.setProcessing(false);return false}gx.csv.refreshControls(k);gx.csv.invalidateDeps(d);if(!gx.lang.emptyObject(k.rgrid)&&!gx.lang.emptyObject(k.hc)){var a=k.rgrid.length;for(var d=0;d<a;d++){k.rgrid[d].filterVarChanged()}}if(k.isvalid!=null){k.isvalid.call(gx.O)}if(gx.fn.isAccepted(f)){f.setAttribute("gxvalid","1")}else{f.setAttribute("gxvalid","0")}gx.csv.validatingGrid=null;gx.csv.validating=false;gx.evt.setProcessing(false)}}catch(h){gx.dbg.logEx(h,"gxapi.js","validate")}return true},invalidateForm:function(){if(gx.O.AnyError==1){return}var e=gx.fn.controlIds();var a=e.length;for(var b=0;b<a;b++){var d=gx.fn.validStruct(e[b]);var c=gx.fn.getControlGridRef(d.fld,d.grid);if(c){if((c.getAttribute("gxvalid")==1)&&(c.getAttribute("gxoldvalue")!=c.value)){c.setAttribute("gxvalid","0")}}}},invalidateCtrl:function(b,a){try{if((b.getAttribute("gxvalid")==1)&&(b.getAttribute("gxoldvalue")!=b.value)){b.setAttribute("gxvalid","0")}var d=gx.fn.validStruct(gx.O.focusControl);if(d&&d.grid!=0&&gx.evt.keyModifiesValue(a)){d.gxgrid.setRowModified(gx.fn.currentGridRowImpl(d.grid))}}catch(c){gx.dbg.logEx(c,"gxapi.js","invalidateCtrl")}},invalidateDeps:function(b){var d=gx.fn.controlIds();var m=d.length;for(var l=0;l<m;l++){var o=d[l];if(o>b){var n=gx.fn.validStruct(o);var g=n.ip?n.ip.length:0;for(var h=0;h<g;h++){if(n.ip[h]==b){if(n.grid==0){var a=gx.fn.getControlGridRef(n.fld,n.grid);if(a){a.setAttribute("gxvalid","0")}}else{var c=gx.fn.getGridObj(n.grid);if(c){var f=c.grid.rows.length;for(var e=0;e<f;e++){var r=c.grid.rows[e];var p=r.gxDeleted();var q=r.gxExists();if(!p&&q){c.setRowModified(r.gxId);var a=gx.fn.getControlRef(n.fld+"_"+r.gxId);if(a){a.setAttribute("gxvalid","0")}}}}}}}}}},disableFocusCondition:function(){if(typeof(gx.fn.validStruct(gx.O.focusControl))=="undefined"){return false}try{var a=gx.getVar("Gx_mode");if(gx.csv.lastGrid>0){gx.setVar("Gx_mode",gx.fn.getGridRowMode(gx.fn.gridLvl(gx.csv.lastGrid),gx.csv.lastGrid))}var d=gx.fn.validStruct(gx.O.focusControl);if(d&&d.nac&&d.nac.call(gx.O)==true){cn=gx.fn.getControlIndex(gx.csv.lastControl)+1;var c=gx.fn.searchFocusFwd(cn);if(c!=null){gx.fn.setFocus(c)}gx.setVar("Gx_mode",a);return true}gx.setVar("Gx_mode",a)}catch(b){}return false},loadScreen:function(){try{if(gx.csv.pkDirty){gx.csv.pkDirty=false;gx.fn.clearOldKeys();gx.evt.execEvt(gx.csv.cmpCtx+"ELSCR.",gx.evt.dummyCtrl)}}catch(a){gx.dbg.logEx(a,"gxapi.js","loadScreen")
}},ctxControlId:function(a){if(a.indexOf(this.cmpCtx)==0){return a}return this.cmpCtx+a},isProperty:function(a){if(a instanceof Array&&a.length==2){return true}if(typeof(a)=="object"){if(typeof(a[0])!="undefined"&&typeof(a[1])!="undefined"){return true}}return false},checkRowChange:function(a,b){try{var h=gx.fn.validStruct(a);if(typeof(h)!="undefined"){var g=h.grid;if(g!=0){var c=gx.fn.currentGridRowImpl(g);if(c!=0&&(c!=gx.csv.lastRow[g]||b)&&c.length>1&&gx.csv.lastRow[g]&&gx.csv.lastRow[g].length>1){gx.csv.rowChanged=true;var f=gx.O.Gx_BScreen;gx.O.Gx_BScreen=1;if(gx.csv.validGridRowChange(g,c)==true){gx.fn.setCurrentGridRow(g,c)}gx.O.Gx_BScreen=f;return true}if(c!=undefined){gx.fn.setCurrentGridRow(g,c)}}}}catch(d){gx.dbg.logEx(d,"gxfrmutl.js","checkRowChange")}return false},validGridRow:function(d,c){if(c!=undefined){gx.fn.setCurrentGridRow(d,c)}var a=gx.fn.firstGridControl(d);var b=gx.fn.lastGridControl(d);return gx.csv.validControls(a,b+1,true)},validGridRowChange:function(e,d){if(gx.csv.lastRow[e]!=undefined){gx.fn.setCurrentGridRow(e,gx.csv.lastRow[e])}var a=gx.fn.firstGridControl(e);var c=gx.fn.lastGridControl(e);var b=gx.csv.validControls(a,c+1,true);if(b){gx.csv.changeGridRow(e,a,d)}return b},changeGridRow:function(c,a,b){var d=gx.fn.gridRowIsMod(gx.fn.gridLvl(c),gx.csv.lastRow[c]);if(d){gx.fn.setNewRow(c,gx.csv.lastRow[c],false)}gx.csv.lastId=a;if(gx.O.fromValid>a){gx.O.fromValid=a}gx.csv.lastRow[c]=b;Gx_BScreen=1},targetRowIsMod:function(a){var b=gx.fn.validStruct(a);if(b){return gx.fn.gridRowIsMod(b.lvl,gx.fn.currentGridRow(b.grid))}return false},refreshVars:function(d){var a=d.ip?d.ip.length:0;for(var b=0;b<a;b++){try{if(typeof(gx.fn.validStruct(d.ip[b]).c2v)=="function"){gx.fn.validStruct(d.ip[b]).c2v()}}catch(c){gx.dbg.logEx(c,"gxapi.js","refreshVars")}}},refreshControls:function(g){var b=g.op?g.op.length:0;for(var d=0;d<b;d++){try{var a=gx.fn.validStruct(g.op[d]);a.v2c();var c=null;if(a.grid==0){c=gx.dom.el(gx.csv.ctxControlId(a.fld))}else{c=gx.fn.getControlGridRef(a.fld,a.grid)}if(c){c.setAttribute("gxvalid","0")}}catch(f){gx.dbg.logEx(f,"gxapi.js","refreshControls")}}b=g.ucs?g.ucs.length:0;for(var d=0;d<b;d++){try{gx.fn.validStruct(g.ucs[d]).uc.execV2CFunctions()}catch(f){gx.dbg.logEx(f,"gxapi.js","refreshControls")}}},setValidValues:function(g,p){var d=false;var k=g.length;for(var h=0;h<k;h++){var o=g[h];var l=p[h];if(this.isProperty(o)){var n=gx.fn.vStructForVar(o[0])||gx.O.getValidStructFld(o[0]);if(n!=null){gx.fn.setCtrlProperty(n.fld,o[1],l)}}else{var n=gx.fn.validStruct(this.currentId);if(!gx.lang.emptyObject(n)&&!gx.lang.emptyObject(n.hc)){if(n.hc==o){gx.O[n.hc]=l;gx.fn.setHidden(this.cmpCtx+"GXH_"+n.fld,l)}else{if(n.hd==o){gx.O[n.hd]=l}}}n=gx.fn.vStructForVarWId(o,this.currentId);if(!gx.lang.emptyObject(n)){var f=gx.fn.screen_CtrlRef(n.fld);if(!gx.lang.emptyObject(f)){if(l instanceof Object){if(f.tagName=="SELECT"){if(f.selectedIndex!=-1&&gx.fn.invalidEmptyValue(l)){l.s=f.options[f.selectedIndex].value}var a=gx.dom.id(f);
gx.fn.loadComboBox(a,l.v);gx.fn.setComboBoxValue(a,l.s)}else{if(!gx.lang.emptyObject(l.s)){if(n.type=="int"){l.s=gx.text.trim(l.s)}else{l.s=gx.text.rtrim(l.s)}}}var c=gx.fn.selectedDescription(l);if(gx.lang.emptyObject(l.s)&&!gx.lang.emptyObject(f.value)){l=f.value}else{if(f.tagName=="SPAN"&&!gx.lang.emptyObject(l.s)&&!gx.lang.emptyObject(c)){l=c}else{l=l.s}}gx.fn.setControlValue_span_safe(this.cmpCtx+n.fld,l,0)}}if(n.v2v){n.v2v(l);n.v2c()}}else{n=gx.fn.vStructForHC(o);if(n!=null){var b="";if(n.grid!=0){b="_"+gx.fn.currentGridRow(n.grid)}gx.fn.setHidden(this.cmpCtx+"GXHC"+n.fld+b,l)}var e=gx.fn.gridObjFromGxO(o);if(e!=undefined){gx.newRows[e.gridId]=[];d=true;e.loadGrid(l)}else{if(!gx.fn.saveLvlOldParm(o,l)){continue}gx.setVar(o,l);gx.fn.setGridHidden(o,l)}}}}var m={};m.MAIN=gx.json.evalJSON(p[h]);gx.fn.setErrorViewer(m);gx.O.refreshOlds();gx.fn.enableDisableDelete();if(d){gx.dom.indexElements()}},_deinit:function(){this.lastRow=[];this.lastControl=null;this.lastActiveControl=null;this.userFocus=null;this.focusControl=null;this.invalidControl=null;this.invalidForcedCtrl=null;this.validActivatedControl=null;this.validatingUC=null;this.validatingGrid=null;this.lastEvtResponse=null;this.lastEvtRow=null}},json:{_nonSerializables:[],setNonSerializable:function(a){if(!this.isNonSerializable(a)){this._nonSerializables.push(a)}},isNonSerializable:function(b){var a=this._nonSerializables.length;for(var c=0;c<a;c++){if(this._nonSerializables[c]==b){return true}}return false},evalJSON:function(value){try{return eval("("+value+")")}catch(e){gx.dbg.logEx(e,"gxapi.js","evalJSON")}return value},serializeJson:function(e,f){var d=this.objToJson(e);if(d===null){d=this.arrayToJson(e)}else{return d}if(d===null){if(typeof(e)=="function"){return null}var b=[];for(var g in e){if(!f&&this.isNonSerializable(g)){continue}var a=this.objToJson(g,true);if(a===null){continue}var c=this.serializeJson(e[g]);if(typeof(c)!="string"){continue}b.push(a+":"+c)}return"{"+b.join(",")+"}"}else{return d}},objToJson:function(c,d){var b=typeof(c);if(d){if(!gx.lang.emptyObject(c)){if(b=="string"){return gx.text.escapeString(c)}else{if(b=="number"){return'"'+c+'"'}}}}else{if(b=="undefined"){return b}else{if(b=="string"){return gx.text.escapeString(c)}else{if((b=="number")||(b=="boolean")){return c.toString()}else{if(c===null){return"null"}else{if(typeof(c.json)=="function"){var a=c.json();if(c!==a){return this.serializeJson(a)}}}}}}}return null},arrayToJson:function(b){if(typeof(b)!="function"&&typeof(b.length)=="number"){var d=[];var a=b.length;for(var c=0;c<a;c++){var e=this.serializeJson(b[c]);if(typeof(e)!="string"){e="undefined"}d.push(e)}return"["+d.join(",")+"]"}return null},objFromJson:function(c,b){var a=this.evalJSON(b);for(var d in c){if(typeof(c[d])!="function"){delete c[d]}}for(var d in a){c[d]=a[d]}}},dbg:{lastTime:0,enabled:false,dbgWin:null,logMsg:function(a){if(this.enabled||window.console){this.write(a)}},logEx:function(b,a,c){if(this.enabled||window.console){var f="";if(b&&b instanceof Error){f="["+b.name+": "+this.exTxt(b);
f+=(a?", file: "+a:"");f+=(c?", func: "+c:"")+"]";if(b.fileName){f+=" FileName:"+b.fileName}if(b.lineNumber){f+=" ln:"+b.lineNumber}}else{try{f=String(b)}catch(d){f="[Unknown Error]"}}this.write(f,true)}},exTxt:function(a){if(!a){return"Unknown Error"}if(a.message){return a.message}else{if(a.description){return a.description}else{return a.toString()}}},write:function(a,b){if(this.enabled){try{if(this.dbgWin==null){this.dbgWin=window.open("","debug","scrollbars=1,height=900,width=900")}this.dbgWin.document.write(a+"<BR>")}catch(c){}}if(window.console){if(b){console.error(a)}else{console.log(a)}}},writeT:function(a){var c=new Date();var d=c.getTime();var b=this.lastTime;if(this.lastTime>0){b=(d-this.lastTime)/1000}this.lastTime=d;a=c.toString()+" (+"+b+"seg): "+a;this.write(a)}},http:{STATE_UNSENT:0,STATE_DONE:4,STATUS_OK:200,STATUS_SESSION_TO:440,iframeName:"gxPostIFrame",viewState:null,oldState:null,useBase64State:false,useStateSignature:false,lastStatus:0,lastResponse:"",modes:{none:0,full:1,call:2,retval:3},loadState:function(){var a=gx.dom.el("GXState");if(a){var c=a.value;var b=c;if(this.useBase64State){b=gx.base64.decode(c)}this.viewState=gx.json.evalJSON(b)}},saveState:function(d){if(!this.viewState){return}var c=gx.json.serializeJson(this.viewState,d);var b="GXState";var e=c;if(this.useBase64State){e=gx.base64.encode(c)}var a=gx.dom.el(b);if(a==null){gx.dom.createInput(b,"hidden")}else{this.oldState=a.value}gx.fn.setControlValue_impl(b,e);if(this.useStateSignature){gx.http.setStateHsh(e);gx.http.setHsh()}},setStateHsh:function(d){var c="GXHSH12";var b=gx.dom.el(c);if(b==null){gx.dom.createInput(c,"hidden")}var a=gx.MD5.getHsh(d);gx.fn.setControlValue_impl(c,a)},setHsh:function(){var a=gx.pO.WebComponents.length;var b=false;for(var c=0;c<a;c++){gx.http.setObjectHsh(gx.pO.WebComponents[c])}gx.http.setObjectHsh(gx.pO)},setObjectHsh:function(b){var e=b.getControlIdsh();if(e==null){return}var c="";if(b.IsComponent&&b.CmpContext!=null){c=b.CmpContext}var d="";for(var a=0;a<e.length;a++){validStruct=b.getValidStruct(e[a]);if(validStruct&&typeof(validStruct.val)=="function"){d=d+gx.fn.getControlValue_impl(c+validStruct.fld)}}gx.http.createHsh(c+"GXHSH11",d)},createHsh:function(d,a){var c=gx.dom.el(d);if(c==null){gx.dom.createInput(d,"hidden")}var b=gx.MD5.getHsh(a);gx.fn.setControlValue_impl(d,b)},refreshState:function(){if(this.oldState!=null){var a=gx.dom.el("GXState");a.value=this.oldState;this.oldState=null}},notification:{_node:null,_moveInterval:null,_closeLink:null,node:function(){if(!this._node){this._node=gx.dom.byId("gx_ajax_notification");if(!this._node){var b=gx.util.resourceUrl(gx.basePath+gx.staticDirectory+"indicator.gif",true);var a='<div id="gx_ajax_notification" style="display:none;position:absolute;text-align:center;vertical-align:top;top:0px;left:0px;">';a+='<div style="background-color:#BEBEBE;filter:alpha(opacity=50);opacity:0.5;position:absolute;top:0px;left:0px;width:100%;height:100%;">';if(gx.grid.drawAtServer){a+='<div onclick="gx.ajax.enableForm()" style="display:none;cursor:hand;font-size:9;position:absolute;top:0px;left:0px;"><u>Enable Form</u></div>'
}a+="</div>";a+='<img id="gx_ajax_indicator" src="'+b+'" width="16px" height="16px" align="absmiddle"/></div>';this._node=gx.html.nodesFromText(a)[0];document.body.appendChild(this._node);gx.popup.setZIndex(this._node);if(gx.grid.drawAtServer){this._closeLink=this._node.firstChild.firstChild}}}return this._node},show:function(){var a=gx.http.notification.node();a.style.width=gx.html.viewportWidth()+"px";a.style.height=gx.html.viewportHeight()+"px";a.style.display="block";gx.http.notification._moveInterval=setInterval(gx.http.notification.move,50);gx.evt.attach(window,"resize",gx.http.notification.resize);if(gx.grid.drawAtServer){setTimeout(gx.http.notification.showCloseLink,5000)}},hide:function(){gx.http.notification.node().style.display="none";clearInterval(gx.http.notification._moveInterval);gx.http.notification._moveInterval=null;gx.evt.detach(window,"resize",gx.http.notification.resize);if(gx.grid.drawAtServer){gx.http.notification.hideCloseLink()}},move:function(){var a=gx.http.notification.node();var d=parseInt(a.style.top);var c=document.body.scrollTop;var b=((c-d-10)/3+3)+d;a.style.top=b+"px"},resize:function(){var a=gx.http.notification.node();a.style.width=gx.html.viewportWidth()+"px";a.style.height=gx.html.viewportHeight()+"px"},showCloseLink:function(){if(gx.http.notification._closeLink){gx.http.notification._closeLink.style.display="block"}},hideCloseLink:function(){if(gx.http.notification._closeLink){gx.http.notification._closeLink.style.display="none"}},cleanup:function(){if(this._node){gx.dom.removeControlSafe(this._node)}this._node=null;this._closeLink=null;this._moveInterval=null}},getCookie:function(c){c=c+"=";var e=document.cookie.split(";");var b=e.length;for(var d=0;d<b;d++){var a=e[d];while(a.charAt(0)==" "){a=a.substring(1,a.length)}if(a.indexOf(c)==0){return a.substring(c.length,a.length)}}return null},isSessionTimeoutError:function(b,a){if(!gx.gen.isDotNet()&&(a&&b)&&gx.pO.AjaxSecurity==gx.ajax.securityLevels.high){if(b.readyState==this.STATE_DONE){if(a.name=="NS_ERROR_FAILURE"&&a.result==2147500037){return true}else{if(a.name=="Error"&&a.number==-2146697209){return true}else{if(a.name=="NETWORK_ERR"&&a.code==101){return true}}}}}return false},reloadOnTimeout:function(){if((gx.pO.AjaxSecurity==gx.ajax.securityLevels.high)&&confirm(gx.getMessage("GXM_sessionexpired"))){gx.http.reload();return}else{gx.ajax.enableForm()}},reload:function(){this.redirect(location.href)},redirect:function(a){var d=gx.popup.getPopup();if(d!=null){var b=d.window.gx.popup.lvl;if(b!=-1){var c=(a.indexOf("?")!=-1)?",":"?";c+=encodeURIComponent("gxPopupLevel="+b+";");a+=c}}if(!gx.ajax.isabsoluteurl(a)){a=gx.ajax.absoluteurl(a)}location.href=a},getRequest:function(){var a=null;try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}if(a==null&&typeof(XMLHttpRequest)!="undefined"){a=new XMLHttpRequest()}return a},getPostData:function(f){var e=f.formNode;var b=[];var a=e.elements.length;for(var c=0;c<a;
c++){var d=gx.http.elementPostData(e.elements[c]);if(d!=null){b.push(d)}}return b.join("&")+"&"},elementPostData:function(c){if(gx.json.isNonSerializable(c.name)){return null}if(c.tagName=="FIELDSET"){return null}var d="";if(c.type=="select-multiple"){var a=c.options.length;for(var b=0;b<a;b++){if(c.options[b].selected){d=c.options[b].value}}}else{if(c.type=="radio"||c.type=="checkbox"){if(c.checked){d=c.value}else{if(c.type=="radio"){return null}}}else{d=c.value}}return encodeURIComponent(c.name)+"="+encodeURIComponent(d)},doHandleRequest:function(a,b){if(a.readyState==this.STATE_DONE){gx.evt.setProcessing(false,!gx.csv.validating);gx.evt.userReady=false;if(a.status==this.STATUS_OK){this.doCallHandler(a,b)}else{if(a.status==this.STATUS_SESSION_TO){gx.http.reloadOnTimeout()}else{document.write(a.responseText)}}gx.evt.userReady=true}},onRequestError:function(a,b){gx.evt.setProcessing(false,!gx.csv.validating);if(a.readyState==this.STATE_DONE){if(a.status==this.STATUS_SESSION_TO||this.isBadResponse(a)){gx.http.reloadOnTimeout()}}else{if(this.isBadResponse(a)){gx.http.reloadOnTimeout()}}},isBadResponse:function(a){if(a.status==this.STATE_UNSENT&&gx.lang.emptyObject(a.responseText)&&gx.util.browser.isChrome()){return true}return false},doCall:function(g){if(!g.handler&&typeof(g.load)=="function"){g.handler=g.load}if(typeof(g.sync)!="boolean"){g.sync=false}if(!g.method){g.method="POST"}if(g.multipart&&g.method=="POST"){this.doMultipartPost(g)}else{var d=this.getRequest();if(d!=null){if((typeof(g.handler)=="function")&&!g.sync){var c=function(){gx.http.doHandleRequest(d,g)};var b=function(){gx.http.onRequestError(d,g)};if(gx.util.browser.isIE()){d.onreadystatechange=c}else{d.onload=c;d.onerror=b}}var a=null;if(g.method=="POST"){a=gx.http.getPostData(g)}d.open(g.method,this.uncache(g.url),!g.sync);d.setRequestHeader(gx.ajax.reqHeader,"1");if(g.method=="POST"){d.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}if(gx.sec.secToken&&gx.pO.AjaxSecurity==gx.ajax.securityLevels.medium){d.setRequestHeader(gx.sec.secTokenName,gx.sec.secToken)}try{d.send(a)}catch(f){gx.dbg.logEx(f,"gxapi.js","doCall")}if((typeof(g.handler)=="function")&&g.sync){gx.http.doHandleRequest(d,g)}}}},doCallHandler:function(a,b){if(b.obj){b.handler.call(b.obj,null,a.responseText,a)}else{b.handler(null,a.responseText,a)}},doMultipartPost:function(c){var a=this.getPostIFrame();a.gxPostInfo=c;var b=c.formNode;c.oldAction=b.getAttribute("action");b.setAttribute("action",c.url);c.oldTarget=b.getAttribute("target");b.setAttribute("target",this.iframeName);b.submit()},getPostIFrame:function(){var b=this.iframeName;var a=window[b];if(a){return a}else{a=window.frames[b];if(a){return a}}a=gx.html.nodesFromText("<iframe name='"+b+"' src='"+gx.util.resourceUrl(gx.basePath+gx.staticDirectory+"gx_iframe.html",true)+"'>")[0];document.body.appendChild(a);window[b]=a;a.name=b;a.setAttribute("name",b);a.id=b;a.style.position="absolute";a.style.left="0px";a.style.top="0px";a.style.height="1px";
a.style.width="1px";a.style.visibility="hidden";var c=new Function("gx.http.iframeOnload();");if(!gx.util.browser.isIE()){a.onload=c}else{a.onreadystatechange=function(){if(a.readyState=="complete"){c()}}}return a},iframeOnload:function(){gx.evt.setProcessing(false,!gx.csv.validating);var a=window[this.iframeName];if(!a){a=window.frames[this.iframeName]}if(a){var e=a.gxPostInfo;var d=e.formNode;d.setAttribute("action",e.oldAction);d.setAttribute("target",e.oldTarget);var c=a.contentDocument?a.contentDocument:a.contentWindow.document;if(c){var b=gx.base64.decode(this.multipartResponse(c.body));e.handler(null,b,e)}}},multipartResponse:function(b){try{var c=b.childNodes[0];while(c.nodeName!="#text"){c=c.childNodes[0]}var a=c.nodeValue;if(!gx.util.browser.isIE()){c=c.nextSibling;while(c){a+=c.nodeValue;c=c.nextSibling}}return a}catch(d){gx.dbg.logEx(d,"gxapi.js","multipartResponse");return""}},uncache:function(c){var b=new Date();var d=b.getTime();var a=c.indexOf("?");return c+(a>0?(a<c.length-1?",":""):"?")+"gx-no-cache="+d},callBackend:function(r,k,q,b,n,o,c,p,h,a){var d=this.getRequest();if(d){try{if(!o){gx.ajax.disableForm()}var g=(typeof(c)!="undefined")?c:"GET";var m=(typeof(p)!="undefined")?p:null;var l=(typeof(a)!="undefined")?a:false;if(!h){k=this.uncache(k)}d.open(g,k,l);d.setRequestHeader(gx.ajax.reqHeader,"2");if(g=="POST"){d.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}else{if(gx.sec.secToken&&gx.O.AjaxSecurity==gx.ajax.securityLevels.medium){d.setRequestHeader(gx.sec.secTokenName,gx.sec.secToken)}}d.send(m);if(!o){gx.ajax.enableForm()}}catch(f){if(g!="POST"&&gx.http.isSessionTimeoutError(d,f)){gx.http.reloadOnTimeout()}else{gx.ajax.enableForm();window.status="GXAjax HTTP error: "+f.message}return null}window.status="";if((d.readyState!=this.STATE_DONE)||(d.status!=this.STATUS_OK)){if(d.status==this.STATUS_SESSION_TO){gx.http.reloadOnTimeout()}else{window.status="GXAjax HTTP error: ("+d.status+") - "+d.statusText;gx.dbg.logEx(d.responseText)}}else{this.lastResponse=d.responseText;if(n!=this.modes.none){if(this.lastResponse&&this.lastResponse.length>0&&this.lastResponse.charAt(0)!="<"){this.lastStatus=0;try{if(n==this.modes.full){this.handleFull(this.lastResponse,r,q)}else{if(n==this.modes.call){return this.handleCall(this.lastResponse,r,q)}}return this.handleRetVal(this.lastResponse,r,q,b)}catch(f){gx.dbg.logEx(f,"gxapi.js","callBackend")}}else{window.status="GXAjax HTTP error: (bad response format)"}}}}},handleFull:function(a,b,d){var c={};c.status=200;c.responseText="";gx.http.postHandler(null,a,c)},handleCall:function(ResponseText,backcall,sufix){if(backcall){return eval(backcall+ResponseText+sufix)}},handleRetVal:function(ResponseText,backcall,sufix,ExecAtFail){var Response=gx.json.evalJSON(ResponseText);var result=Response[0];this.lastStatus=Response[1];if(this.lastStatus==undefined){this.lastStatus=0}if(backcall&&(ExecAtFail||this.lastStatus==null||this.lastStatus==0)){return eval(backcall+gx.lang.arrayToSource(result)+sufix)
}},postHandler:function(b,d,c){try{gx.evt.enter=false;gx.csv.lastEvtResponse=null;if(c.status<200||c.status>299){document.write(c.responseText)}else{var a=gx.json.evalJSON(d);if(a==null){document.write(d.toString())}else{gx.http.refreshState();gx.csv.lastEvtResponse=a;gx.fn.forceEnableControls(true);gx.ajax.setPostResponse(a);gx.fx.obs.notify("gx.onafterevent",[a])}}}catch(f){gx.dbg.logEx(f,"gxapi.js","postHandler")}},formatLink:function(b,d){b=gx.ajax.objectUrl(b);if(d&&d.length>0){b+="?";var a=d.length;for(var c=0;c<a;c++){if(c>0){b+=","}b+=encodeURIComponent(d[c])}}return b},loadScripts:function(a,c,b){if(typeof(b)=="undefined"){b=0}if(b>=a.length){c()}else{gx.http.loadScript(a[b],function(){gx.http.loadScripts(a,c,b+1)})}},loadScript:function(b,d){var c=gx.dom.byTag("head")[0];var a=document.createElement("script");a.type="text/javascript";a.src=b;if(typeof(d)=="function"){a.onreadystatechange=function(){if(a.readyState=="loaded"||a.readyState=="complete"){d()}};a.onload=d}c.appendChild(a)},loadStyle:function(a,d){var b=gx.dom.byTag("head")[0];var c=document.createElement("link");c.rel="stylesheet";c.type="text/css";c.href=a;if(typeof(d)=="function"){c.onload=d}b.appendChild(c)},loadStyles:function(){var d=gx.fn.getHidden("GX_STYLE_FILES");if(!gx.lang.emptyObject(d)){for(var b=0;b<d.length;b++){var c=d[b];var a=new gx.util.Url(c);if(a.isRelative()){c=gx.util.resourceUrl(gx.basePath+gx.staticDirectory+c,false)}if(!gx.cache.fileLoaded(c)){gx.cache.addRemoteFile(c);this.loadStyle(c)}}}},doCommands:function(){var a=gx.fn.getHidden("GX_SRV_COMMANDS");if(!gx.lang.emptyObject(a)){gx.ajax.dispatchCommands(a)}}},html:{encodeCaseFormat:function(b,c,a){if((c==gx.html.controls.formats.TEXT)){b=gx.html.encode(b,false,a)}else{if((c==gx.html.controls.formats.TEXT_W_SPACES)){b=gx.html.encode(b,true,a)}}return b},encode:function(b,c,e){var a=["<",">","&"];var d=["&lt;","&gt;","&amp;"];if(c){a.push(" ");d.push("&nbsp;")}if(e){a.push("\n");d.push("<br/>")}return gx.text.charReplace(b,a,d)},getHidden:function(b,a){return'<input type="hidden" id="'+b+'" name="'+b+'" value="'+a+'">'},viewportWidth:function(){var a=document.documentElement;if(a&&a.clientHeight){return Math.max(a.clientWidth,document.body.clientWidth)}else{return document.body.clientWidth}},viewportHeight:function(){var a=document.documentElement;if(a&&a.clientHeight){return Math.max(a.clientHeight,document.body.clientHeight)-5}else{return document.body.clientHeight-5}},cleanHtmlRefs:function(a){a=a.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,"");a=a.replace(/<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>/gi,"");a=a.replace(/<script([^>]*)>([\s\S]*?)<\/script>/gi,"");return a},setOuterHtml:function(b,a){b.outerHTML=a},setInnerHtml:function(d,a,c){var b=gx.dom.styles();d.innerHTML=this.cleanHtmlRefs(a);if(gx.util.browser.isIE()){gx.cache.updateStyles(b,gx.dom.styles())}if(c==true){this.processCode(a,false)}},setInnerText:function(b,c,a){if(b.nodeValue!=null){b.nodeValue=c}else{if(b.innerText!=null&&!gx.util.browser.isChrome()){b.innerText=c
}else{if(b.tagName=="TEXT"&&b.innerHTML!=null){b.innerHTML=c}else{if(gx.util.browser.isFirefox()){b.innerHTML=gx.html.encodeCaseFormat(c,a)}else{if(gx.util.browser.isChrome()){b.innerHTML="<text>"+gx.html.encodeCaseFormat(c,a)+"</text>"}else{b.innerHTML="<text>"+c+"</text>"}}}}}},nodesFromText:function(e){var d=document.createElement("div");d.style.visibility="hidden";d.style.display="none";document.body.appendChild(d);d.innerHTML=e;var b=[];var a=d.childNodes.length;for(var c=0;c<a;c++){b.push(d.childNodes[c].cloneNode(true))}gx.dom.removeControlSafe(d);return b},onTypeAvailable:function(cName,callback,callbackParms){try{var typeObj=eval(cName);if(callbackParms instanceof Array){callback.apply(this,callbackParms)}else{callback()}}catch(e){setTimeout(function(){gx.html.onTypeAvailable(cName,callback,callbackParms)},250)}},processCode:function(o,A,e,q,g){var d=o;var k=[];var b=false;var c=[];var f=[];var m=[];if(o==""){return}var h=[];while(h){h=o.match(/<style[^>]*>([\s\S]*?)<\/style>/i);if(!h){break}else{var C=h.lastIndex;if(!C){C=h.index+h[0].length}o=o.substring(C)}m.push(h[1])}o=d;h=[];while(h){h=o.match(/<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>/i);if(!h){break}else{var C=h.lastIndex;if(!C){C=h.index+h[0].length}o=o.substring(C)}w=h[1].match(/href=(['"]?)([^'">]*)\1/i);if(w&&!gx.cache.fileLoaded(w[2])){f.push(w[2]);gx.cache.addRemoteFile(w[2])}}o=d;h=[];while(h){h=o.match(/<script([^>]*)>([\s\S]*?)<\/script>/i);if(!h){break}else{var C=h.lastIndex;if(!C){C=h.index+h[0].length}o=o.substring(C)}if((h[1]!=undefined)&&(h[1]!="")){var w=h[1].match(/src=(['"]?)([\s\S]*)\?([^"']*)\1/i);if(w==null){w=h[1].match(/src=(['"]?)([^"']*)\1/i)}if(w&&!gx.cache.fileLoaded(w[2])){var a=w[2];if(!gx.lang.emptyObject(w[3])){a+="?"+w[3]}k.push(a);gx.cache.addRemoteFile(w[2])}else{if(w&&gx.cache.fileLoaded(w[2])){b=true}else{if(!w&&h[2]){c.push(h[2])}}}}else{if(h[2]){c.push(h[2])}}}if(A==true){return}var D="";E=c.length;for(var B=0;B<E;B++){D+=c[B]}if(D!=""){gx.lang.doEval(D)}var p=[];if(typeof(e)=="function"){gx.http.loadScripts(k,function(){if(q instanceof Array){e.apply(this,q)}else{e()}})}else{var r=this;var l={};l.method="GET";l.useCash=true;l.load=function(H,G){gx.lang.supEval(r,p.push(G))};l.mimetype="text/plain";l.sync=true;var y=k.length;for(var B=0;B<y;B++){l.url=k[B];gx.http.doCall(l)}}D="";var E=p.length;for(var B=0;B<E;B++){D+=p[B]}if(D!=""){gx.lang.doEval(D)}var s=document.getElementsByTagName("style");E=f.length;for(var B=0;B<E;B++){var v=false;var F=s.length;for(var z=0;z<F;z++){var x=(s[B].styleSheet&&s[B].styleSheet.cssText)?s[B].styleSheet.cssText:s[B].innerHTML;if(f[B]==x){v=true}}if(!v){gx.http.loadStyle(f[B],function(){})}}var D="";E=m.length;for(var B=0;B<E;B++){D+=m[B]}if(D!=""){var u=document.createElement("style");u.setAttribute("type","text/css");var n=document.getElementsByTagName("head")[0];n.appendChild(u);if(u.styleSheet){u.styleSheet.cssText=D}else{var t=document.createTextNode(D);u.appendChild(t)}}if((y==0)&&(typeof(e)=="function")){if(b&&g){gx.html.onTypeAvailable(g,e,q)
}else{if(q instanceof Array){e.apply(this,q)}else{e()}}}},controls:{types:{singleLineEdit:1,multipleLineEdit:2,blob:3,radio:4,comboBox:5,listBox:6,checkBox:7,image:8,textBlock:9,button:10,grid:11,userControl:12,userControlContainer:13,webComponent:14,embeddedPage:15,table:16,row:17,cell:18,group:19},formats:{TEXT:0,HTML:1,RAW_HTML:2,TEXT_W_SPACES:3},isMultiSelection:function(a){if(a=="combo"||a=="dyncombo"||a=="listbx"||a=="dynlistbx"){return true}return false},eventJSCode:function(d,a,c,f,b){var g="";if(d==4&&c){g=c}else{if(d==1){g="gx.fn.closeWindow();"}else{if(d==7){var e="";if(f&&b){e=",'"+f.gridName+"','"+b.gxId+"'"}g="gx.evt.execCliEvt("+a+e+",this);"}else{if(d==6||d==5){g="gx.evt.execEvt('"+a+"',this);"}}}}return g},startAnchor:function(b,e,d,a,c){if(d!=""){if(e!=""){b.append('<a href="javascript:if( '+d+") {"+e+'}">')}else{b.append('<a href="javascript:'+d+'">')}}else{if(e!=""){b.append('<a href="javascript:'+e+'">')}else{if(a!=""){b.append('<a href="'+a+'"');if(c!=""){b.append(' target="'+c+'"')}b.append(">")}}}},endAnchor:function(b,d,c,a){if(d!=""||c!=""||a!=""){b.append("</a>")}},onJSEvent:function(a,c,d,b){a.append(" ");if(b!=""){a.append('jsevent="'+b+'" ')}a.append(c+'="if( ');if(d!=""){a.append("gx.evt.jsEvent(this)) {"+d+'} else return false;"')}else{a.append('!gx.evt.jsEvent(this)) return false;"')}},htmlControl:function(e,c,a,b,d){this.id=e||"";this.width=c||0;this.widthUnit="px";this.height=a||0;this.heightUnit="px";this.cssClass=b||"";this.roClass="";this.ownCssClass="";this.style="";this.title=d||"";this.value="";this.type=-1;this.dataType="";this.visible=true;this.enabled=true;this.rtEnabled=false;this.link="";this.linkTarget="";this.jsEvent="";this.hasJsLink=false;this.extraAttributes="";this.grid=null;this.row=null;this.column=null;this.gridId="";this.gridRow="";this.buffer=new gx.text.stringBuffer();this.getHtml=function(){this.buffer.clear();this._getHtml();return this.buffer.toString()};this.append=function(f){return this.buffer.append(f)};this.tagAtt=function(f,g){return this.buffer.append(" "+f+'="'+g.toString().replace(/\"/g,"&quot;")+'"')};this.persistValue=function(){if(!gx.lang.emptyObject(this.column.gxId)&&!gx.lang.emptyObject(this.grid.parentObject.GXValidFnc[this.column.gxId])){if(this._persistValue){this._persistValue()}else{var f=this.grid.parentObject.GXValidFnc[this.column.gxId];if(f.v2v){f.v2v(this.value)}}}}},singleLineEdit:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.singleLineEdit;this.maxLength="";this.isPassword=false;this.setProperties=function(l,v,r,A,I,f,w,n,s,G,q,m,u,x,t,F,y,p,E,D,z,H,o,h,C,B,k,g){this.id=l;this.title=v;this.width=r;this.widthUnit=A;this.height=I;this.heightUnit=f;this.maxLength=w;this.visible=(n!=0);this.enabled=(s!=0);this.rtEnabled=(G!=0);this.isPassword=(q!=0);this.format=m;this.link=u;this.linkTarget=x;this.style=t;this.cssClass=F;this.roClass=y;this.formattedValue=gx.html.encodeCaseFormat(p,m);this.extraAttributes=E;this.jsScrCode=D;this.usrOnclick=z;
this.eventName=H;this.parentId=o;this.hasTheme=h;this.autoComplete=(C!=0);this.value=g};this._getHtml=function(){var o="";var m="";if(this.width>0){if(this.widthUnit=="chr"){o=' size="'+this.width+'"'}else{this.style=this.style+";width: "+this.width+this.widthUnit+";"}}if(this.height>0&&this.heightUnit!="row"){this.style=this.style+";height: "+this.height+this.heightUnit+";"}m=this.style;this.style=this.style+(!this.visible?";display:none;":"");if(this.rtEnabled||this.enabled){if((this.dataType==gx.types.date)||(this.dataType==gx.types.dateTime)){this.append("<div");this.tagAtt("id",this.id+"_dp_container");this.tagAtt("class","dp_container");if(this.style!=""){this.tagAtt("style","white-space:nowrap;display:inline"+this.style+";width:auto;")}this.append(">")}this.append("<input");if(this.isPassword==true){this.tagAtt("type","password")}else{this.tagAtt("type","text")}this.tagAtt("id",this.id);this.tagAtt("name",this.id);if(this.formattedValue){this.tagAtt("value",(this.dataType==gx.types.numeric)?gx.text.ltrim(this.formattedValue):this.formattedValue)}else{this.tagAtt("value",this.value)}this.append(o);if(this.title!=""){this.tagAtt("title",this.title)}if(!this.autoComplete){this.tagAtt("autocomplete","off")}this.tagAtt("maxlength",this.maxLength);if(this.cssClass!=""){this.tagAtt("class",this.cssClass)}var h=this.style;if(this.column.align!=""){h+=";text-align:"+this.column.align}var g=(!this.enabled&&this.rtEnabled)?";display:none;":"";h+=g;if(h!=""){this.tagAtt("style",h)}this.append(this.extraAttributes);this.append(">");if((this.dataType==gx.types.date)||(this.dataType==gx.types.dateTime)){this.append("<img");this.tagAtt("src",gx.util.resourceUrl(gx.basePath+gx.staticDirectory+"calendar-img.gif",true));this.tagAtt("id",this.id+"_dp_trigger");this.tagAtt("style","cursor: pointer"+g);this.tagAtt("title","Date selector");this.append("></div>");this.grid.addDatepickerToSetup({CtrlId:this.id,Grid:this.gridId,Row:this.gridRow})}}if(!this.enabled){var k="";if(!this.rtEnabled){this.grid.addHiddenControl(this.id,this.value)}if(!this.hasTheme){k=this.cssClass}else{if(this.parentId==0){if(this.cssClass!=""&&this.cssClass.indexOf("Readonly")!=0){k="Readonly"+this.cssClass}else{k=this.cssClass}}else{if(this.roClass!=""&&this.roClass.indexOf("Readonly")!=0){k="Readonly"+this.roClass}else{k=this.roClass}}}var n="";if(this.format!=gx.html.controls.formats.RAW_HTML){m=m+((!this.visible)?";display:none;":"");this.append("<span");this.append(this.extraAttributes);if(k!=""){this.tagAtt("class",k)}if(m!=""){this.tagAtt("style",m)}if(this.title!=""){this.tagAtt("title",this.title)}this.tagAtt("id","span_"+this.id);this.append(">");n=gx.html.controls.eventJSCode(this.jsScrCode,this.eventName,null,this.grid,this.row);gx.html.controls.startAnchor(this,n,this.usrOnclick,this.link,this.linkTarget)}if(!this.isPassword){this.append(this.formattedValue)}else{var f=gx.lang.emptyObject(this.maxLength)?3:parseInt(this.maxLength);for(var l=0;l<f;l++){this.append("*")}}if(this.format!=gx.html.controls.formats.RAW_HTML){gx.html.controls.endAnchor(this,n,this.usrOnclick,this.link);
this.append("</span>")}if(this.format==gx.html.controls.formats.RAW_HTML){gx.html.processCode(this.buffer.toString(),false)}}}},multipleLineEdit:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.multipleLineEdit;this.setProperties=function(h,m,o,x,n,t,y,f,p,w,r,v,l,k,q,s,u,g){this.id=h;this.visible=(m!=0);this.enabled=(o!=0);this.rtEnabled=(x!=0);this.width=n;this.widthUnit=t;this.height=y;this.heightUnit=f;this.style=p;this.cssClass=w;this.maxLength=r;this.extraAttributes=v;this.autoresize=(l!=0);this.format=k;this.link=q;this.linkTarget=s;this.value=g};this._getHtml=function(){this.style=this.style+((!this.visible||(!this.enabled&&this.rtEnabled))?";display:none;":"");if(this.rtEnabled||this.enabled){this.append("<textarea");if(this.widthUnit=="chr"){this.tagAtt("cols",this.width)}else{this.style=this.style+";width: "+this.width+this.widthUnit}if(this.heightUnit=="row"){this.tagAtt("rows",this.height)}else{this.style=this.style+";height: "+this.height+this.heightUnit}this.tagAtt("id",this.id);this.tagAtt("name",this.id);this.tagAtt("maxlength",this.maxLength);if(this.cssClass!=""){this.tagAtt("class",this.cssClass)}if(this.style!=""){this.tagAtt("style",this.style)}if(this.title!=""){this.tagAtt("title",this.title)}this.append(this.extraAttributes);this.append(">");this.append(this.value);this.append("</textarea>")}if(!this.enabled){var f=(!this.visible?"display:none;":"");if(!this.autoresize){f+='overflow="hidden";'}if(!this.rtEnabled){this.grid.addHiddenControl(this.id,this.value)}if(this.cssClass!=""&&this.cssClass.indexOf("Readonly")!=0){this.cssClass="Readonly"+this.cssClass}this.append("<span ");this.append(this.extraAttributes);if(this.cssClass!=""){this.tagAtt("class",this.cssClass)}if(f!=""){this.tagAtt("style",f)}if(this.title!=""){this.tagAtt("title",this.title)}this.tagAtt("id","span_"+this.id);this.append(">");gx.html.controls.startAnchor(this,"","",this.link,this.linkTarget);this.append(gx.html.encodeCaseFormat(this.value,this.format,true));gx.html.controls.endAnchor(this,"","",this.link);this.append("</span>")}}},blob:function(g,d,b,c,e,a,f){this.base(g,d,b,c,e);this.type=gx.html.controls.types.blob;this.display=a||0;this.contentType=f||"text/html";this.url="";this.parameters="";this.setProperties=function(q,l,I,o,x,p,G,t,n,A,w,h,m,s,z,J,k,B,v,D,y,H,r,F,E,C,u){this.id=q;this.value=l;this.contentType=I||"text/html";this.linkTarget=x;this.parameters=p;this.display=G;this.visible=(n!=0);this.enabled=(t!=0);this.alt=A;this.title=w;this.borderWidth=h;this.autoresize=(m!=0);this.width=s;this.widthUnit=z;this.height=J;this.heightUnit=k;this.vSpace=B;this.hSpace=v;this.jsScrCode=D;this.usrOnclick=y;this.eventName=H;this.style=r;this.cssClass=F;this.extraAttributes=E;this.jsDynCode=C;this.url=u};this._getHtml=function(){var k="";this.style=this.style+((this.visible)?"":";display:none;");this.append("<span ");if(this.vSpace!=0){this.tagAtt("vspace",this.vSpace)}if(this.hSpace!=0){this.tagAtt("hspace",this.hSpace)}if(this.alt!=""){this.tagAtt("alt",this.alt)
}if(this.title!=""){this.tagAtt("title",this.title)}this.append(">");this.append("<table");this.tagAtt("border",0);this.tagAtt("cellpadding",0);this.tagAtt("cellspacing",0);this.append("><tr><td>");if(this.display==0){var l=(this.contentType.toLowerCase().indexOf("image/")!=-1);if(l){this.append("<img");if(this.url==""){this.url=gx.util.resourceUrl(gx.basePath+gx.staticDirectory+"blank.jpg",true)}this.tagAtt("src",this.url)}else{this.append("<object");this.tagAtt("type",this.contentType);if(this.url==""){this.url="about:blank"}this.tagAtt("data",this.url)}this.tagAtt("id","Object_"+this.id);this.style=this.style+"display:block;";if(this.width!=0&&!this.autoresize){this.style=this.style+"width:"+this.width+this.widthUnit+";"}if(this.height!=0&&!this.autoresize){this.style=this.style+"height:"+this.height+this.heightUnit+";"}this.tagAtt("style",this.style);if(this.cssClass!=""){k="BlobContent"+this.cssClass}else{k=this.cssClass}if(!this.enabled&&this.cssClass!=""&&this.cssClass.indexOf("Readonly")!=0){k="Readonly"+k}this.tagAtt("class",k);this.append(this.extraAttributes);this.append(">");if(l){this.append("</img>")}else{this.append(this.parameters);this.append("</object>")}}else{if(this.display==1){this.append("<a");this.tagAtt("id","Link_"+this.id);if(this.url!=""){this.style=this.style+"display:block;"}else{this.style=this.style+"display:none;"}this.tagAtt("style",this.style);this.tagAtt("href",this.url);this.tagAtt("type",this.contentType);if(this.linkTarget!=""){this.tagAtt("target",this.linkTarget)}this.append("><img");this.tagAtt("border","0");this.tagAtt("src",gx.util.resourceUrl(gx.basePath+gx.staticDirectory+"download.gif"));this.append("></a>")}}this.append("</td></tr><tr><td>");if(this.enabled){var n="";if(!gx.lang.emptyObject(this.value)){gx.dom.form().encoding="multipart/form-data"}var m=gx.dom.el(this.id);if(this.grid&&this.grid.parentObject.isTransaction()&&m){var h=this.id+"_hook";this.append("<div");this.tagAtt("id",h);this.append(">");this.append("</div>");this.grid.addControlToReuse({el:m,hookId:h})}else{this.append("<input");this.tagAtt("type","file");this.tagAtt("id",this.id);this.tagAtt("name",this.id);if(!this.visible){n=n+"display:none;"}if(this.width!=0){n=n+"width:"+this.width+";"}this.tagAtt("style",n);this.tagAtt("value",this.value);if(this.cssClass!=""){k="BlobInput"+this.cssClass}else{k=this.cssClass}if(!this.enabled&&this.cssClass!=""&&this.cssClass.indexOf("Readonly")!=0){k="Readonly"+k}this.tagAtt("class",k);this.append(this.extraAttributes);this.append(">")}}this.append("</td></tr></table>");this.append("</span>")}},radio:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.radio;this.vertical=true;this.possibleValues=[];this.setProperties=function(p,r,t,g,o,m,q,h,f,k,n,s,l,u){this.possibleValues=p.v||[];this.id=r;this.title=t;this.visible=(g!=0);this.enabled=(o!=0);this.columns=m;this.orientation=q;this.style=h;this.cssClass=f;this.jsScrCode=k;this.usrOnclick=n;this.eventName=s;this.extraAttributes=l;
this.value=u};this._getHtml=function(){if(this.dataType==gx.types.numeric){this.value=gx.text.trim(this.value.toString())}var o="";if(!this.enabled&&this.cssClass!=""&&this.cssClass.indexOf("Readonly")!=0){o="Readonly"+this.cssClass}else{o=this.cssClass}var f=gx.html.controls.eventJSCode(this.jsScrCode,this.eventName,null,this.grid,this.row);this.style=this.style+((this.visible)?"":";display:none;");if(this.orientation==1){this.append("<table")}else{this.append("<span ")}this.tagAtt("class",o);if(this.style!=""){this.tagAtt("style",this.style)}this.append(">");var l=0;var n=this.possibleValues.length;for(var k=0;k<n;k++){var p=this.possibleValues[k];var h=p[0];var m=p[1];if(this.orientation==1){if(this.columns>1){l=(l+1)%this.columns}if(l==0){this.append("<tr>")}this.append("<td>")}this.append("<input");this.tagAtt("type","radio");this.tagAtt("name",this.id);this.tagAtt("value",h);if(this.title!=""){this.tagAtt("title",this.title)}var g=(this.value.toString()==h.toString());if(g){this.append(" checked")}if(!this.enabled){this.append(" disabled")}this.append(this.extraAttributes);gx.html.controls.onJSEvent(this,"gxoch0",f,this.usrOnclick);this.append(">");this.append(m);if(this.orientation==1){this.append("</td>");if(l==0){this.append("</tr>")}}}if(this.orientation==1){this.append("</table>")}else{this.append("</span>")}}},comboBox:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.comboBox;this.rows=1;this.possibleValues=[];this.setProperties=function(m,h,s,o,l,q,A,v,k,p,u,C,f,r,z,n,x,t,B,y,w,g){this.possibleValues=m.v||[];this.id=h;this.title=s;this.visible=(l!=0);this.enabled=(q!=0);this.rtEnabled=(A!=0);this.rows=v;this.format=k;this.width=p;this.widthUnit=u;this.height=C;this.heightUnit=f;this.style=r;this.cssClass=z;this.formattedValue=n;this.jsScrCode=x;this.usrOnclick=t;this.eventName=B;this.extraAttributes=y;this.value=g};this._getHtml=function(){if(this.dataType==gx.types.numeric){this.value=gx.text.trim(this.value.toString())}if(this.width>0){this.style=this.style+";width: "+this.width+this.widthUnit}if(this.height>0){this.style=this.style+";height: "+this.height+this.heightUnit}var k=this.style+" ;overflow:hidden;";this.style=this.style+((!this.visible||!this.enabled&&this.rtEnabled)?";display:none;":"");if(this.enabled||this.rtEnabled){var m=gx.html.controls.eventJSCode(this.jsScrCode,this.eventName,null,this.grid,this.row);this.append("<select");if(this.rows>1){this.tagAtt("size",this.rows)}this.tagAtt("id",this.id);this.tagAtt("name",this.id);if(this.title!=""){this.tagAtt("title",this.title)}if(this.cssClass!=""){this.tagAtt("class",this.cssClass)}if(this.style!=""){this.tagAtt("style",this.style)}if(!this.enabled){this.append(" disabled")}this.append(this.extraAttributes);gx.html.controls.onJSEvent(this,"gxoch0",m,this.usrOnclick);this.append(">");var f=this.possibleValues.length;for(var h=0;h<f;h++){var l=this.possibleValues[h];this.append("<option");this.tagAtt("value",l[0]);if(gx.text.trim(l[0].toString())==gx.text.trim(this.value.toString())){this.append(" selected")
}this.append(">");this.append(l[1]);this.append("</option>")}this.append("</select>")}if(!this.enabled){if(!this.rtEnabled){this.grid.addHiddenControl(this.id,this.value)}var g="";if(this.cssClass!=""&&this.cssClass.indexOf("Readonly")!=0){g="Readonly"+this.cssClass}else{g=this.cssClass}k=k+((!this.visible)?";display:none;":"");this.append("<span ");this.tagAtt("id","span_"+this.id);if(this.title!=""){this.tagAtt("title",this.title)}if(g!=""){this.tagAtt("class",g)}if(k!=""){this.tagAtt("style",k)}this.append(this.extraAttributes);this.append(">");var f=this.possibleValues.length;for(var h=0;h<f;h++){var l=this.possibleValues[h];if(gx.text.trim(l[0].toString())==gx.text.trim(this.value.toString())){this.append(l[1]);break}}this.append("</span>")}}},listBox:function(f,c,a,b,e,d){this.base(f,c,a,b,e);this.type=gx.html.controls.types.listBox;this.rows=d},checkBox:function(h,e,a,b,g,c,d,f){this.base(h,e,a,b,g);this.type=gx.html.controls.types.checkBox;this.caption=c||"";this.checkedValue=d;this.uncheckedValue=f;this.setProperties=function(q,r,l,p,n,t,m,k,o,s){this.id=q;this.title=r;this.visible=(l!=0);this.enabled=(p!=0);this.checkedValue=n;this.caption=t;this.style=m;this.cssClass=k;this.extraAttributes=o;this.value=s};this._getHtml=function(){if(this.dataType==gx.types.numeric){this.value=gx.text.trim(this.value.toString());this.checkedValue=gx.text.trim(this.checkedValue.toString())}var k=this.cssClass;if(!this.enabled&&this.cssClass!=""&&this.cssClass.indexOf("Readonly")!=0){k="Readonly"+this.cssClass}this.style=this.style+((this.visible)?"":";display:none;");this.append("<span ");if(k!=""){this.tagAtt("class",k)}if(this.style!=""){this.tagAtt("style",this.style)}this.append("><input");this.tagAtt("type","checkbox");this.tagAtt("name",this.id);var l=(this.value.toString()==this.checkedValue.toString());if(l){this.append(" checked");this.tagAtt("value",this.checkedValue)}else{this.tagAtt("value",this.uncheckedValue)}if(this.title!=""){this.tagAtt("title",this.title)}if(!this.enabled){this.append(" disabled")}this.append(this.extraAttributes);this.append(">");this.append(this.caption);this.append("</span>")}},image:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.image;this.alt="";this.setProperties=function(n,E,m,l,q,y,t,f,k,p,w,G,g,z,r,s,u,B,v,F,o,D,h,C,x,A,H){this.id=n;this.accessKey=E;this.visible=(l!=0);this.enabled=(q!=0);this.alt=y;this.title=t;this.borderWidth=f;this.autoresize=(k!=0);this.width=p;this.widthUnit=w;this.height=G;this.heightUnit=g;this.vSpace=z;this.hSpace=r;this.link=s;this.linkTarget=u;this.jsScrCode=B;this.usrOnclick=v;this.eventName=F;this.style=o;this.cssClass=D;this.align=h;this.extraAttributes=C;this.useMap=x;this.jsDynCode=A;this.imageUrl=H;if(gx.ajax.isabsoluteurl(H)||gx.ajax.isRelativeToHost(H)){this.value=H}else{this.value=gx.util.resourceUrl(gx.basePath+gx.staticDirectory+H,false)}};this._getHtml=function(){this.grid.addHiddenControl("GXimg"+this.id,this.imageUrl);if(this.eventName!=""&&gx.text.endsWith(this.eventName,".")){this.eventName+=this.gridRow
}var f=gx.util.accessKey(this.title);this.title=gx.util.accessKeyCaption(this.title);if(f!=""){this.accessKey=f}this.style=this.style+((this.visible)?"":";display:none;");var g=gx.html.controls.eventJSCode(this.jsScrCode,this.eventName,this.jsDynCode,this.grid,this.row);if(g!=""){this.append("<input");this.tagAtt("type","image");this.tagAtt("src",this.value);this.tagAtt("name",this.id);gx.html.controls.onJSEvent(this,"onclick",g+"return false;",this.usrOnclick)}else{if(this.enabled&&this.link!=""){gx.html.controls.startAnchor(this,g,this.usrOnclick,this.link,this.linkTarget)}this.append("<img");this.tagAtt("src",this.value)}if(!this.enabled){this.append(" disabled")}if(this.accessKey!=""){this.tagAtt("accesskey",this.accessKey)}this.tagAtt("id",this.id);if(this.vSpace!=0){this.tagAtt("vspace",this.vSpace)}if(this.hSpace!=0){this.tagAtt("hspace",this.hSpace)}if(this.align!=""){this.tagAtt("align",this.align)}if(this.cssClass==""||this.borderWidth>0){this.tagAtt("border",this.borderWidth);if(this.cssClass!=""){this.style=this.style+";border-width: "+this.borderWidth}}if(this.alt!=""){this.tagAtt("alt",this.alt)}if(this.title!=""){this.tagAtt("title",this.title)}if(this.width>0){this.style=this.style+";width: "+this.width+this.widthUnit}if(this.height>0){this.style=this.style+";height: "+this.height+this.heightUnit}if(this.cssClass!=""){this.tagAtt("class",this.cssClass)}if(this.style!=""){this.tagAtt("style",this.style)}if(this.useMap!=""){this.tagAtt("usemap",this.useMap)}this.append(">");if(this.enabled&&this.link!=""&&g==""){gx.html.controls.endAnchor(this,g,this.usrOnclick,this.link)}},this._persistValue=function(){if(this.grid.parentObject.GXValidFnc[this.column.gxId].v2v){this.grid.parentObject.GXValidFnc[this.column.gxId].v2v(this.imageUrl)}}},textBlock:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.textBlock;this.setProperties=function(h,k,o,p,s,f,q,l,n,r,m,g,t){this.id=h;this.visible=(k!=0);this.enabled=(o!=0);this.format=p;this.title=s;this.link=f;this.linkTarget=q;this.jsScrCode=l;this.usrOnclick=n;this.eventName=r;this.extraAttributes=m;this.cssClass=g;this.value=gx.text.replaceAll(t,"�","'")};this._getHtml=function(){var f;if(this.format!=gx.html.controls.formats.RAW_HTML){if(this.format==gx.html.controls.formats.HTML){f=((this.visible)?";display:inline":";display:none;")+this.extraAttributes;this.append("<div ")}else{f=((this.visible)?"":";display:none;")+this.extraAttributes;this.append("<span ")}this.tagAtt("id",this.id);if(this.cssClass!=""){this.tagAtt("class",this.cssClass)}this.tagAtt("gxformat",this.format);if(f!=""){this.tagAtt("style",f)}if(this.title!=""){this.tagAtt("title",this.title)}this.append(">")}var g="";if(this.enabled){g=gx.html.controls.eventJSCode(this.jsScrCode,this.eventName,null,this.grid,this.row);gx.html.controls.startAnchor(this,g,this.usrOnclick,this.link,this.linkTarget)}else{g=""}this.append(gx.html.encodeCaseFormat(this.value,this.format));if(this.enabled){gx.html.controls.endAnchor(this,g,this.usrOnclick,this.link)
}if(this.format==gx.html.controls.formats.HTML){this.append("</div>")}else{if(this.format!=gx.html.controls.formats.RAW_HTML){this.append("</span>")}}if(this.format==gx.html.controls.formats.RAW_HTML){gx.html.processCode(this.buffer.toString(),false)}}},button:function(f,c,a,b,d,e){this.base(f,c,a,b,d);this.type=gx.html.controls.types.button;this.caption="";this.buttonStyle=e||"rounded";this.setProperties=function(g,u,w,m,l,h,k,r,o,n,q,v,p,s,t,x){this.reset=g;this.id=u;this.title=w;this.accessKey=m;this.style=l;this.cssClass=h;this.visible=(k!=0);this.enabled=(r!=0);this.buttonStyle=o;this.jsScrCode=n;this.usrOnclick=q;this.eventName=v+(this.jsScrCode==5?this.gridRow:"");this.extraAttributes=p;this.jsCode=s;this.jsDynCode=t;this.caption=x};this._getHtml=function(){this.style=this.style+((this.visible)?"":";display:none;");var k="BaseRBtn R"+this.cssClass;if(this.buttonStyle=="rounded"){this.cssClass="BtnText";this.append("<span ");this.tagAtt("onclick","gx.evt.doClick('"+this.id+"', event);");if(this.style!=""){this.tagAtt("style",this.style)}this.tagAtt("class",k);this.append('><span class="BtnLeft"><span class="BtnRight"><span class="BtnBackground">')}this.append("<input");var h="button";if(this.reset==1){h="submit"}else{if(this.reset==0){h="reset"}}this.tagAtt("type",h);var g=gx.util.accessKey(this.caption);this.caption=gx.util.accessKeyCaption(this.caption);if(g==""){g=gx.util.accessKey(this.title);this.title=gx.util.accessKeyCaption(this.title)}if(g!=""){this.accessKey=g}this.tagAtt("name",this.id);this.tagAtt("value",this.caption);if(this.title!=""){this.tagAtt("title",this.title)}if(this.accessKey!=""){this.tagAtt("accesskey",this.accessKey)}this.tagAtt("class",this.cssClass);if(this.style!=""){this.tagAtt("style",this.style)}this.tagAtt("gxevent",this.eventName);if(!this.enabled){this.append(" disabled")}var l=gx.html.controls.eventJSCode(this.jsScrCode,this.eventName,this.jsDynCode,this.grid,this.row);l=this.jsCode+l;gx.html.controls.onJSEvent(this,"onclick",l+"return false;",this.usrOnclick);this.append(this.extraAttributes);this.append(">");if(this.buttonStyle=="rounded"){this.append("</span></span></span></span>")}}},grid:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.grid;this.containerName="";this.setProperties=function(f){this.containerName=f;this.id=this.grid.gxComponentContext+this.containerName+"Div_"+this.gridRow};this._getHtml=function(){this.append("<div");this.tagAtt("id",this.id);this.append("></div>")}},userControl:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.userControl;this.containerName="";this.setProperties=function(f){this.containerName=f;this.id=this.containerName};this._getHtml=function(){this.append("<div");this.tagAtt("id",this.id);this.tagAtt("class","gx_usercontrol");this.append("></div>");this.grid.addUsercontrolToDraw({r:this.gridRow,c:this.column})}},userControlContainer:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.userControlContainer;
this.parentName="";this.containerName="";this.setProperties=function(f,g){this.parentName=f;this.containerName=g;this.id=this.parentName+this.containerName+"_"+this.gridRow};this._getHtml=function(){this.append("<div");this.tagAtt("id",this.id);this.tagAtt("style","display:none;");this.tagAtt("class","gx_usercontrol_child");this.append(">")}},webComponent:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.webComponent;this.controlName="";this.content="";this.setProperties=function(l){this.controlName=l;var f=this.grid.parentObject.getComponentData(this.controlName);var m=f.Prefix;var h=this.grid.gxComponentContext+"gxHTMLWrp"+m+this.gridRow;var n=gx.dom.el(h);var g="";this.grid.addOldComponent(this.gridRow,this.grid.gxComponentContext+m+this.gridRow);if(n!=null){var o=h+"_hook";this.grid.addComponentToDraw({create:false,existingEl:o,el:h});h=o}else{if(!gx.lang.emptyObject(gx.csv.lastEvtResponse)&&!gx.lang.emptyObject(gx.csv.lastEvtResponse.gxComponents)){var k=gx.csv.lastEvtResponse.gxComponents[h];if(!gx.lang.emptyObject(k)){g=gx.html.cleanHtmlRefs(k);var p=gx.fn.getHidden(this.grid.gxComponentContext+m+this.gridRow);if(!p){p=f.GXClass}if(!gx.lang.emptyObject(p)){this.grid.addComponentToDraw({load:true,n:p.toLowerCase(),p:this.grid.gxComponentContext+m+this.gridRow,c:k})}}else{g=""}}}this.id=h;this.content=g};this._getHtml=function(){this.append("<div");this.tagAtt("id",this.id);this.append(">");this.append(this.content);this.append("</div>")}},embeddedPage:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.embeddedPage;this.align="center";this.scrollbars="auto";this.borderStyle="1";this.setProperties=function(m,g,h,p,f,q,k,o,n,r,l){this.id=m;this.value=g;this.visible=(h!=0);this.width=p;this.widthUnit=f;this.height=q;this.heightUnit=k;this.borderStyle=o;this.align=n;this.title=r;this.scrollbars=l};this._getHtml=function(){this.style=this.style+((this.visible)?"":";display:none;");this.append("<iframe");this.tagAtt("frameborder",this.borderStyle);this.tagAtt("align",this.align);this.tagAtt("scrolling",this.scrollbars);if(this.height>0){this.tagAtt("height",this.height+this.heightUnit)}if(this.width>0){this.tagAtt("width",this.width+this.widthUnit)}if(this.title!=""){this.tagAtt("title",this.title)}if(this.id!=""){this.tagAtt("id",this.id);this.tagAtt("name",this.id)}if(this.value!=""){this.tagAtt("src",this.value)}if(this.cssClass!=""){this.tagAtt("class",this.cssClass)}if(this.style!=""){this.tagAtt("style",this.style)}this.append("</iframe>")}},table:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.table;this.cellSpacing="";this.cellPadding="";this.backColor="";this.setProperties=function(t,h,g,v,m,k,r,p,u,o,n,s,q,w,l,f){this.id=t;this.visible=(h!=0);this.cssClass=g;this.background=v;this.backColor=m;this.borderColor=k;this.align=r;this.title=p;this.borderWidth=u;this.cellPadding=o;this.cellSpacing=n;this.height=s;this.width=q;this.rules=w;this.heightUnit=l;this.widthUnit=f;
this.style=""};this._getHtml=function(){this.style=this.style+((this.visible)?"":";display:none;");if(this.background!=""){this.background=gx.util.resourceUrl(gx.basePath+gx.staticDirectory+this.background,true);this.style=this.style+"background-image: url("+this.background+");"}if(this.backColor!=""){var f=parseInt(this.backColor);if(!isNaN(f)){f=gx.color.html(f).Html}else{f=this.backColor}this.style=this.style+"background-color: "+f+";"}if(this.borderColor!=""){var f=parseInt(this.borderColor);if(!isNaN(f)){f=gx.color.html(f).Html}else{f=this.borderColor}this.style=this.style+"border-color: "+f+";"}if(this.borderWidth!=""){this.style=this.style+"border-width: "+this.borderWidth+";"}if(this.height!=""){this.style=this.style+"height: "+this.height+this.heightUnit+";"}if(this.width!=""){this.style=this.style+"width: "+this.width+this.widthUnit+";"}this.append("<table");this.tagAtt("id",this.id);this.tagAtt("align",this.align);if(this.borderWidth!=""){this.tagAtt("border",this.borderWidth)}if(this.cellSpacing!==""){this.tagAtt("cellspacing",this.cellSpacing)}if(this.cellPadding!==""){this.tagAtt("cellpadding",this.cellPadding)}if(this.rules!=""&&this.rules!="none"){this.tagAtt("rules",this.rules)}if(this.title!=""){this.tagAtt("title",this.title)}if(this.cssClass!=""){this.tagAtt("class",this.cssClass)}if(this.style!=""){this.tagAtt("style",this.style)}this.append(">")}},row:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.row;this.backColor="";this.borderColor="";this.align="";this.verticalAlign="";this.isFreestyleRow=false;this.oncontextmenu="";this.setProperties=function(g,f,h){if(f){if(this.ownCssClass){this.cssClass=f+(this.ownCssClass?(" "+this.ownCssClass):"")}else{this.cssClass=f}}this.style=h};this._getHtml=function(){this.append("<tr");if(this.id!=""){this.tagAtt("id",this.id)}if(this.isFreestyleRow){this.tagAtt("gxrow",this.gridRow)}if(this.backColor!=""){this.style=this.style+"background-color:"+this.backColor+";"}if(this.borderColor!=""){this.tagAtt("bordercolor",this.borderColor)}if(this.align!=""){this.tagAtt("align",this.align)}if(this.verticalAlign!=""){this.tagAtt("valign",this.verticalAlign)}if(this.style!=""){this.tagAtt("style",this.style)}if(this.cssClass!=""){this.tagAtt("class",this.cssClass)}if(this.oncontextmenu!=""){this.tagAtt("oncontextmenu",this.oncontextmenu)}this.append(">")}},cell:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.cell;this.style="";this.background="";this.backColor="";this.borderColor="";this.align="";this.verticalAlign="";this.colSpan="";this.rowSpan="";this.setProperties=function(h,g){this.background=h;if(g&&g!=""){var f=g.indexOf("style=");if(f>0){this.style=g.substring(8);this.style=this.style.substring(0,this.style.length-1)+";"}}};this._getHtml=function(){this.append("<td");if((typeof(this.width)!="undefined")&&(this.width!=0)){this.tagAtt("width",this.width)}if((typeof(this.height)!="undefined")&&(this.height!=0)){this.tagAtt("height",this.height)
}if(this.background!=""){this.tagAtt("background",this.background)}if(this.backColor!=""){this.style+="background-color:"+this.backColor+";"}if(this.style!=""){this.tagAtt("style",this.style)}if(this.borderColor!=""){this.tagAtt("bordercolor",this.borderColor)}if(this.align!=""){this.tagAtt("align",this.align)}if(this.verticalAlign!=""){this.tagAtt("valign",this.verticalAlign)}if(this.colSpan!=""){this.tagAtt("colspan",this.colSpan)}if(this.rowSpan!=""){this.tagAtt("rowspan",this.rowSpan)}if(this.cssClass!=""){this.tagAtt("class",this.cssClass)}this.append(">")}},group:function(e,c,a,b,d){this.base(e,c,a,b,d);this.type=gx.html.controls.types.group;this.caption="";this.setProperties=function(){};this._getHtml=function(){this.append("<fieldset");this.tagAtt("name",this.id);if(this.cssClass!=""){this.tagAtt("class",this.cssClass)}var f="-moz-border-radius:3pt;";if(this.width!="0px"){f+="width:"+this.width+";"}if(this.height!="0px"){f+="height:"+this.height+";"}this.tagAtt("style",f);this.append(">");this.append("<legend");if(this.cssClass!=""){this.tagAtt("class",this.cssClass+"Title")}this.append(">");this.append(gx.getMessage(this.caption));this.append("</legend>")}},_init:function(){gx.lang.inherits(this.singleLineEdit,this.htmlControl);gx.lang.inherits(this.multipleLineEdit,this.singleLineEdit);gx.lang.inherits(this.blob,this.htmlControl);gx.lang.inherits(this.radio,this.htmlControl);gx.lang.inherits(this.comboBox,this.htmlControl);gx.lang.inherits(this.listBox,this.comboBox);gx.lang.inherits(this.checkBox,this.htmlControl);gx.lang.inherits(this.image,this.htmlControl);gx.lang.inherits(this.textBlock,this.htmlControl);gx.lang.inherits(this.button,this.htmlControl);gx.lang.inherits(this.grid,this.htmlControl);gx.lang.inherits(this.userControl,this.htmlControl);gx.lang.inherits(this.userControlContainer,this.htmlControl);gx.lang.inherits(this.webComponent,this.htmlControl);gx.lang.inherits(this.embeddedPage,this.htmlControl);gx.lang.inherits(this.table,this.htmlControl);gx.lang.inherits(this.row,this.htmlControl);gx.lang.inherits(this.cell,this.htmlControl);gx.lang.inherits(this.group,this.htmlControl)}}},_setBasePath:function(){var d=location.pathname.split("/");var c="";var a=d.length;for(var b=0;b<a-1;b++){if(d[b]=="servlet"){break}if(d[b]!=""){c=c+((c=="")?"":"/")+d[b]}}gx.basePath=c},_init:function(){gx.dom._init();gx.base64._init();gx.sec._init();gx.util._init();gx.evt._init();gx._setBasePath();gx.date._init();gx.html.controls._init();gx.popup._init()},_deinit:function(){gx.dom._deinit();gx.csv._deinit();gx.evt._deinit();gx.grid._deinit();gx.O=null;gx.pO=null}};