var FlashObject = function(swf, id, w, h, ver, c) { this.swf = swf; this.id = id; this.width = w; this.height = h; this.version = ver; this.align = "middle"; this.params = new Object(); this.variables = new Object(); this.redirect = ""; this.sq = document.location.search.split("?")[1] || ""; this.bypassTxt = "
Already have Macromedia Flash Player? Click here if you have Flash Player " + this.version + " installed.
"; if (c) this.color = this.addParam('bgcolor', c); this.addParam('quality', 'high'); this.doDetect = getQueryParamValue('detectflash'); }; var FOP = FlashObject.prototype; FOP.addParam = function(name, value) { this.params[name] = value; }; FOP.getParams = function() { return this.params; }; FOP.getParam = function(name) { return this.params[name]; }; FOP.addVariable = function(name, value) { this.variables[name] = value; }; FOP.getVariable = function(name) { return this.variables[name]; }; FOP.getVariables = function() { return this.variables; }; FOP.getParamTags = function() { var paramTags = ""; for (var param in this.getParams()) paramTags += ''; return (paramTags == "") ? false : paramTags; }; FOP.getHTML = function() { var flashHTML = ""; if (navigator.plugins && navigator.mimeTypes.length) { flashHTML += ''; } else { // PC IE flashHTML += ''; } return flashHTML; }; FOP.getVariablePairs = function() { var variablePairs = new Array(); for (var name in this.getVariables()) variablePairs.push(name + "=" + escape(this.getVariable(name))); return (variablePairs.length > 0) ? variablePairs.join("&") : false; }; FOP.write = function(elementId) { if (detectFlash(this.version) || this.doDetect == 'false') { if (elementId) { document.getElementById(elementId).innerHTML = this.getHTML(); } else { document.write(this.getHTML()); } } else { if (this.redirect != "") { document.location.replace(this.redirect); } else if (this.altTxt) { if (elementId) { document.getElementById(elementId).innerHTML = this.altTxt + "" + this.bypassTxt; } else { document.write(this.altTxt + "" + this.bypassTxt); } } } }; function getFlashVersion() { var flashversion = 0; if (navigator.plugins && navigator.mimeTypes.length) { var x = navigator.plugins["Shockwave Flash"]; if (x && x.description) { var y = x.description; flashversion = (y.charAt(y.indexOf('.') - 1) != ' ') ? y.substr(y.indexOf('.') - 2, 2) : y.charAt(y.indexOf('.') - 1); } } else { result = false; try { for (var i = 15; i >= 3 && result != true; i--) { execScript('on error resume next: result = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + i + '"))', 'VBScript'); flashversion = i; } } catch (notIE) { } } return flashversion; } function detectFlash(ver) { return (parseInt(getFlashVersion()) >= parseInt(ver)) ? true : false; } function getQueryParamValue(param) { var q = document.location.search || document.location.href.split("#")[1]; if (q) { var detectIndex = q.indexOf(param + "="); var endIndex = (q.indexOf("&", detectIndex) > -1) ? q.indexOf("&", detectIndex) : q.length; if (q.length > 1 && detectIndex > -1) { return q.substring(q.indexOf("=", detectIndex) + 1, endIndex); } } return ""; } if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }; }