annotate e2gallerypro/nonverblaster/swfobject.js @ 24:d30806958168 judyates

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