/*
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
dojo._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.embed.Flash"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.embed.Flash"]){_4._hasResource["dojox.embed.Flash"]=true;_4.provide("dojox.embed.Flash");(function(){var _7,_8;var _9=9;var _a="dojox-embed-flash-",_b=0;var _c={expressInstall:false,width:320,height:240,swLiveConnect:"true",allowScriptAccess:"sameDomain",allowNetworking:"all",style:null,redirect:null};function _d(_e){_e=_4.delegate(_c,_e);if(!("path" in _e)){return null;}if(!("id" in _e)){_e.id=(_a+_b++);}return _e;};if(_4.isIE){_7=function(_f){_f=_d(_f);if(!_f){return null;}var p;var _10=_f.path;if(_f.vars){var a=[];for(p in _f.vars){a.push(p+"="+_f.vars[p]);}_f.params.FlashVars=a.join("&");delete _f.vars;}var s="";return {id:_f.id,markup:s};};_8=(function(){var _11=10,_12=null;while(!_12&&_11>7){try{_12=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_11--);}catch(e){}}if(_12){var v=_12.GetVariable("$version").split(" ")[1].split(",");return {major:(v[0]!=null)?parseInt(v[0]):0,minor:(v[1]!=null)?parseInt(v[1]):0,rev:(v[2]!=null)?parseInt(v[2]):0};}return {major:0,minor:0,rev:0};})();_4.addOnUnload(function(){var _13=function(){};var _14=_4.query("object").reverse().style("display","none").forEach(function(i){for(var p in i){if((p!="FlashVars")&&_4.isFunction(i[p])){try{i[p]=_13;}catch(e){}}}});});}else{_7=function(_15){_15=_d(_15);if(!_15){return null;}var p;var _16=_15.path;if(_15.vars){var a=[];for(p in _15.vars){a.push(p+"="+_15.vars[p]);}_15.params.flashVars=a.join("&");delete _15.vars;}var s="";return {id:_15.id,markup:s};};_8=(function(){var _17=navigator.plugins["Shockwave Flash"];if(_17&&_17.description){var v=_17.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".");return {major:(v[0]!=null)?parseInt(v[0]):0,minor:(v[1]!=null)?parseInt(v[1]):0,rev:(v[2]!=null)?parseInt(v[2]):0};}return {major:0,minor:0,rev:0};})();}_6.embed.Flash=function(_18,_19){if(location.href.toLowerCase().indexOf("file://")>-1){throw new Error("dojox.embed.Flash can't be run directly from a file. To instatiate the required SWF correctly it must be run from a server, like localHost.");}this.available=_6.embed.Flash.available;this.minimumVersion=_18.minimumVersion||_9;this.id=null;this.movie=null;this.domNode=null;if(_19){_19=_4.byId(_19);}setTimeout(_4.hitch(this,function(){if(_18.expressInstall||this.available&&this.available>=this.minimumVersion){if(_18&&_19){this.init(_18,_19);}else{this.onError("embed.Flash was not provided with the proper arguments.");}}else{if(!this.available){this.onError("Flash is not installed.");}else{this.onError("Flash version detected: "+this.available+" is out of date. Minimum required: "+this.minimumVersion);}}}),100);};_4.extend(_6.embed.Flash,{onReady:function(_1a){},onLoad:function(_1b){},onError:function(msg){},_onload:function(){clearInterval(this._poller);delete this._poller;delete this._pollCount;delete this._pollMax;this.onLoad(this.movie);},init:function(_1c,_1d){this.destroy();_1d=_4.byId(_1d||this.domNode);if(!_1d){throw new Error("dojox.embed.Flash: no domNode reference has been passed.");}var p=0,_1e=false;this._poller=null;this._pollCount=0;this._pollMax=15;this.pollTime=100;if(_6.embed.Flash.initialized){this.id=_6.embed.Flash.place(_1c,_1d);this.domNode=_1d;setTimeout(_4.hitch(this,function(){this.movie=this.byId(this.id,_1c.doc);this.onReady(this.movie);this._poller=setInterval(_4.hitch(this,function(){try{p=this.movie.PercentLoaded();}catch(e){}if(p==100){this._onload();}else{if(p==0&&this._pollCount++>this._pollMax){clearInterval(this._poller);throw new Error("Building SWF failed.");}}}),this.pollTime);}),1);}},_destroy:function(){try{this.domNode.removeChild(this.movie);}catch(e){}this.id=this.movie=this.domNode=null;},destroy:function(){if(!this.movie){return;}var _1f=_4.delegate({id:true,movie:true,domNode:true,onReady:true,onLoad:true});for(var p in this){if(!_1f[p]){delete this[p];}}if(this._poller){_4.connect(this,"onLoad",this,"_destroy");}else{this._destroy();}},byId:function(_20,doc){doc=doc||document;if(doc.embeds[_20]){return doc.embeds[_20];}if(doc[_20]){return doc[_20];}if(window[_20]){return window[_20];}if(document[_20]){return document[_20];}return null;}});_4.mixin(_6.embed.Flash,{minSupported:8,available:_8.major,supported:(_8.major>=_8.required),minimumRequired:_8.required,version:_8,initialized:false,onInitialize:function(){_6.embed.Flash.initialized=true;},__ie_markup__:function(_21){return _7(_21);},proxy:function(obj,_22){_4.forEach((_4.isArray(_22)?_22:[_22]),function(_23){this[_23]=_4.hitch(this,function(){return (function(){return eval(this.movie.CallFunction(""+""+_4.map(arguments,function(_24){return __flash__toXML(_24);}).join("")+""+""));}).apply(this,arguments||[]);});},obj);}});_6.embed.Flash.place=function(_25,_26){var o=_7(_25);_26=_4.byId(_26);if(!_26){_26=_4.doc.createElement("div");_26.id=o.id+"-container";_4.body().appendChild(_26);}if(o){_26.innerHTML=o.markup;return o.id;}return null;};_6.embed.Flash.onInitialize();})();}}};});