1/** 2 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ 3 * 4 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License: 5 * http://www.opensource.org/licenses/mit-license.php 6 * 7 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for 8 * legal reasons. 9 */ 10if(typeof deconcept=="undefined"){var deconcept=new Object();} 11if(typeof deconcept.util=="undefined"){deconcept.util=new Object();} 12if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();} 13deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;} 14this.DETECT_KEY=_b?_b:"detectflash"; 15this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY); 16this.params=new Object(); 17this.variables=new Object(); 18this.attributes=new Array(); 19if(_1){this.setAttribute("swf",_1);} 20if(id){this.setAttribute("id",id);} 21if(w){this.setAttribute("width",w);} 22if(h){this.setAttribute("height",h);} 23if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));} 24this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(); 25if(c){this.addParam("bgcolor",c);} 26var q=_8?_8:"high"; 27this.addParam("quality",q); 28this.setAttribute("useExpressInstall",_7); 29this.setAttribute("doExpressInstall",false); 30var _d=(_9)?_9:window.location; 31this.setAttribute("xiRedirectUrl",_d); 32this.setAttribute("redirectUrl",""); 33if(_a){this.setAttribute("redirectUrl",_a);}}; 34deconcept.SWFObject.prototype={setAttribute:function(_e,_f){ 35this.attributes[_e]=_f; 36},getAttribute:function(_10){ 37return this.attributes[_10]; 38},addParam:function(_11,_12){ 39this.params[_11]=_12; 40},getParams:function(){ 41return this.params; 42},addVariable:function(_13,_14){ 43this.variables[_13]=_14; 44},getVariable:function(_15){ 45return this.variables[_15]; 46},getVariables:function(){ 47return this.variables; 48},getVariablePairs:function(){ 49var _16=new Array(); 50var key; 51var _18=this.getVariables(); 52for(key in _18){_16.push(key+"="+_18[key]);} 53return _16;},getSWFHTML:function(){var _19=""; 54if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){ 55if(this.getAttribute("doExpressInstall")){ 56this.addVariable("MMplayerType","PlugIn");} 57_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\""; 58_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" "; 59var _1a=this.getParams(); 60for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";} 61var _1c=this.getVariablePairs().join("&"); 62if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>"; 63}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");} 64_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">"; 65_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />"; 66var _1d=this.getParams(); 67for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";} 68var _1f=this.getVariablePairs().join("&"); 69if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";} 70return _19; 71},write:function(_20){ 72if(this.getAttribute("useExpressInstall")){ 73var _21=new deconcept.PlayerVersion([6,0,65]); 74if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){ 75this.setAttribute("doExpressInstall",true); 76this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl"))); 77document.title=document.title.slice(0,47)+" - Flash Player Installation"; 78this.addVariable("MMdoctitle",document.title);}} 79if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){ 80var n=(typeof _20=="string")?document.getElementById(_20):_20; 81n.innerHTML=this.getSWFHTML();return true; 82}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}} 83return false;}}; 84deconcept.SWFObjectUtil.getPlayerVersion=function(){ 85var _23=new deconcept.PlayerVersion([0,0,0]); 86if(navigator.plugins&&navigator.mimeTypes.length){ 87var x=navigator.plugins["Shockwave Flash"]; 88if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));} 89}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");} 90catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); 91_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";} 92catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");} 93catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}} 94return _23;}; 95deconcept.PlayerVersion=function(_27){ 96this.major=_27[0]!=null?parseInt(_27[0]):0; 97this.minor=_27[1]!=null?parseInt(_27[1]):0; 98this.rev=_27[2]!=null?parseInt(_27[2]):0; 99}; 100deconcept.PlayerVersion.prototype.versionIsValid=function(fv){ 101if(this.major<fv.major){return false;} 102if(this.major>fv.major){return true;} 103if(this.minor<fv.minor){return false;} 104if(this.minor>fv.minor){return true;} 105if(this.rev<fv.rev){ 106return false; 107}return true;}; 108deconcept.util={getRequestParameter:function(_29){ 109var q=document.location.search||document.location.hash; 110if(q){var _2b=q.substring(1).split("&"); 111for(var i=0;i<_2b.length;i++){ 112if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){ 113return _2b[i].substring((_2b[i].indexOf("=")+1));}}} 114return "";}}; 115deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;} 116var _2d=document.getElementsByTagName("OBJECT"); 117for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){ 118if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}}; 119deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){}; 120__flash_savedUnloadHandler=function(){}; 121if(typeof window.onunload=="function"){ 122var _30=window.onunload; 123window.onunload=function(){ 124deconcept.SWFObjectUtil.cleanupSWFs();_30();}; 125}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}}; 126if(typeof window.onbeforeunload=="function"){ 127var oldBeforeUnload=window.onbeforeunload; 128window.onbeforeunload=function(){ 129deconcept.SWFObjectUtil.prepUnload(); 130oldBeforeUnload();}; 131}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;} 132if(Array.prototype.push==null){ 133Array.prototype.push=function(_31){ 134this[this.length]=_31; 135return this.length;};} 136var getQueryParamValue=deconcept.util.getRequestParameter; 137var FlashObject=deconcept.SWFObject; 138var SWFObject=deconcept.SWFObject; 139