/* ***************************************************************** */
/*                                                                   */
/* IBM Confidential                                                  */
/*                                                                   */
/* OCO Source Materials                                              */
/*                                                                   */
/* Copyright IBM Corp. 2008                                          */
/*                                                                   */
/* The source code for this program is not published or otherwise    */
/* divested of its trade secrets, irrespective of what has been      */
/* deposited with the U.S. Copyright Office.                         */
/*                                                                   */
/* ***************************************************************** */
dojo.provide("ibm.xsp.widget.layout.xspClientDojo");if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function $DA4S_(_1,_2,_3){_3=dojo.i18n.normalizeLocale(_3);var _4=_3.split("-");var _5=[_1,"nls",_2].join(".");var _6=dojo._loadedModules[_5];if(_6){var _7;for(var i=_4.length;i>0;i--){var _9=_4.slice(0,i).join("_");if(_6[_9]){_7=_6[_9];break;}}if(!_7){_7=_6.ROOT;}if(_7){var _a=function(){};_a.prototype=_7;return new _a();}}throw new Error("Bundle not found: "+_2+" in "+_1+" , locale="+_3);};dojo.i18n.normalizeLocale=function $DA4T_(_b){var _c=_b?_b.toLowerCase():dojo.locale;if(_c=="root"){_c="ROOT";}return _c;};dojo.i18n._requireLocalization=function $DA4U_(_d,_e,_f,_10){var _11=dojo.i18n.normalizeLocale(_f);var _12=[_d,"nls",_e].join(".");var _13="";if(_10){var _14=_10.split(",");for(var i=0;i<_14.length;i++){if(_11["indexOf"](_14[i])==0){if(_14[i].length>_13.length){_13=_14[i];}}}if(!_13){_13="ROOT";}}var _16=_10?_13:_11;var _17=dojo._loadedModules[_12];var _18=null;if(_17){if(dojo.config.localizationComplete&&_17._built){return;}var _19=_16.replace(/-/g,"_");var _1a=_12+"."+_19;_18=dojo._loadedModules[_1a];}if(!_18){_17=dojo["provide"](_12);var _1b=dojo._getModuleSymbols(_d);var _1c=_1b.concat("nls").join("/");var _1d;dojo.i18n._searchLocalePath(_16,_10,function(loc){var _1f=loc.replace(/-/g,"_");var _20=_12+"."+_1f;var _21=false;if(!dojo._loadedModules[_20]){dojo["provide"](_20);var _22=[_1c];if(loc!="ROOT"){_22.push(loc);}_22.push(_e);var _23=_22.join("/")+".js";_21=dojo._loadPath(_23,null,function(_24){var _25=function(){};_25.prototype=_1d;_17[_1f]=new _25();for(var j in _24){_17[_1f][j]=_24[j];}});}else{_21=true;}if(_21&&_17[_1f]){_1d=_17[_1f];}else{_17[_1f]=_1d;}if(_10){return true;}});}if(_10&&_11!=_13){_17[_11.replace(/-/g,"_")]=_17[_13.replace(/-/g,"_")];}};(function(){var _27=dojo.config.extraLocale;if(_27){if(!_27 instanceof Array){_27=[_27];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function $DA4V_(m,b,_2b,_2c){req(m,b,_2b,_2c);if(_2b){return;}for(var i=0;i<_27.length;i++){req(m,b,_27[i],_2c);}};}})();dojo.i18n._searchLocalePath=function $DA4W_(_2e,_2f,_30){_2e=dojo.i18n.normalizeLocale(_2e);var _31=_2e.split("-");var _32=[];for(var i=_31.length;i>0;i--){_32.push(_31.slice(0,i).join("-"));}_32.push(false);if(_2f){_32.reverse();}for(var j=_32.length-1;j>=0;j--){var loc=_32[j]||"ROOT";var _36=_30(loc);if(_36){break;}}};dojo.i18n._preloadLocalizations=function $DA4X_(_37,_38){function preload(_39){_39=dojo.i18n.normalizeLocale(_39);dojo.i18n._searchLocalePath(_39,true,function(loc){for(var i=0;i<_38.length;i++){if(_38[i]==loc){dojo["require"](_37+"_"+loc);return true;}}return false;});};preload();var _3c=dojo.config.extraLocale||[];for(var i=0;i<_3c.length;i++){preload(_3c[i]);}};}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.rep=function $DA5l_(str,num){if(num<=0||!str){return "";}var buf=[];for(;;){if(num&1){buf.push(str);}if(!(num>>=1)){break;}str+=str;}return buf.join("");};dojo.string.pad=function $DA5m_(_41,_42,ch,end){if(!ch){ch="0";}var out=String(_41),pad=dojo.string.rep(ch,Math.ceil((_42-out.length)/ch.length));return end?out+pad:pad+out;};dojo.string.substitute=function $DA5n_(_47,map,_49,_4a){_4a=_4a||dojo.global;_49=(!_49)?function(v){return v;}:dojo.hitch(_4a,_49);return _47.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_4c,key,_4e){var _4f=dojo.getObject(key,false,map);if(_4e){_4f=dojo.getObject(_4e,false,_4a).call(_4a,_4f,key);}return _49(_4f,key).toString();});};dojo.string.trim=String.prototype.trim?dojo.trim:function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};}if(typeof XSP=="undefined"){var XSP=new XSPConstructor();}function XSPConstructor(){this.validateAllFields=false;this.validators=new Array();this.preSubmitListeners=new Array();this.querySubmitListeners=new Array();this._onLoadListeners=[];this._listeningForDojo=false;this._unnamedSubmitListenerCount=0;this._eventNameHtmlToWidget=null;this._submitValue=undefined;this.messages=null;this.lastSubmit=0;this.submitLatency=6*1000;this._allowDirtySubmit=true;this._dirty=false;this._dirtyFormId=null;this.djRequire=function x_djreq(_52){return dojo["require"](_52);};this.getMessage=function x_gm(msg){if(null==this.messages){this.messages=dojo.i18n.getLocalization("ibm.xsp.widget.layout","xspClientDojo");}return XSP.messages[msg];};this.addPreSubmitListener=function x_apsl(_54,_55,_56,_57){this._pushListener(this.preSubmitListeners,_54,_56,_57,_55);};this.addQuerySubmitListener=function x_aqsl(_58,_59,_5a,_5b){this._pushListener(this.querySubmitListeners,_58,_5a,_5b,_59);};this._pushListener=function x_pl(_5c,_5d,_5e,_5f,_60){if("undefined"==typeof _5f||null==_5f){this._unnamedSubmitListenerCount++;_5f="script"+this._unnamedSubmitListenerCount.toString();}else{for(var i=0;i<_5c.length;i++){if(_5f==_5c[i].scriptId){return;}}}_5c.push(new this._SubmitListener(_5d,_60,_5e,_5f));};this._SubmitListener=function x_sl(_62,_63,_64,_65){this.formId=_62;this.clientId=_64;this.scriptId=_65;this.listener=_63;this.run=function xsl_r(_66){return this.listener(_66);};};this.canSubmit=function x_cs(){if(this.lastSubmit>0){var now=(new Date()).getTime();if(now<(this.lastSubmit+this.submitLatency)){return false;}}this.lastSubmit=(new Date()).getTime();return true;};this.allowSubmit=function x_as(){this.lastSubmit=0;};this.setSubmitValue=function x_sbv(_68){this._submitValue=_68;};this._processListeners=function x_pl(_69,_6a,_6b){for(var i=0;i<_69.length;i++){var _6d=_69[i];if(_6d.formId==_6a){if(typeof _6d.clientId=="undefined"||null==_6d.clientId||_6d.clientId==_6b){var _6e=_6d.run();if(_69==this.querySubmitListeners&&_6e==false){return _6e;}}}}return true;};this.alert=function x_al(s){alert(s);};this.error=function x_er(s){this.alert(s);};this.confirm=function x_cf(s){return dojo.global.confirm(s);};this.attachValidator=function x_av(_72,_73,_74){var v=null;if(arguments.length>3){v=new Array();for(var i=3;i<arguments.length;i++){v.push(arguments[i]);}}this.validators.push(new XSP._Validator(_72,_73,_74,v));};this._Validator=function x_v(_77,_78,_79,_7a){this.clientId=_77;this.required=_78;this.converter=_79;this.validatorList=_7a;};this.validateAll=function validateAll(_7b){var _7c=true;for(var i=0;i<this.validators.length;i++){if(!_7c&&!this.validateAllFields){return _7c;}var vc=this.validators[i];var _7f=this.findForm(vc.clientId);var fid=(null==_7f)?null:_7f.id;if(fid==_7b){var _81=null;var _82=this.getElementById(vc.clientId);if(typeof dijit!="undefined"&&typeof dijit.byId!="undefined"){var dj=dijit.byId(vc.clientId);if(dj){_81=this.getDijitFieldValue(dj);}}if(_81==null&&_82!=null&&!_82.disabled){_81=this.getFieldValue(_82);}if(_81!=null){if(vc.required){if(!vc.required.validate(vc.clientId,_81)){_7c=false;continue;}}if(_81!=null&&_81!=""){if(vc.converter){_81=vc.converter.convert(vc.clientId,_81);if(_81==null){_7c=false;continue;}}if(vc.validatorList){for(var j=0;j<vc.validatorList.length;j++){if(!vc.validatorList[j].validate(vc.clientId,_81)){_7c=false;continue;}}}}}}}return _7c;};this.getFieldValue=function getFieldValue(_85){if(_85){var _86=(!_85.type)?null:_85.type.toLowerCase();if(_86=="radio"||_86=="checkbox"){if(_85.checked){return _85.value;}return "";}else{if(_85.multiple){var sel="";for(var i=0;i<_85.options.length;i++){if(_85.options[i].selected){if(sel){sel+=",";}sel+=_85.options[i].value;}}return sel;}else{if(typeof _85.value!="undefined"){return _85.value;}}}}return null;};this.getDijitFieldValue=function getDijitFieldValue(dj){if(dj&&dj.getValue){return dj.getValue();}return null;};this.validationError=function validationError(_8a,_8b){this.error(_8b);var e=this.getElementById(_8a);if(e!=null){if(e.select){e.select();}if(e.focus){e.focus();}}};this.DateConverter=function DateConverter(_8d,_8e){XSP.djRequire("dojo.date.locale");this.message=_8e;this.dateFormat=_8d;this.convert=function xdc_c(_8f,_90){var _91=XSP.getElementById(_8f);if(null!=_91){var _92=_91.value;var _93=dojo.date.locale.parse(_92,{selector:"date",datePattern:this.dateFormat});if(null==_93){XSP.validationError(_8f,this.message);return null;}return _93;}return null;};};this.TimeConverter=function TimeConverter(_94,_95){XSP.djRequire("dojo.date.locale");this.message=_95;this.timeFormat=_94;this.convert=function xtc_c(_96,_97){var _98=XSP.getElementById(_96);if(null!=_98){var _99=_98.value;var _9a=dojo.date.locale.parse(_99,{selector:"time",timePattern:this.timeFormat});if(null==_9a){XSP.validationError(_96,this.message);return null;}return _9a;}return null;};};this.DateTimeConverter=function DateTimeConverter(_9b,_9c,_9d){XSP.djRequire("dojo.date.locale");this.message=_9d;this.dateFormat=_9b;this.timeFormat=_9c;this.convert=function xdtc_c(_9e,_9f){var _a0=XSP.getElementById(_9e);if(null!=_a0){var _a1=_a0.value;var _a2=dojo.date.locale.parse(_a1,{datePattern:this.dateFormat,timePattern:this.timeFormat});if(null==_a2){XSP.validationError(_9e,this.message);return null;}return _a2;}return null;};};this.IntConverter=function IntConverter(_a3){this.message=_a3;this.convert=function xic_c(_a4,_a5){var _a6=/^-?\d+$/;if(_a6.test(_a5)){return parseInt(_a5);}XSP.validationError(_a4,this.message);return null;};};this.NumberConverter=function NumberConverter(dot,tho,_a9){this.message=_a9;this.convert=function xnc_c(_aa,_ab){while(_ab.indexOf(tho)>=0){_ab=_ab.replace(tho,"");}_ab=_ab.replace(dot,".");var _ac=/(^-?\d+(\.\d*)?([eE][-+]?\d+)?$)|(^-?\.\d+([eE][-+]?\d+)?$)/;if(_ac.test(_ab)){return parseFloat(_ab);}XSP.validationError(_aa,this.message);return null;};};this.RequiredValidator=function RequiredValidator(_ad){this.message=_ad;this.validate=function xrv_v(_ae,_af){if(_af==null||_af==""){XSP.validationError(_ae,this.message);return false;}return true;};};this.DateTimeRangeValidator=function DateTimeRangeValidator(_b0,_b1,_b2){XSP.djRequire("dojo.date.stamp");this.minTime=_b0!=null?dojo.date.stamp.fromISOString(_b0):null;this.maxTime=_b1!=null?dojo.date.stamp.fromISOString(_b1):null;this.message=_b2;this.validate=function xdtrv_v(_b3,_b4){if(typeof _b4=="object"&&_b4.getTime){var _b5=_b4.getTime();if((null!=this.minTime&&_b5<this.minTime)||(null!=this.maxTime&&_b5>this.maxTime)){XSP.validationError(_b3,this.message);return false;}}return true;};};this.LengthValidator=function LengthValidator(min,max,_b8){this.min=min;this.max=max;this.message=_b8;this.validate=function xlv_v(_b9,_ba){if(typeof _ba=="string"){var len=_ba.length;if((this.min!=null&&len<this.min)||(this.max!=null&&len>this.max)){XSP.validationError(_b9,this.message);return false;}}return true;};};this.NumberRangeValidator=function NumberRangeValidator(min,max,_be){this.min=min;this.max=max;this.message=_be;this.validate=function xnrv_v(_bf,_c0){if(typeof _c0=="number"){if((this.min!=null&&_c0<this.min)||(this.max!=null&&_c0>this.max)){XSP.validationError(_bf,this.message);return false;}}return true;};};this.RegExpValidator=function RegExpValidator(_c1,_c2){this.expr=_c1;this.message=_c2;this.validate=function xrev_v(_c3,_c4){if(typeof _c4=="string"){var re=new RegExp(this.expr);if(!re.test(_c4)){XSP.validationError(_c3,this.message);return false;}}return true;};};this.ExpressionValidator=function ExpressionValidator(_c6,_c7){this.expr=_c6;this.message=_c7;this.validate=function xev_v(_c8,_c9){var _ca=dojo.global.value;dojo.global.value=_c9;var _cb=eval(this.expr);dojo.global.value=_ca;if(!_cb){XSP.validationError(_c8,this.message);return false;}return true;};};this.attachEvent=function x_ae(_cc,_cd,_ce,_cf,_d0,_d1,_d2){if(_cd==null){_cd=_cc;}var _d3=dojo.byId(_cd);if(typeof dijit!="undefined"&&typeof dijit.byId!="undefined"){var _d4=dijit.byId(_cd);if(_d4&&_ce){if(!this._eventNameHtmlToWidget){this._eventNameHtmlToWidget={"onclick":"onClick","onchange":"onChange","onblur":"onBlur","onfocus":"onFocus","onkeydown":"onKeyDown","onkeypress":"onKeyPress","onkeyup":"onKeyUp"};}var _d5=this._eventNameHtmlToWidget[_ce];if(_d5&&dojo.isFunction(_d4[_d5])){if(_d5=="onFocus"&&_d4.declaredClass.indexOf("DateTextBox")!=-1){_ce="_onFocus";}else{_ce=_d5;}_d3=_d4;}}}dojo.connect(_d3,_ce,function xav_fe(_d6){if(_d3&&_d3.getAttribute){var _d7=_d3.getAttribute("href");if(_d7&&XSP.endsWith(_d7,"#")){_d6.preventDefault();}}XSP.fireEvent(_d6,_cc,_cd,_cf,_d0,_d1,_d2);});};this.fireEvent=function x_fe(evt,_d9,_da,_db,_dc,_dd,_de){var _df=this.findForm(_da);if(_dc&&(_df==null||!this.canSubmit())){return false;}var _e0=this._doFireEvent(evt,_df,_d9,_db,_dc,_dd,_de);if(_dc){if(_e0){window.onbeforeunload=null;document.forms[_df.id].submit();}else{this.allowSubmit();}}};this._doFireEvent=function x_dfe(evt,_e2,_e3,_e4,_e5,_e6,_e7){var _e8=true;var _e9=this._submitValue?this._submitValue:"";this._submitValue=undefined;if(_e4!=null){if(dojo.isString(_e4)&&dojo.global[_e4]){_e4=dojo.global[_e4];}if(dojo.isFunction(_e4)){try{_e8=_e4(evt);}catch(err){if(dojo.global.onerror&&err&&err.message&&err.fileName&&err.lineNumber){dojo.global.onerror(err.message,err.fileName,err.lineNumber);return false;}throw err;}if(typeof _e8=="boolean"){if(_e8==false){return false;}}else{if(!(typeof this._submitValue=="undefined")){_e9=this._submitValue;}else{if(!(typeof _e8=="undefined")){_e9=_e8;}}}}}if(_e9&&typeof _e9!="string"){if(typeof _e9=="object"){_e9=this.toJson(_e9);}else{_e9=_e9.toString();}}if(_e5){if(!_e6){_e8=this.validateAll(_e2.id);if(_e8==false){return false;}}_e8=this._processListeners(this.querySubmitListeners,_e2.id,_e3);if(_e8==false){return false;}this._processListeners(this.preSubmitListeners,_e2.id,_e3);if(_e8&&_e5){document.forms[_e2.id]["$$xspsubmitid"].value=_e3;document.forms[_e2.id]["$$xspexecid"].value=_e7?_e7:"";if(_e9){document.forms[_e2.id]["$$xspsubmitvalue"].value=_e9;}document.forms[_e2.id]["$$xspsubmitscroll"].value=this._scrollPosition();}return true;}return false;};this._scrollPosition=function _scrollPosition(){var _ea=window.pageXOffset||document.documentElement.scrollLeft||0;var _eb=window.pageYOffset||document.documentElement.scrollTop||0;return _ea+"|"+_eb;};this.scrollWindow=function scrollWindow(x,y){window.scrollTo(x,y);};this._setAllowDirtySubmit=function x_sads(_ee){this._allowDirtySubmit=_ee;};this._isAllowDirtySubmit=function x_iads(){return (this._allowDirtySubmit);};this._setDirty=function x_sd(_ef,_f0){this._dirty=_ef;this._dirtyFormId=_f0;};this._isDirty=function x_id(){return (this._dirty);};this._getDirtyFormId=function x_gdfi(){return (this._dirtyFormId);};this.attachDirtyListener=function x_adl(_f1){var _f2=this.findForm(_f1);if(null!=_f2){var _f3=dojo.byId(_f1);var _f4="onchange";if(typeof dijit!="undefined"&&typeof dijit.byId!="undefined"){var _f5=dijit.byId(_f1);if(_f5){if(dojo.isFunction(_f5["onChange"])){_f3=_f5;_f4="onChange";}}}dojo.connect(_f3,_f4,function xadl_sd(_f6){XSP._setDirty(true,_f2.id);});}};this.attachDirtyUnloadListener=function x_adul(_f7){window.onbeforeunload=function xadul_sd(_f8){if(XSP._isDirty()){return _f7;}};};this._validateDirtyForm=function x_vdf(_f9,_fa){var _fb=this.getElementById(_f9);var _fc=this.validateAll(_fb.id);if(false==_fc){this._setAllowDirtySubmit(false);return _fc;}_fc=this._processListeners(this.querySubmitListeners,_fb.id,_fa);if(false==_fc){this._setAllowDirtySubmit(false);}return _fc;};this._saveDirtyForm=function x_sdf(evt,_fe,_ff,_100,_101,_102,_103){var form=this.findForm(_ff);if(_101&&(form==null||!this.canSubmit())){return false;}var _105=this._doFireSaveEvent(evt,form,_fe,_100,_101,_102,_103);if(_101){if(_105){window.onbeforeunload=null;document.forms[form.id].submit();}else{this.allowSubmit();}}};this._doFireSaveEvent=function x_dfe(evt,form,_108,_109,_10a,_10b,_10c){var _10d=true;var _10e=this._submitValue?this._submitValue:"";this._submitValue=undefined;if(_109!=null){if(dojo.isString(_109)&&dojo.global[_109]){_109=dojo.global[_109];}if(dojo.isFunction(_109)){try{_10d=_109(evt);}catch(err){if(dojo.global.onerror&&err&&err.message&&err.fileName&&err.lineNumber){dojo.global.onerror(err.message,err.fileName,err.lineNumber);return false;}throw err;}if(typeof _10d=="boolean"){if(_10d==false){return false;}}else{if(!(typeof this._submitValue=="undefined")){_10e=this._submitValue;}else{if(!(typeof _10d=="undefined")){_10e=_10d;}}}}}if(_10e&&typeof _10e!="string"){if(typeof _10e=="object"){_10e=this.toJson(_10e);}else{_10e=_10e.toString();}}if(_10a){this._processListeners(this.preSubmitListeners,form.id,_108);if(_10d&&_10a){document.forms[form.id]["$$xspsubmitid"].value=_108;document.forms[form.id]["$$xspexecid"].value=_10c?_10c:"";if(_10e){document.forms[form.id]["$$xspsubmitvalue"].value=_10e;}document.forms[form.id]["$$xspsubmitscroll"].value=this._scrollPosition();}return true;}return false;};this.attachPartial=function x_apar(_10f,_110,_111,_112,_113,_114,_115,_116,_117,_118){if(_110==null){_110=_10f;}var _119=dojo.byId(_110);if(typeof dijit!="undefined"&&typeof dijit.byId!="undefined"){var _11a=dijit.byId(_110);if(_11a&&_112){if(!this._eventNameHtmlToWidget){this._eventNameHtmlToWidget={"onclick":"onClick","onchange":"onChange","onblur":"onBlur","onfocus":"onFocus","onkeydown":"onKeyDown","onkeypress":"onKeyPress","onkeyup":"onKeyUp"};}var _11b=this._eventNameHtmlToWidget[_112];if(_11b&&dojo.isFunction(_11a[_11b])){if(_11b=="onFocus"&&_11a.declaredClass.indexOf("DateTextBox")!=-1){_112="_onFocus";}else{_112=_11b;}_119=_11a;}}}dojo.connect(_119,_112,function xapar_fpre(_11c){if(_119&&_119.getAttribute){var href=_119.getAttribute("href");if(href&&XSP.endsWith(href,"#")){_11c.preventDefault();}}var form=XSP.findForm(_110);if(form==null||!XSP.canSubmit()){return false;}if(XSP._doFireEvent(_11c,form,_10f,_113,true,_114,_111)){var _11f={onStart:_116,onComplete:_117,onError:_118};XSP._partialRefresh("post",form,_115,_11f);}else{XSP.allowSubmit();}});};this.partialRefreshGet=function x_prfs(_120,_121){var form=document.forms[0];if(form==null||!this.canSubmit()){return false;}_121=_121||new Object();this._partialRefresh("get",form,_120,_121);};this.partialRefreshPost=function x_prfs(_123,_124){var form=this.findForm(_123);if(form==null||!this.canSubmit()){return false;}_124=_124||new Object();if(this._doFireEvent(null,form,_123,null,true,_124.immediate,_124.execId)){this._partialRefresh("post",form,_123,_124);}else{this.allowSubmit();}};this._partialRefresh=function x_prfh(_126,form,_128,_129){var _12a=form.action;_12a+=(_12a.match(/\?/)?"&":"?")+"$$ajaxmode=full"+"&$$ajaxid="+encodeURIComponent(_128);if(_129.params&&_126=="get"&&typeof _129.params=="object"){for(var key in _129.params){var _12c=_129.params[key];if(_12c){_12a+="&"+encodeURIComponent(key)+"="+encodeURIComponent(_12c);}else{if(_12c!=null&&typeof _12c!="undefined"){_12a+="&"+encodeURIComponent(key);if(""!=_12c){_12a+="="+encodeURIComponent(_12c);}}}}}if(_129.refreshTargetId){_128=_129.refreshTargetId;}if(_129.onStart){if(typeof _129.onStart=="function"){_129.onStart();}else{eval(_129.onStart);}}var _12d=function xfpre_l(_12e,_12f){if(_128&&_128!="@none"){XSP._replaceNode(_128,_12e);XSP.allowSubmit();if(_129.onComplete){if(typeof _129.onComplete=="function"){_129.onComplete();}else{eval(_129.onComplete);}}}return _12e;};var _130=function xfpre_e(_131,_132){XSP.allowSubmit();console.log("Partial Refresh error. response:");console.dir(_131);console.log("Partial Refresh error. ioArgs:");console.dir(_132);if(_129.onError){if(typeof _129.onError=="function"){_129.onError();}else{eval(_129.onError);}}else{var txt=XSP.getMessage("areaProblem");if(typeof _131.message!="undefined"){txt+="   "+_131.message+"\n";}txt+=XSP.getMessage("submitPrompt");if(XSP.confirm(txt)){var form=XSP.findForm(_128);if(null==form||typeof form.id=="undefined"){document.forms[0].submit();}else{document.forms[form.id].submit();}}}return _131;};if(_126=="get"){_12a+="&"+"$$viewid="+form["$$viewid"].value;dojo.xhrGet({url:_12a,handleAs:"text",timeout:XSP.submitLatency,load:_12d,error:_130});}else{dojo.xhrPost({url:_12a,handleAs:"text",form:form,timeout:XSP.submitLatency,load:_12d,error:_130,content:_129.params});}};this._replaceNode=function x_rn(_135,_136){var _137=null;var _138=null;if(typeof dijit!="undefined"&&typeof dijit.byId!="undefined"){_138=dijit.byId(_135);if(null!=_138){_137=_138.domNode;var _139=dijit.byId(_135+"_Container");if(null!=_139){_138=_139;_137=_139.domNode;}}}if(null==_137){_137=dojo.byId(_135);}if(null==_137){var msg=XSP.getMessage("noElementId");msg=dojo.string.substitute(msg,[_135]);var ex={message:msg};ex.description=ex.message;throw ex;}var _13c;var _13d=_137.nodeName.toUpperCase();var isTD=_13d=="TD";if(isTD&&dojo.isIE){_13c=XSP._replaceIETableData;}else{if(isTD&&dojo.isSafari){_13c=XSP._replaceSafariTableData;}else{_13c=XSP._replaceNormal;}}_13c.replaceNode(_137,_136,_138);if(typeof dojo.parser!="undefined"){dojo.forEach(_13c.findNewElements(),function xrn_fe1(node){if(null!=node.getAttribute("dojoType")){dojo.parser.instantiate([node]);}dojo.parser.parse(node);});}dojo.forEach(_13c.findNewElements(),function xrn_fe2(node){var f=function xrnfe2_fe(_142){if(_142.type="text/javascript"){dojo.eval(_142.innerHTML);}};var _143=dojo.query("script",node);if(node.nodeName.toLowerCase()=="script"){f(node);}_143.forEach(f);});this._loaded();this._removeScriptsAfterPartial(_13c);_13c.clear();};this._removeScriptsAfterPartial=function x_rs(_144){if(dojo.config.isDebug){return;}var _145=_144.findNewElements();while(_145.length>0){var node=_145.pop();if(node.nodeName.toLowerCase()=="script"){node.parentNode.removeChild(node);}}};this._replaceNormal={parent:null,before:null,after:null,replaceNode:function x_rn(_147,_148,_149){dojo.query("[widgetId]",_147).forEach(function xrnl_fe(n){var w=dijit.byNode(n);if(w!=null){w.destroy();}});div=dojo.doc.createElement("div");_147.parentNode.insertBefore(div,_147);if(null!=_149){_149.destroy();}else{_147.parentNode.removeChild(_147);}_147=null;div.innerHTML=_148;this.parent=div.parentNode;this.before=div.previousSibling;this.after=div.nextSibling;while(div.childNodes.length>0){var _14c=div.childNodes.item(0);this.parent.insertBefore(_14c,div);}this.parent.removeChild(div);div=null;},findNewElements:function xrnl_fne(){return XSP._elementsBetween(this.parent,this.before,this.after);},clear:function xrnl_c(){this.parent=null;this.before=null;this.after=null;}};this._replaceIETableData={tableData:null,replaceNode:function x_rietd(_14d,_14e,_14f){this.tableData=_14d;dojo.query("[widgetId]",_14d).forEach(function xrietd_fe(n){var w=dijit.byNode(n);if(w!=null){w.destroy();}});while(_14d.childNodes.length>0){var _152=_14d.childNodes.item(0);_14d.removeChild(_152);}_14d.innerHTML=_14e;},findNewElements:function xreietd_fne(){var _153=new Array();var _154=this.tableData.childNodes;var len=_154.length;for(var i=0;i<len;i++){var _157=_154.item(i);if(_157.nodeType==1){_153.push(_157);}}return _153;},clear:function xreitd_c(){this.tableData=null;}};this._replaceSafariTableData={parent:null,before:null,after:null,replaceNode:function xrstd_rn(_158,_159,_15a){dojo.query("[widgetId]",_158).forEach(function xrstdrn_fe(n){var w=dijit.byNode(n);if(w!=null){w.destroy();}});while(_158.childNodes.length>0){var _15d=_158.childNodes.item(0);_158.removeChild(_15d);}_158.innerHTML=_159;this.parent=_158.parentNode;this.before=_158.previousSibling;this.after=_158.nextSibling;while(_158.childNodes.length>0){var _15d=_158.childNodes.item(0);this.parent.insertBefore(_15d,_158);}this.parent.removeChild(_158);},findNewElements:function xrstd_fne(){return XSP._elementsBetween(this.parent,this.before,this.after);},clear:function xrstd_c(){this.parent=null;this.before=null;this.after=null;}};this._elementsBetween=function x_eb(_15e,_15f,_160){var _161=new Array();var _162;if(null!=_15f){_162=_15f.nextSibling;}else{_162=_15e.firstChild;}while(null!=_162&&_162!=_160){if(_162.nodeType==1){_161.push(_162);}_162=_162.nextSibling;}return _161;};this.attachSimpleConfirmSumbit=function x_ascs2(_163,_164,_165,_166){attachSimpleConfirmSubmit(_163,_164,_165,_166);};this.attachSimpleConfirmSubmit=function x_ascs(_167,_168,_169,_16a){if(_168==null){_168=_167;}var _16b=dojo.byId(_168);dojo.connect(_16b,_169,function xascs_fscs(_16c){XSP._fireSimpleConfirmSubmit(_167,_168,_16a);});};this._fireSimpleConfirmSubmit=function x_fscs(_16d,_16e,_16f){if(!this.canSubmit()){return false;}var form=this.findForm(targetId);if(form!=null){if(XSP.confirm(_16f)){document.forms[form.id]["$$xspsubmitid"].value=_16d;document.forms[form.id]["$$xspsubmitscroll"].value=this._scrollPosition();document.forms[form.id].submit();}}return false;};this.attachClientFunction=function x_acf(_171,_172,_173){var node=dojo.byId(_171);dojo.connect(node,_172,function xacf_cssn(_175){_173(_175);});};this.attachClientScript=function x_acs(_176,_177,_178){var node=dojo.byId(_176);dojo.connect(node,_177,function xacs_e(_17a){eval(_178);});};this.initSectionScript=function x_iss(_17b,_17c,_17d){if(_17d){var _17e=dojo.byId(_17c+"_open");var _17f=dojo.byId(_17c+"_close");var _180=dojo.byId(_17c+"_contents");var _181="none"!=_180.style.display;if(_181){_17e.style.display="inline";_17f.style.display="none";if(!dojo.isIE){var _182=dojo.byId(_17c+"_lk_open");var _183=dojo.byId(_17c+"_lk_close");XSP._moveAttr(_183,_182,"accesskey");XSP._moveAttr(_183,_182,"tabindex");}}else{_17e.style.display="none";_17f.style.display="inline";}if(dojo.isIE){var _183=dojo.byId(_17c+"_lk_close");var _184=_183.getAttribute("accesskey");_183.removeAttribute("accesskey");_183.setAttribute("accessKey",_184);var _185=_183.getAttribute("tabindex");_183.removeAttribute("tabindex");_183.setAttribute("tabIndex",_185);if(_181){var _182=dojo.byId(_17c+"_lk_open");XSP._moveAttr(_183,_182,"accessKey");XSP._moveAttr(_183,_182,"tabIndex");}}}var node=dojo.byId(_17b);dojo.connect(node,"onclick",function xiss_oc(_187){XSP.showSection(_17c,_17d);});dojo.connect(node,"onkeyup",function xiss_oku(_188){if(_188.keyCode==13||_188.keyCode==32){XSP.showSection(_17c,_17d);}});};this.publishEvent=function x_pubv(_189,_18a,_18b){},this.dispatchEvent=function x_dspv(_18c,name,_18e,_18f){var l=dojo.query(".XspHandler-"+name);if(l.length>0){var o=new Object();o.name=name;o.source=_18c;o.value=_18e;o.nativeEvent=_18f;this._submitValue=_18e;for(var i=0;i<l.length;i++){l[i].onclick(o);}this._submitValue=undefined;}},this.setComponentMode=function x_setp(mode,_194){},this.addOnLoad=function x_aol(_195){if(!this._listeningForDojoOnload){this._listeningForDojoOnload=true;dojo.addOnLoad(this,"_loaded");}this._onLoadListeners.push(_195);};this._loaded=function x_l(){dojo.forEach(this._onLoadListeners,function xl_l(_196){_196();});this._onLoadListeners=[];};this.attachViewColumnCheckboxToggler=function x_avcct(_197,_198){var _199=_198+":_hdrcbox";var cbox=dojo.byId(_199);dojo.connect(cbox,"onclick",function xavcct_c(){XSP._toggleViewColumnCheckBoxes(_197,_198);});XSP._toggleViewColumnCheckBoxes(_197,_198);};this._toggleViewColumnCheckBoxes=function x_tvccb(_19b,_19c){var form=this.findForm(_19b);if(form!=null){var cbox=this.getElementById(_19c+":_hdrcbox");if(cbox==null){return;}for(var i=0;i<form.length;i++){var elt=form.elements[i];var id=elt.id;if(this.startsWith(id,_19b)&&(this.endsWith(id,":_colcbox")||this.endsWith(id,":_hdrcbox"))){elt.checked=cbox.checked;}}}return false;};this.isViewPanelRowSelected=function x_ivprs(_1a2,_1a3){var form=this.findForm(_1a2);if(form!=null){for(var i=0;i<form.length;i++){var elt=form.elements[i];var id=elt.id;if(this.startsWith(id,_1a2)&&this.endsWith(id,_1a3)){if(elt.checked){return true;}}}}return false;};this.showSection=function x_ss(_1a8,show){var _1aa=dojo.byId(_1a8+"_open");var _1ab=dojo.byId(_1a8+"_close");var _1ac=dojo.byId(_1a8+"_lk_open");var _1ad=dojo.byId(_1a8+"_lk_close");var _1ae=dojo.byId(_1a8+"_contents");var form=this.findForm(_1a8);if(_1aa&&_1ab&&_1ac&&_1ad&&_1ae&&form){if(show){_1aa.style.display="inline";_1ab.style.display="none";_1ae.style.display="block";form.elements[_1a8+"_closed"].value="false";}else{_1aa.style.display="none";_1ab.style.display="inline";_1ae.style.display="none";form.elements[_1a8+"_closed"].value="true";}var _1b0=show?_1ad:_1ac;var _1b1=show?_1ac:_1ad;XSP._moveAttr(_1b0,_1b1,(dojo.isIE?"accessKey":"accesskey"));XSP._moveAttr(_1b0,_1b1,(dojo.isIE?"tabIndex":"tabindex"));if(_1b1.focus){_1b1.focus();}}};this._moveAttr=function x_ma(_1b2,_1b3,_1b4){_1b3.setAttribute(_1b4,_1b2.getAttribute(_1b4));_1b2.removeAttribute(_1b4);};this.findForm=function x_ff(_1b5){if(typeof _1b5=="string"){var node=this.getElementById(_1b5);if(!node&&typeof dijit!="undefined"&&typeof dijit.byId!="undefined"){node=dijit.byId(_1b5);if(node){node=node.domNode;}}_1b5=node;}while(_1b5){if(_1b5.tagName.toLowerCase()=="form"){return _1b5;}if(_1b5.tagName.toLowerCase()=="body"){return null;}_1b5=_1b5.parentNode;}return null;};this.findParentByTag=function x_fp(_1b7,tag){if(typeof _1b7=="string"){var node=this.getElementById(_1b7);if(!node&&typeof dijit!="undefined"&&typeof dijit.byId!="undefined"){node=dijit.byId(_1b7);if(node){node=node.domNode;}}_1b7=node;}tag=tag.toLowerCase();while(_1b7){var _1ba=_1b7.tagName.toLowerCase();if(_1ba==tag){return _1b7;}if(_1ba=="body"){return null;}_1b7=_1b7.parentNode;}return null;};this.getElementById=function x_gbi(_1bb){return dojo.byId(_1bb);};this.startsWith=function x_sw(s,_1bd){if(s.length>=_1bd.length&&s.substring(0,_1bd.length)==_1bd){return true;}return false;};this.endsWith=function x_ew(s,_1bf){if(s.length>=_1bf.length&&s.substring(s.length-_1bf.length)==_1bf){return true;}return false;};this.serialize=function xm_ser(o){if(typeof o=="object"){return dojo.toJson(o);}return o.toString();};this.initTimeZoneCookie=function x_itzc(){var _1c1=new Date().getFullYear();var jan1=new Date(_1c1,0,1);var jul1=new Date(_1c1,6,1);var _1c4=jan1.getTimezoneOffset();var _1c5=jul1.getTimezoneOffset();var _1c6=_1c4+" "+_1c5;if(_1c4!=_1c5){var _1c7=new Date(_1c1,11,30);var _1c8=this._findDSTChangedDate(jan1,jul1);var end=this._findDSTChangedDate(jul1,_1c7);_1c6+=" "+_1c8.getMonth()+" "+_1c8.getDate()+" "+(_1c8.getHours()*3600000+_1c8.getMinutes()*60000);_1c6+=" "+end.getMonth()+" "+end.getDate()+" "+(end.getHours()*3600000+end.getMinutes()*60000);}document.cookie="xspTimeZone="+_1c6+"; path=/";};this._findDSTChangedDate=function x_fdcd(_1ca,end){var _1cc=_1ca.getTimezoneOffset();var _1cd=end.getTimezoneOffset();_1ca=_1ca.getTime();end=end.getTime();for(var loop=0;loop<100&&Math.abs(end-_1ca)>=60000;loop++){var mid=new Date((_1ca+end)/2);if(mid.getTimezoneOffset()==_1cc){_1ca=mid.getTime();}else{end=mid.getTime();}}var date=(_1ca+end)/2;return new Date(Math.round(date/60000)*60000);};this.toJson=function x_tjson(o){return dojo.toJson(o);};this.fromJson=function x_fjson(s){return dojo.fromJson(s);};this.log=function x_l(_1d3){if(!this.logWindow||this.logWindow.closed){var win=window.open("",null,"width=300,height=600,"+"scrollbars=yes,resizable=yes,status=no,"+"location=no,menubar=no,toolbar=no");if(!win){return;}var doc=win.document;doc.write("<html><head><title>"+"JavaScript Log"+"</title></head>"+"<body><br/></body></html>");doc.close();this.logWindow=win;}var _1d6=this.logWindow.document.createElement("pre");_1d6.appendChild(this.logWindow.document.createTextNode(_1d3));this.logWindow.document.body.insertBefore(_1d6,this.logWindow.document.body.childNodes[0]);};this.dumpObject=function x_dmp(obj,name,_1d9){if(arguments.length<2){name="object";}if(arguments.length<3){_1d9=1;}return this._dumpObject(obj,name,"",_1d9);};this._dumpObject=function x_dmp2(obj,name,_1dc,_1dd){if(_1dd<=0){return _1dc+name+": "+(obj?obj.toString():obj)+" (Maximum Depth Reached)\n";}if(typeof obj=="object"){var _1de=null;var _1df=_1dc+name+"\n";_1dc+="  ";for(var item in obj){try{_1de=obj[item];}catch(e){_1de="<error>";}if(typeof _1de=="object"){_1df+=this._dumpObject(_1de,item,_1dc,_1dd-1);}else{_1df+=_1dc+item+": "+_1de+"\n";}}return _1df;}else{return obj;}};};dojo.i18n._preloadLocalizations("ibm.xsp.widget.layout.nls.xspClientDojo",["ROOT","ar","ca","cs","da","de","de-de","el","en","en-gb","en-us","es","es-es","fi","fi-fi","fr","fr-fr","he","he-il","hu","it","it-it","ja","ja-jp","ko","ko-kr","nb","nl","nl-nl","pl","pt","pt-br","pt-pt","ru","sk","sl","sv","th","tr","xx","zh","zh-cn","zh-tw"]);
