(function(){Ext.namespace("Ext.ux.Chart");var C=Ext.ux.Chart;var B=Ext.ux.Media;var A=Ext.extend(B.Flash,{requiredVersion:8,chartURL:null,dataXML:"<chart></chart>",dataURL:null,autoLoad:null,autoScroll:false,mediaCfg:{url:null,id:null,start:true,controls:true,height:null,width:null,autoSize:true,renderOnResize:true,scripting:"always",cls:"x-media x-media-swf x-chart-fusion",params:{wmode:"transparent",scale:"exactfit",scale:null,salign:null}},initMedia:function(){this.addEvents("chartload","chartrender");if(this.autoLoad){this.on("render",this.doAutoLoad,this);}A.superclass.initMedia.call(this);},onBeforeMedia:function(){var H=this.mediaCfg;var F=this.fusionCfg||{};var E=F.params||{};var G=E[this.varsName]||{};Ext.apply(H,F,{url:this.chartURL||null});Ext.apply(H.params,E,{wmode:"transparent",scale:"exactfit",salign:null});H.params[this.varsName]||(H.params[this.varsName]={});Ext.apply(H.params[this.varsName],E[this.varsName]||{},{chartWidth:"@width",chartHeight:"@height",debugMode:0,DOMId:"@id",registerWithJS:1,allowScriptAccess:"@scripting",lang:"EN",dataXML:this.dataXML||null,dataURL:this.dataURL||null});var D=(D=H.params[this.varsName]["dataURL"])?encodeURI(D):null;A.superclass.onBeforeMedia.call(this);},setDataXML:function(E,D){var F;this.dataXML=E;if((F=this.getInterface())&&D){F.SetVariable("_root.dataURL","");F.SetVariable("_root.isNewData","1");F.SetVariable("_root.newData",E);F.TGotoLabel("/","JavaScriptHandler");}},setDataURL:function(E,D){var G;var F=this.mediaCfg.params[this.varsName]||{};this.dataXML=null;this.dataURL=E;if((G=this.getInterface())&&D){G.setDataURL?G.setDataURL(E):this.load(E);}},load:function(E,I,M){var D,J,L,K,H;if(typeof E=="object"){J=E;E=J.url;I=I||J.params;M=M||J.callback;L=J.scope;D=J.method||"GET";H=J.disableCaching||false;K=J.timeout||30;}if(typeof E=="function"){E=E.call(this);}D=D||(I?"POST":"GET");if(D=="GET"){if(H){var G="_dc="+(new Date().getTime());if(E.indexOf("?")!==-1){E+="&"+G;}else{E+="?"+G;}}}var F=Ext.apply(J||{},{url:E,params:(typeof I=="function"&&L)?I.createDelegate(L):I,success:function(N){this.setDataXML(N.responseText,true);},failure:function(N){this.setDataXML("Failure",true);},scope:this,callback:M,timeout:(K*1000),argument:{"options":J,"url":E,"form":null,"callback":M,"scope":L||window,"params":I}});new (F.connectionClass||Ext.data.Connection)().request(F);return this;},doAutoLoad:function(){this.load(typeof this.autoLoad=="object"?this.autoLoad:{url:this.autoLoad});},print:function(){var D;if(D=this.getInterface()){D.print();}},_HchartOnRender:function(){this.fireEvent("chartrender",this,this.getInterface());},_HchartOnLoad:function(){this.fireEvent("chartload",this,this.getInterface());},loadMask:false});A.chartOnLoad=function(D){var E=Ext.get(D);if(E&&(E=E.owner)){E._HchartOnLoad.call(E);}};A.chartOnRender=function(D){var E=Ext.get(D);if(E&&(E=E.owner)){E._HchartOnRender.call(E);}};window.FC_Rendered=window.FC_Rendered?window.FC_Rendered.createInterceptor(A.chartOnRender):A.chartOnRender;window.FC_Loaded=window.FC_Loaded?window.FC_Loaded.createInterceptor(A.chartOnLoad):A.chartOnLoad;C.Fusion=Ext.extend(Ext.ux.FlashComponent,{ctype:"Ext.ux.Chart.Fusion"});Ext.apply(C.Fusion.prototype,A.prototype);Ext.reg("fusion",C.Fusion);C.Fusion.Panel=Ext.extend(Ext.ux.FlashPanel,{ctype:"Ext.ux.Chart.Fusion.Panel"});Ext.apply(C.Fusion.Panel.prototype,A.prototype);Ext.reg("fusionpanel",(Ext.ux.FusionPanel=C.Fusion.Panel));Ext.ux.FusionWindow=C.Fusion.Window=Ext.extend(Ext.ux.FlashWindow,{ctype:"Ext.ux.FusionWindow"});Ext.apply(C.Fusion.Window.prototype,A.prototype);})();