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