﻿if (typeof com == "undefined") { var com = new Object() } if (typeof com.deconcept == "undefined") { com.deconcept = new Object() } if (typeof com.deconcept.util == "undefined") { com.deconcept.util = new Object() } if (typeof com.deconcept.FlashObjectUtil == "undefined") { com.deconcept.FlashObjectUtil = new Object() } com.deconcept.FlashObject = function (L, B, M, D, H, J, F, E, C, K, I) { if (!document.createElement || !document.getElementById) { return } this.DETECT_KEY = I ? I : "detectflash"; this.skipDetect = com.deconcept.util.getRequestParameter(this.DETECT_KEY); this.params = new Object(); this.variables = new Object(); this.attributes = new Array(); this.useExpressInstall = F; if (L) { this.setAttribute("swf", L) } if (B) { this.setAttribute("id", B) } if (M) { this.setAttribute("width", M) } if (D) { this.setAttribute("height", D) } if (H) { this.setAttribute("version", new com.deconcept.PlayerVersion(H.toString().split("."))) } this.installedVer = com.deconcept.FlashObjectUtil.getPlayerVersion(this.getAttribute("version"), F); if (J) { this.addParam("bgcolor", J) } var A = E ? E : "high"; this.addParam("quality", A); var G = (C) ? C : window.location; this.setAttribute("xiRedirectUrl", G); this.setAttribute("redirectUrl", ""); if (K) { this.setAttribute("redirectUrl", K) } }; com.deconcept.FlashObject.prototype = { setAttribute: function (A, B) { this.attributes[A] = B }, getAttribute: function (A) { return this.attributes[A] }, addParam: function (B, A) { this.params[B] = A }, getParams: function () { return this.params }, addVariable: function (B, A) { this.variables[B] = A }, getVariable: function (A) { return this.variables[A] }, getVariables: function () { return this.variables }, createParamTag: function (C, A) { var B = document.createElement("param"); B.setAttribute("name", C); B.setAttribute("value", A); return B }, getVariablePairs: function () { var A = new Array(); var C; var B = this.getVariables(); for (C in B) { A.push(C + "=" + B[C]) } return A }, getFlashHTML: function () { var D = ""; if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn") } D = '<embed type="application/x-shockwave-flash" src="' + this.getAttribute("swf") + '" width="' + this.getAttribute("width") + '" height="' + this.getAttribute("height") + '"'; D += ' id="' + this.getAttribute("id") + '" name="' + this.getAttribute("id") + '" '; var C = this.getParams(); for (var E in C) { D += [E] + '="' + C[E] + '" ' } var A = this.getVariablePairs().join("&"); if (A.length > 0) { D += 'flashvars="' + A + '"' } D += "/>" } else { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX") } D = '<object id="' + this.getAttribute("id") + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + this.getAttribute("width") + '" height="' + this.getAttribute("height") + '">'; D += '<param name="movie" value="' + this.getAttribute("swf") + '" />'; var B = this.getParams(); for (var E in B) { D += '<param name="' + E + '" value="' + B[E] + '" />' } var F = this.getVariablePairs().join("&"); if (F.length > 0) { D += '<param name="flashvars" value="' + F + '" />' } D += "</object>" } return D }, write: function (B) { if (this.useExpressInstall) { var A = new com.deconcept.PlayerVersion([6, 0, 65]); if (this.installedVer.versionIsValid(A) && !this.installedVer.versionIsValid(this.getAttribute("version"))) { this.setAttribute("doExpressInstall", true); this.addVariable("MMredirectURL", escape(this.getAttribute("xiRedirectUrl"))); document.title = document.title.slice(0, 47) + " - Flash Player Installation"; this.addVariable("MMdoctitle", document.title) } } else { this.setAttribute("doExpressInstall", false) } if (this.skipDetect || this.getAttribute("doExpressInstall") || this.installedVer.versionIsValid(this.getAttribute("version"))) { var C = (typeof B == "string") ? document.getElementById(B) : B; C.innerHTML = this.getFlashHTML() } else { if (this.getAttribute("redirectUrl") != "") { document.location.replace(this.getAttribute("redirectUrl")) } } } }; com.deconcept.FlashObjectUtil.getPlayerVersion = function (F, E) { var D = new com.deconcept.PlayerVersion(0, 0, 0); if (navigator.plugins && navigator.mimeTypes.length) { var A = navigator.plugins["Shockwave Flash"]; if (A && A.description) { D = new com.deconcept.PlayerVersion(A.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")) } } else { try { var C = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); for (var B = 3; C != null; B++) { C = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + B); D = new com.deconcept.PlayerVersion([B, 0, 0]) } } catch (G) { } if (F && D.major > F.major) { return D } if (!F || ((F.minor != 0 || F.rev != 0) && D.major == F.major) || D.major != 6 || E) { try { D = new com.deconcept.PlayerVersion(C.GetVariable("$version").split(" ")[1].split(",")) } catch (G) { } } } return D }; com.deconcept.PlayerVersion = function (A) { this.major = parseInt(A[0]) || 0; this.minor = parseInt(A[1]) || 0; this.rev = parseInt(A[2]) || 0 }; com.deconcept.PlayerVersion.prototype.versionIsValid = function (A) { if (this.major < A.major) { return false } if (this.major > A.major) { return true } if (this.minor < A.minor) { return false } if (this.minor > A.minor) { return true } if (this.rev < A.rev) { return false } return true }; com.deconcept.util = { getRequestParameter: function (C) { var D = document.location.search || document.location.hash; if (D) { var B = D.indexOf(C + "="); var A = (D.indexOf("&", B) > -1) ? D.indexOf("&", B) : D.length; if (D.length > 1 && B > -1) { return D.substring(D.indexOf("=", B) + 1, A) } } return "" }, removeChildren: function (A) { while (A.hasChildNodes()) { A.removeChild(A.firstChild) } } }; if (Array.prototype.push == null) { Array.prototype.push = function (A) { this[this.length] = A; return this.length } } var getQueryParamValue = com.deconcept.util.getRequestParameter; var FlashObject = com.deconcept.FlashObject
