1 2/** 3 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ 4 * 5 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: 6 * http://www.opensource.org/licenses/mit-license.php 7 * 8 */ 9if (typeof deconcept == "undefined") { 10 var deconcept = new Object(); 11} 12if (typeof deconcept.util == "undefined") { 13 deconcept.util = new Object(); 14} 15if (typeof deconcept.SWFObjectUtil == "undefined") { 16 deconcept.SWFObjectUtil = new Object(); 17} 18deconcept.SWFObject = function (_1, id, w, h, _5, c, _7, _8, _9, _a) { 19 if (!document.getElementById) { 20 return; 21 } 22 this.DETECT_KEY = _a ? _a : "detectflash"; 23 this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY); 24 this.params = new Object(); 25 this.variables = new Object(); 26 this.attributes = new Array(); 27 if (_1) { 28 this.setAttribute("swf", _1); 29 } 30 if (id) { 31 this.setAttribute("id", id); 32 } 33 if (w) { 34 this.setAttribute("width", w); 35 } 36 if (h) { 37 this.setAttribute("height", h); 38 } 39 if (_5) { 40 this.setAttribute("version", new deconcept.PlayerVersion(_5.toString().split("."))); 41 } 42 this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(); 43 if (!window.opera && document.all && this.installedVer.major > 7) { 44 deconcept.SWFObject.doPrepUnload = true; 45 } 46 if (c) { 47 this.addParam("bgcolor", c); 48 } 49 var q = _7 ? _7 : "high"; 50 this.addParam("quality", q); 51 this.setAttribute("useExpressInstall", false); 52 this.setAttribute("doExpressInstall", false); 53 var _c = (_8) ? _8 : window.location; 54 this.setAttribute("xiRedirectUrl", _c); 55 this.setAttribute("redirectUrl", ""); 56 if (_9) { 57 this.setAttribute("redirectUrl", _9); 58 } 59}; 60deconcept.SWFObject.prototype = {useExpressInstall:function (_d) { 61 this.xiSWFPath = !_d ? "expressinstall.swf" : _d; 62 this.setAttribute("useExpressInstall", true); 63}, setAttribute:function (_e, _f) { 64 this.attributes[_e] = _f; 65}, getAttribute:function (_10) { 66 return this.attributes[_10]; 67}, addParam:function (_11, _12) { 68 this.params[_11] = _12; 69}, getParams:function () { 70 return this.params; 71}, addVariable:function (_13, _14) { 72 this.variables[_13] = _14; 73}, getVariable:function (_15) { 74 return this.variables[_15]; 75}, getVariables:function () { 76 return this.variables; 77}, getVariablePairs:function () { 78 var _16 = new Array(); 79 var key; 80 var _18 = this.getVariables(); 81 for (key in _18) { 82 _16[_16.length] = key + "=" + _18[key]; 83 } 84 return _16; 85}, getSWFHTML:function () { 86 var _19 = ""; 87 if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { 88 if (this.getAttribute("doExpressInstall")) { 89 this.addVariable("MMplayerType", "PlugIn"); 90 this.setAttribute("swf", this.xiSWFPath); 91 } 92 _19 = "<embed type=\"application/x-shockwave-flash\" src=\"" + this.getAttribute("swf") + "\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\""; 93 _19 += " id=\"" + this.getAttribute("id") + "\" name=\"" + this.getAttribute("id") + "\" "; 94 var _1a = this.getParams(); 95 for (var key in _1a) { 96 _19 += [key] + "=\"" + _1a[key] + "\" "; 97 } 98 var _1c = this.getVariablePairs().join("&"); 99 if (_1c.length > 0) { 100 _19 += "flashvars=\"" + _1c + "\""; 101 } 102 _19 += "/>"; 103 } else { 104 if (this.getAttribute("doExpressInstall")) { 105 this.addVariable("MMplayerType", "ActiveX"); 106 this.setAttribute("swf", this.xiSWFPath); 107 } 108 _19 = "<object id=\"" + this.getAttribute("id") + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\">"; 109 _19 += "<param name=\"movie\" value=\"" + this.getAttribute("swf") + "\" />"; 110 var _1d = this.getParams(); 111 for (var key in _1d) { 112 _19 += "<param name=\"" + key + "\" value=\"" + _1d[key] + "\" />"; 113 } 114 var _1f = this.getVariablePairs().join("&"); 115 if (_1f.length > 0) { 116 _19 += "<param name=\"flashvars\" value=\"" + _1f + "\" />"; 117 } 118 _19 += "</object>"; 119 } 120 return _19; 121}, write:function (_20) { 122 if (this.getAttribute("useExpressInstall")) { 123 var _21 = new deconcept.PlayerVersion([6, 0, 65]); 124 if (this.installedVer.versionIsValid(_21) && !this.installedVer.versionIsValid(this.getAttribute("version"))) { 125 this.setAttribute("doExpressInstall", true); 126 this.addVariable("MMredirectURL", escape(this.getAttribute("xiRedirectUrl"))); 127 document.title = document.title.slice(0, 47) + " - Flash Player Installation"; 128 this.addVariable("MMdoctitle", document.title); 129 } 130 } 131 if (this.skipDetect || this.getAttribute("doExpressInstall") || this.installedVer.versionIsValid(this.getAttribute("version"))) { 132 var n = (typeof _20 == "string") ? document.getElementById(_20) : _20;
133 n.innerHTML = this.getSWFHTML(); 134 return true; 135 } else { 136 if (this.getAttribute("redirectUrl") != "") { 137 document.location.replace(this.getAttribute("redirectUrl")); 138 } 139 } 140 return false; 141}}; 142deconcept.SWFObjectUtil.getPlayerVersion = function () { 143 var _23 = new deconcept.PlayerVersion([0, 0, 0]); 144 if (navigator.plugins && navigator.mimeTypes.length) { 145 var x = navigator.plugins["Shockwave Flash"]; 146 if (x && x.description) { 147 _23 = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")); 148 } 149 } else { 150 if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0) { 151 var axo = 1; 152 var _26 = 3; 153 while (axo) { 154 try { 155 _26++; 156 axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + _26); 157 _23 = new deconcept.PlayerVersion([_26, 0, 0]); 158 } 159 catch (e) { 160 axo = null; 161 } 162 } 163 } else { 164 try { 165 var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); 166 } 167 catch (e) { 168 try { 169 var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); 170 _23 = new deconcept.PlayerVersion([6, 0, 21]); 171 axo.AllowScriptAccess = "always"; 172 } 173 catch (e) { 174 if (_23.major == 6) { 175 return _23; 176 } 177 } 178 try { 179 axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); 180 } 181 catch (e) { 182 } 183 }
184 if (axo != null) { 185 _23 = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(",")); 186 } 187 } 188 } 189 return _23; 190}; 191deconcept.PlayerVersion = function (_29) { 192 this.major = _29[0] != null ? parseInt(_29[0]) : 0; 193 this.minor = _29[1] != null ? parseInt(_29[1]) : 0; 194 this.rev = _29[2] != null ? parseInt(_29[2]) : 0; 195}; 196deconcept.PlayerVersion.prototype.versionIsValid = function (fv) { 197 if (this.major < fv.major) { 198 return false; 199 } 200 if (this.major > fv.major) { 201 return true; 202 } 203 if (this.minor < fv.minor) { 204 return false; 205 } 206 if (this.minor > fv.minor) { 207 return true; 208 } 209 if (this.rev < fv.rev) { 210 return false; 211 } 212 return true; 213}; 214deconcept.util = {getRequestParameter:function (_2b) { 215 var q = document.location.search || document.location.hash; 216 if (_2b == null) { 217 return q; 218 } 219 if (q) { 220 var _2d = q.substring(1).split("&"); 221 for (var i = 0; i < _2d.length; i++) { 222 if (_2d[i].substring(0, _2d[i].indexOf("=")) == _2b) { 223 return _2d[i].substring((_2d[i].indexOf("=") + 1)); 224 } 225 } 226 } 227 return ""; 228}}; 229deconcept.SWFObjectUtil.cleanupSWFs = function () { 230 var _2f = document.getElementsByTagName("OBJECT"); 231 for (var i = _2f.length - 1; i >= 0; i--) { 232 _2f[i].style.display = "none"; 233 for (var x in _2f[i]) { 234 if (typeof _2f[i][x] == "function") { 235 _2f[i][x] = function () { 236 }; 237 } 238 } 239 } 240}; 241if (deconcept.SWFObject.doPrepUnload) { 242 if (!deconcept.unloadSet) { 243 deconcept.SWFObjectUtil.prepUnload = function () { 244 __flash_unloadHandler = function () { 245 }; 246 __flash_savedUnloadHandler = function () { 247 }; 248 window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs); 249 }; 250 window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload); 251 deconcept.unloadSet = true; 252 } 253} 254if (!document.getElementById && document.all) { 255 document.getElementById = function (id) { 256 return document.all[id]; 257 }; 258} 259var getQueryParamValue = deconcept.util.getRequestParameter; 260var FlashObject = deconcept.SWFObject; 261var SWFObject = deconcept.SWFObject; 262
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.