function flashembed(I,M,D){if(typeof I=="string"){I=document.getElementById(I)}var F={src:"#",width:"100%",height:"100%",version:null,loadEvent:null,onFail:null,expressInstall:null,allowfullscreen:true,allowscriptaccess:"always",quality:"high",bgcolor:"#ffffff",type:"application/x-shockwave-flash",pluginspage:"http://www.adobe.com/go/getflashplayer"};G(F,M);var L=F.loadEvent;F.loadEvent=null;if(L){I["on"+L]=function(){return K()}}else{return K()}function G(O,N){if(N){for(key in N){O[key]=N[key]}}}function K(){var N=E();var P=F.version;var Q=F.expressInstall;if(!I){return }if(!P||C(P)){F.onFail=F.version=F.expressInstall=null;I.innerHTML=A();return I.firstChild}else{if(F.onFail){var O=F.onFail.call(F,E(),D);if(O){I.innerHTML=O}}else{if(P&&Q&&C([6,0,65])){G(F,{src:Q});D={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};I.innerHTML=A()}else{if(I.innerHTML!=""){}else{I.innerHTML="<h2>Flash version "+P+" or greater is required</h2><h3>"+(N[0]>0?"Your version is "+N:"You have no flash plugin installed")+"</h3><p>Download latest version from <a href='"+F.pluginspage+"'>here</a></p>"}}}}I["on"+L]=null}function C(N){var O=E();return O[0]>=N[0]&&O[1]>=N[1]&&(O[2]==null||O[2]>=N[2])}function A(){var O="";if(typeof D=="function"){D=D()}if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){O='<embed type="application/x-shockwave-flash" ';G(F,{name:F.id});for(var N in F){if(F[N]!=null){O+=[N]+'="'+F[N]+'"\n\t'}}if(D){O+="flashvars='";for(var N in D){O+=[N]+"="+H(D[N])+"&"}O+="'"}O+="/>"}else{O='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';O+='width="'+F.width+'" height="'+F.height+'"';if(document.all&&parseInt(navigator.appVersion)<=6){F.id="_"+(""+Math.random()).substring(5)}if(F.id){O+=' id="'+F.id+'"'}O+=">";O+='\n\t<param name="movie" value="'+F.src+'" />';F.id=F.src=F.width=F.height=null;for(var N in F){if(F[N]!=null){O+='\n\t<param name="'+N+'" value="'+F[N]+'" />'}}if(D){O+='\n\t<param name="flashvars" value=\'';for(var N in D){O+=[N]+"="+H(D[N])+"&"}O+="' />"}O+="</object>"}return O}function E(){var O=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var N=navigator.plugins["Shockwave Flash"].description;if(typeof N!="undefined"){N=N.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var P=parseInt(N.replace(/^(.*)\..*$/,"$1"),10);var S=/r/.test(N)?parseInt(N.replace(/^.*r(.*)$/,"$1"),10):0;O=[P,S]}}else{if(window.ActiveXObject){try{var Q=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(R){try{var Q=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");O=[6,0];Q.AllowScriptAccess="always"}catch(R){if(O[0]==6){return }}try{var Q=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(R){}}if(typeof Q=="object"){var N=Q.GetVariable("$version");if(typeof N!="undefined"){N=N.replace(/^\S+\s+(.*)$/,"$1").split(",");O=[parseInt(N[0],10),parseInt(N[2],10)]}}}}return O}function H(O){switch(J(O)){case"string":return'"'+O.replace(new RegExp('(["\\\\])',"g"),"\\$1")+'"';case"array":return"["+B(O,function(Q){return H(Q)}).join(",")+"]";case"object":var P=[];for(var N in O){P.push('"'+N+'":'+H(O[N]))}return"{"+P.join(",")+"}"}return String(O).replace(/\s/g," ").replace(/\'/g,'"')}function J(O){if(O===null||O===undefined){return false}var N=typeof O;return(N=="object"&&O.push)?"array":N}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function B(N,Q){var P=[];for(var O in N){P[O]=Q(N[O])}return P}flashembed.getVersion=E;flashembed.isSupported=C;return I}if(typeof jQuery=="function"){(function(A){A.fn.extend({flashembed:function(C,B){return this.each(function(){new flashembed(this,C,B)})}})})(jQuery)};
