maskat.lang.Object.populate(maskat,{appInit:function(){maskat.core.Application.bootstrap()},loadLayoutFile:function(D,B,F){var E=/document\.getElementById\((['"])(.*)\1\)/;if(typeof (B)=="string"){var A=B.match(E);if(A){B=document.getElementById(RegExp.$2)}else{B=document.getElementById(B)}}F=F||(arguments.length<3);var C=maskat.app.loadLayout(D,null,B,F);this.lastLoadedLayout=C},showLayout:function(A){var B=maskat.app.getLayout(A);if(B){B.setVisible(true)}},hideLayout:function(A){var B=maskat.app.getLayout(A);if(B){B.setVisible(false)}},removeLayout:function(A){maskat.app.unloadLayout(A)},loadEventFile:function(C){var B=this.lastLoadedLayout;if(B){var A=maskat.event.EventXMLReader.getInstance().load(C);B.addEventListener(A);this.lastLoadedLayout=null;A.handleEvent(new maskat.event.Event(B,B,"onload"))}},loadJSFile:function(A){maskat.app.loadJavaScript(A,false)},loadJSSrc:function(A){maskat.app.loadJavaScriptFromString(A)},loadCSSFile:function(A){maskat.app.loadStyleSheet(A)},getFWLog:function(){return maskat.log.LogFactory.getLog("maskat.framework")},getCMULog:function(){return maskat.log.LogFactory.getLog("maskat.comm")},getAppLog:function(){return maskat.log.LogFactory.getLog("maskat.application")}});maskat.lang.Class.declare("maskat.compat.Maskat14SupportPlugin").extend("maskat.core.Plugin",{_static:{initialize:function(){maskat.core.Plugin.register(this)}},getPluginId:function(){return"compat"},getVersion:function(){return"2.1.1.v20090730"},getDependencies:function(){return["rialto","html"]},isLoaded:function(){return this.loaded},load:function(){this.loaded=true;if(window.onload){this.onload=window.onload;window.onload=null;try{delete window.onload}catch(A){}}},start:function(){var A=maskat.layout.LayoutXMLReader.getInstance();A.addWidgetLibrary(new maskat.widget.compat.CompatWidgetLibrary());maskat.layouts=maskat.app.layouts;if(this.onload){this.onload()}}});maskat.lang.Class.declare("maskat.widget.compat.CompatWidgetLibrary").extend("maskat.layout.WidgetLibrary",{getBindingConfiguration:function(){var A={confirmDialog:{type:maskat.widget.compat.ConfirmDialog,attributes:{name:{type:"string",required:true},title:{type:"string"},message:{type:"string"},btnOKTxt:{type:"string"},btnCancelTxt:{type:"string"},btnOnFocus:{type:"number",defaultValue:2},okFunc:{type:"function",property:"onOK"},cancelFunc:{type:"function",property:"onCancel"}}},endDialog:{type:maskat.widget.compat.EndDialog,attributes:{name:{type:"string",required:true},message:{type:"string",required:true}}}};return A}});maskat.lang.Class.declare("maskat.widget.compat.ConfirmDialog").extend("maskat.widget.rialto.RialtoWidgetWrapper",{createWidget:function(D){var C=getTailleTexte(this.title)+40;if(C<300){C=300}var A=new rialto.widget.PopUp(this.name,0,0,C,50,null,this.title,"Gris",{withCloseButon:false});this.widget=A;this.setVisible(false);var H=document.createElement("div");H.innerHTML=this.message;A.getHtmlCont().appendChild(H);var B=this;var G=new rialto.widget.Button(25,parseInt(C)/2-114,this.btnOKTxt,this.btnOKTxt,A);G.onclick=function(I){A.setVisible(false);if(B.onOK){B.onOK()}B.proceed()};G.getHtmlExt().tabIndex=32767;var F=new rialto.widget.Button(25,parseInt(C)/2+6,this.btnCancelTxt,this.btnCancelTxt,A);F.onclick=function(I){A.setVisible(false);if(B.onCancel){B.onCancel()}};F.getHtmlExt().tabIndex=32767;var E=function(I){maskat.key.KeyEventManager.getInstance().handle(I)};maskat.util.CrossBrowser.addEventListener(A.getHtmlExt(),"keydown",E)},handleKeyEvent:function(C){var A=C.target||C.srcElement;switch(C.keyCode){case 13:case 32:A.onclick(C);break;case 9:case 37:case 39:var B=this.widget.arrChild;var D=(B[0].getHtmlExt()===A?1:0);B[D].getHtmlExt().focus();break}return false},setParent:function(A){if(this.parent==A){return }this.parent=A},setVisible:function(A){if(A){this.widget.setTop((document.body.clientHeight-240)/2);this.widget.setLeft((document.body.clientWidth-this.widget.width)/2)}this.widget.setVisible(A);if(A){if(this.btnOnFocus==1){this.widget.arrChild[0].getHtmlExt().focus()}else{this.widget.arrChild[1].getHtmlExt().focus()}}},proceed:function(){}});maskat.lang.Class.declare("maskat.widget.compat.EndDialog").extend("maskat.widget.rialto.RialtoWidgetWrapper",{createWidget:function(A){},getElement:function(){return null},setParent:function(A){if(this.parent==A){return }this.parent=A},setVisible:function(C){if(C){this.widget=new rialto.widget.Alert(this.message);var A=this.widget.BQUIT.getHtmlExt();A.tabIndex=32767;A.focus();var B=function(E){var D=E.target||E.srcElement;switch(E.keyCode){case 13:case 32:D.onclick(E);break;case 9:if(E.preventDefault){E.preventDefault()}else{E.returnValue=false}if(E.stopPropagation){E.stopPropagation()}else{E.cancelBubble=true}break}};maskat.util.CrossBrowser.addEventListener(A,"keydown",B)}else{this.widget.fen.setVisible(false)}},dispose:function(){maskat.lang.Object.dispose(this)}});