PageSourceSearch

https://www.atas.gr/js/flashdetect.js

js atas.gr collected 2026-10-06 13:16:50 UTC 8,384 bytes, 199 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(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
14	if (!document.createElement || !document.getElementById) { return; }
15	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
16	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
17	this.params = new Object();
18	this.variables = new Object();
19	this.attributes = new Array();
20	if(swf) { this.setAttribute('swf', swf); }
21	if(id) { this.setAttribute('id', id); }
22	if(w) { this.setAttribute('width', w); }
23	if(h) { this.setAttribute('height', h); }
24	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
25	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute('version'), useExpressInstall);
26	if(c) { this.addParam('bgcolor', c); }
27	var q = quality ? quality : 'high';
28	this.addParam('quality', q);
29	this.addParam('wmode', 'transparent');
30	this.setAttribute('useExpressInstall', useExpressInstall);
31	this.setAttribute('doExpressInstall', false);
32	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
33	this.setAttribute('xiRedirectUrl', xir);
34	this.setAttribute('redirectUrl', '');
35	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
36}
37deconcept.SWFObject.prototype = {
38	setAttribute: function(name, value){
39		this.attributes[name] = value;
40	},
41	getAttribute: function(name){
42		return this.attributes[name];
43	},
44	addParam: function(name, value){
45		this.params[name] = value;
46	},
47	getParams: function(){
48		return this.params;
49	},
50	addVariable: function(name, value){
51		this.variables[name] = value;
52	},
53	getVariable: function(name){
54		return this.variables[name];
55	},
56	getVariables: function(){
57		return this.variables;
58	},
59	getVariablePairs: function(){
60		var variablePairs = new Array();
61		var key;
62		var variables = this.getVariables();
63		for(key in variables){
64			variablePairs.push(key +"="+ variables[key]);
65		}
66		return variablePairs;
67	},
68	getSWFHTML: function() {
69		var swfNode = "";
70		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
71			if (this.getAttribute("doExpressInstall")) this.addVariable("MMplayerType", "PlugIn");
72			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" wmode="transparent"';
73			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
74			var params = this.getParams();
75			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
76			var pairs = this.getVariablePairs().join("&");
77			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
78			swfNode += '/>';
79		} else { // PC IE
80			if (this.getAttribute("doExpressInstall")) this.addVariable("MMplayerType", "ActiveX");
81			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" wmode="transparent">';
82			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
83			var params = this.getParams();
84			for(var key in params) {
85			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
86			 swfNode += '<param name="wmode" value="transparent" />';
87			}
88			var pairs = this.getVariablePairs().join("&");
89			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
90			swfNode += "</object>";
91		}
92		return swfNode;
93	},
94	write: function(elementId){
95		if(this.getAttribute('useExpressInstall')) {
96			// check to see if we need to do an express install
97			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
98			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
99				this.setAttribute('doExpressInstall', true);
100				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
101				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
102				this.addVariable("MMdoctitle", document.title);
103			}
104		}
105		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
106			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
107			n.innerHTML = this.getSWFHTML();
108			return true;
109		}else{
110			if(this.getAttribute('redirectUrl') != "") {
111				document.location.replace(this.getAttribute('redirectUrl'));
112			}
113		}
114		return false;
115	}
116}
117
118/* ---- detection functions ---- */
119deconcept.SWFObjectUtil.getPlayerVersion = function(reqVer, xiInstall){
120	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
121	if(navigator.plugins && navigator.mimeTypes.length){
122		var x = navigator.plugins["Shockwave Flash"];
123		if(x && x.description) {
124			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
125		}
126	}else{
127		try{
128			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
129			for (var i=3; axo!=null; i++) {
130				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
131				PlayerVersion = new deconcept.PlayerVersion([i,0,0]);
132			}
133		}catch(e){}
134		if (reqVer && PlayerVersion.major > reqVer.major) return PlayerVersion; // version is ok, skip minor detection
135		// this only does the minor rev lookup if the user's major version 
136		// is not 6 or we are checking for a specific minor or revision number
137		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
138		if (!reqVer || ((reqVer.minor != 0 || reqVer.rev != 0) && PlayerVersion.major == reqVer.major) || PlayerVersion.major != 6 || xiInstall) {
139			try{
140				PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
141			}catch(e){}
142		}
143	}
144	return PlayerVersion;
145}
146deconcept.PlayerVersion = function(arrVersion){
147	this.major = parseInt(arrVersion[0]) != null ? parseInt(arrVersion[0]) : 0;
148	this.minor = parseInt(arrVersion[1]) || 0;
149	this.rev = parseInt(arrVersion[2]) || 0;
150}
151deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
152	if(this.major < fv.major) return false;
153	if(this.major > fv.major) return true;
154	if(this.minor < fv.minor) return false;
155	if(this.minor > fv.minor) return true;
156	if(this.rev < fv.rev) return false;
157	return true;
158}
159/* ---- get value of query string param ---- */
160deconcept.util = {
161	getRequestParameter: function(param){
162		var q = document.location.search || document.location.hash;
163		if(q){
164			var startIndex = q.indexOf(param +"=");
165			var endIndex = (q.indexOf("&", startIndex) > -1) ? q.indexOf("&", startIndex) : q.length;
166			if (q.length > 1 && startIndex > -1) {
167				return q.substring(q.indexOf("=", startIndex)+1, endIndex);
168			}
169		}
170		return "";
171	}
172}
173/* fix for video streaming bug */
174deconcept.SWFObjectUtil.cleanupSWFs = function() {
175	var objects = document.getElementsByTagName("OBJECT");
176	for (var i=0; i < objects.length; i++) {
177		for (var x in objects[i]) {
178			if (typeof objects[i][x] == 'function') {
179				objects[i][x] = null;
180			}
181		}
182	}
183}
184if (typeof window.onunload == 'function') {
185	var oldunload = window.onunload;
186		window.onunload = function() {
187		deconcept.SWFObjectUtil.cleanupSWFs();
188		oldunload();
189	}
190} else {
191	window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;
192}
193/* add Array.push if needed (ie5) */
194if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}
195
196/* add some aliases for ease of use/backwards compatibility */
197var getQueryParamValue = deconcept.util.getRequestParameter;
198var FlashObject = deconcept.SWFObject; // for legacy support
199var SWFObject = deconcept.SWFObject;

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.