PageSourceSearch

https://awir.org/js/swfobject.js

js awir.org collected 2026-10-02 14:03:57 UTC 6,364 bytes, 128 lines download raw bytes

1/**
2 * SWFObject v1.4.1: 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){
14if(!document.createElement||!document.getElementById){return;}
15this.DETECT_KEY=_b?_b:"detectflash";
16this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
17this.params=new Object();
18this.variables=new Object();
19this.attributes=new Array();
20if(_1){this.setAttribute("swf",_1);}
21if(id){this.setAttribute("id",id);}
22if(w){this.setAttribute("width",w);}
23if(h){this.setAttribute("height",h);}
24if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
25this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
26if(c){this.addParam("bgcolor",c);}
27var q=_8?_8:"high";
28this.addParam("quality",q);
29this.setAttribute("useExpressInstall",_7);
30this.setAttribute("doExpressInstall",false);
31var _d=(_9)?_9:window.location;
32this.setAttribute("xiRedirectUrl",_d);
33this.setAttribute("redirectUrl","");
34if(_a){this.setAttribute("redirectUrl",_a);}};
35deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
36this.attributes[_e]=_f;
37},getAttribute:function(_10){
38return this.attributes[_10];
39},addParam:function(_11,_12){
40this.params[_11]=_12;
41},getParams:function(){
42return this.params;
43},addVariable:function(_13,_14){
44this.variables[_13]=_14;
45},getVariable:function(_15){
46return this.variables[_15];
47},getVariables:function(){
48return this.variables;
49},getVariablePairs:function(){
50var _16=new Array();
51var key;
52var _18=this.getVariables();
53for(key in _18){_16.push(key+"="+_18[key]);}
54return _16;
55},getSWFHTML:function(){
56var _19="";
57if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
58if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
59_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
60_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
61var _1a=this.getParams();
62for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
63var _1c=this.getVariablePairs().join("&");
64if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
65_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
66_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
67_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
68var _1d=this.getParams();
69for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
70var _1f=this.getVariablePairs().join("&");
71if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
72return _19;},write:function(_20){
73if(this.getAttribute("useExpressInstall")){
74var _21=new deconcept.PlayerVersion([6,0,65]);
75if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
76this.setAttribute("doExpressInstall",true);
77this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
78document.title=document.title.slice(0,47)+" - Flash Player Installation";
79this.addVariable("MMdoctitle",document.title);}}
80if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
81var n=(typeof _20=="string")?document.getElementById(_20):_20;
82n.innerHTML=this.getSWFHTML();return true;
83}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};
84deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){
85var _25=new deconcept.PlayerVersion([0,0,0]);
86if(navigator.plugins&&navigator.mimeTypes.length){
87var x=navigator.plugins["Shockwave Flash"];
88if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
89}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
90for(var i=3;axo!=null;i++){axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);_25=new deconcept.PlayerVersion([i,0,0]);}}
91catch(e){}
92if(_23&&_25.major>_23.major){return _25;}
93if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){
94try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
95catch(e){}}}return _25;};
96deconcept.PlayerVersion=function(_29){
97this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;
98this.minor=parseInt(_29[1])||0;
99this.rev=parseInt(_29[2])||0;};
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){return false;}return true;};
106deconcept.util={getRequestParameter:function(_2b){
107var q=document.location.search||document.location.hash;
108if(q){var _2d=q.indexOf(_2b+"=");
109var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;
110if(q.length>1&&_2d>-1){return q.substring(q.indexOf("=",_2d)+1,_2e);}}
111return "";}};
112deconcept.SWFObjectUtil.cleanupSWFs=function(){
113var _2f=document.getElementsByTagName("OBJECT");
114for(var i=0;i<_2f.length;i++){
115for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=null;}}}};
116if(typeof window.onunload=="function"){
117var oldunload=window.onunload;
118window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();oldunload();};
119}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}
120if(Array.prototype.push==null){
121Array.prototype.push=function(_32){
122this[this.length]=_32;
123return this.length;};}
124
125var getQueryParamValue = deconcept.util.getRequestParameter;
126var FlashObject = deconcept.SWFObject; // for backwards compatibility
127var SWFObject = deconcept.SWFObject;
128

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.