Ext.namespace("Axi","Axi.UI");Axi.Messenger=function(){if(typeof Axi.Messenger.instance!="undefined"){return false}Axi.Messenger.instance=this;var A;var C=[];function D(){var F=Ext.DomHelper.insertFirst(document.body,{tag:"table",style:"z-index: 20000; width: 650px; left: 50%; margin-left: -325px; position: absolute;",html:'<tr><td id="x-message-container" align="center"></td></tr>'},true);var E=Ext.DomQuery.selectNode("#x-message-container");return E?E:false}function B(J,G,K){var F,E;if(!A){A=D()}F='<table class="x-axi-window-message x-axi-window-message-'+G+'" cellpadding="0" cellspacing="0"><tr><td class="x-box-ml"></td><td class="x-box-mc">'+J+'</td><td class="x-box-mr"><a href="#" class="close"></a></td></tr><tr><td class="x-box-bl"></td><td class="x-box-bc"></td><td class="x-box-br"></td></tr></table>';var I=Ext.DomQuery.select(".x-axi-window-message");if(!I.length){E=Ext.DomHelper.insertFirst(A,{html:F},true)}else{E=Ext.DomHelper.insertAfter(I[I.length-1].parentNode,{html:F},true)}C.push(E);E.slideIn("t").pause(K).slideOut("t",{callback:function(){C.shift()
},remove:true});var H=new Ext.Element(Ext.DomQuery.selectNode("a.close",E.dom));H.on("click",function(){var M=this.findParentNode("div");for(var L=C.length;L>0;--L){if(C[L-1]&&C[L-1].dom==M){C[L-1].stopFx();C[L-1].remove();C.remove(C[L-1]);break}}})}this.constructor=function(){};this.info=function(E){B(E,"info",5)};this.warn=function(E){B(E,"warning",10)};this.error=function(E){B(E,"error",10)};this.clearMessages=function(){for(var F=0,E=C.length;F<E;++F){if(C[F]){C[F].stopFx()}if(C[F]){C[F].remove()}}C=[]};this.getCounter=function(){return C.length};this.constructor.apply(this,arguments)};Axi.Messenger.instance;Axi.Messenger.getInstance=function(){return Axi.Messenger.instance};
