(function(){var A=Ext.ux.Media;A.Flash=Ext.extend(A,{constructor:function(){A.Flash.superclass.constructor.apply(this,arguments);},SWFObject:null,varsName:"flashVars",mediaType:Ext.apply({tag:"object",cls:"x-media x-media-swf",type:"application/x-shockwave-flash",data:"@url",loop:null,scripting:"sameDomain",start:true,unsupportedText:{cn:["The Adobe Flash Player{0}is required. Current Version:{1}",{tag:"br"},{tag:"a",cn:"The free download is available here.",href:"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash",target:"_flash"}]},params:{movie:"@url",play:"@start",loop:"@loop",menu:"@controls",quality:"high",bgcolor:"#FFFFFF",wmode:"opaque",allowscriptaccess:"@scripting"}},Ext.isIE?{classid:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",codebase:"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"}:false),getMediaType:function(){return this.mediaType;},initMedia:function(){var I=Ext.apply({url:false},this.mediaCfg||{});if(I.url){var G=(this.requiredVersion=I.requiredVersion||this.requiredVersion||false);var B=!!(this.playerVersion=this.detectVersion());var E=B&&(G?this.assertVersion(G):true);var D=this.assert(I.unsupportedText||this.unsupportedText||(this.getMediaType()||{}).unsupportedText,null);if(D){D=Ext.DomHelper.markup(D);D=I.unsupportedText=String.format(D,(G?" "+G+" ":" "),(this.playerVersion?" "+this.playerVersion+" ":" Not installed."));}if(!E){var C=B&&this.assertVersion("6.0.65");if(C&&I.installUrl){I=I.installDescriptor||{tag:"object",cls:"x-media x-media-swf",id:"SWFInstaller",type:"application/x-shockwave-flash",data:"@url",url:I.installUrl,width:(parseInt(I.width,10)||0)<215?215:I.width,height:(parseInt(I.height,10)||0)<138?138:I.height,loop:false,start:true,unsupportedText:D,params:{quality:"high",movie:"@url",allowScriptAcess:"always",align:"middle",bgcolor:"#3A6EA5",pluginspage:I.pluginsPage||this.pluginsPage||"http://www.adobe.com/go/getflashplayer"}};I.params[this.varsName]="MMredirectURL="+(I.installRedirect||window.location)+"&MMplayerType="+(Ext.isIE?"ActiveX":"Plugin")+"&MMdoctitle="+(document.title=document.title.slice(0,47)+" - Flash Player Installation");}else{I.url=null;}}if(I.eventSynch){I.params||(I.params={});var H=I.params[this.varsName]||(I.params[this.varsName]={});if(typeof H=="string"){H=Ext.urlDecode(H,true);}var F=(I.eventSynch===true?{allowedDomain:H.allowedDomain||document.location.hostname,elementID:I.id||(I.id=Ext.id()),eventHandler:"Ext.ux.Media.Flash.eventSynch"}:I.eventSynch);Ext.apply(I.params,{allowscriptaccess:"always"})[this.varsName]=Ext.applyIf(H,F);}delete I.requiredVersion;delete I.installUrl;delete I.installRedirect;delete I.installDescriptor;delete I.eventSynch;}I.mediaType="SWF";this.mediaCfg=I;A.Flash.superclass.initMedia.call(this);},onAfterMedia:function(){A.Flash.superclass.onAfterMedia.apply(this,arguments);if(this.SWFObject=this.getInterface()){this.mediaObject.owner=this;}},assertVersion:function(D){var C;D||(D=[]);if(Ext.isArray(D)){C=D;}else{C=String(D).split(".");}C=(C.concat([0,0,0,0])).slice(0,3);var B;if(!(B=this.playerVersion||(this.playerVersion=this.detectVersion()))){return false;}if(B.major>parseFloat(C[0])){return true;}else{if(B.major==parseFloat(C[0])){if(B.minor>parseFloat(C[1])){return true;}else{if(B.minor==parseFloat(C[1])){if(B.rev>=parseFloat(C[2])){return true;}}}}}return false;},detectVersion:function(){if(this.mediaVersion){return this.mediaVersion;}var B=false;var C=function(F){return F&&!!F.length?{major:F[0]!=null?parseInt(F[0],10):0,minor:F[1]!=null?parseInt(F[1],10):0,rev:F[2]!=null?parseInt(F[2],10):0,toString:function(){return this.major+"."+this.minor+"."+this.rev;}}:false;};if(Ext.isIE){var D=null;try{D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(E){try{D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");B=[6,0,21];D.allowscriptaccess="always";}catch(E){if(B&&B[0]==6){return C(B);}}try{D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(E){}}if(D){B=D.GetVariable("$version").split(" ")[1].split(",");}}else{if(navigator.plugins&&navigator.mimeTypes.length){var D=navigator.plugins["Shockwave Flash"];if(D&&D.description){B=D.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".");}}}return this.mediaVersion=C(B);},_applyFixes:function(){if(Ext.isIE&&this.mediaObject){this.mediaVersion||(this.detectVersion());if(this.mediaVersion&&this.mediaVersion.major>7){var C=this.mediaObject.dom;C.style.display="none";for(var B in C){if(typeof C[B]=="function"){C[B]=Ext.emptyFn;}}}}},clearMedia:function(){this._applyFixes();A.Flash.superclass.clearMedia.call(this);this.SWFObject=null;},getSWFObject:function(){return this.getInterface();},_handleSWFEvent:function(B,D){var C=D.type||D||false;if(C){return this.fireEvent(C,this,B,D);}}});A.Flash.eventSynch=function(B,D){var C=Ext.get(B);if(C&&C.owner){return C.owner._handleSWFEvent.call(C.owner,C.dom,D);}};Ext.ux.FlashComponent=Ext.extend(Ext.ux.MediaComponent,{ctype:"Ext.ux.FlashComponent",getId:function(){return this.id||(this.id="flash-comp"+(++Ext.Component.AUTO_ID));}});Ext.apply(Ext.ux.FlashComponent.prototype,A.Flash.prototype);Ext.reg("uxflash",Ext.ux.FlashComponent);A.Panel.Flash=Ext.extend(A.Panel,{ctype:"Ext.ux.Media.Panel.Flash"});Ext.apply(A.Panel.Flash.prototype,A.Flash.prototype);Ext.reg("flashpanel",Ext.ux.MediaPanel.Flash=Ext.ux.FlashPanel=A.Panel.Flash);Ext.reg("uxflashpanel",A.Panel.Flash);Ext.ux.FlashWindow=A.Window.Flash=Ext.extend(A.Window,{ctype:"Ext.ux.FlashWindow"});Ext.apply(A.Window.Flash.prototype,A.Flash.prototype);})();
