+++ /dev/null
-// Flash Player Version Detection - Rev 1.5\r
-// Detect Client Browser type\r
-// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.\r
-var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;\r
-var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;\r
-var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;\r
-\r
-function ControlVersion()\r
-{\r
- var version;\r
- var axo;\r
- var e;\r
-\r
- // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry\r
-\r
- try {\r
- // version will be set for 7.X or greater players\r
- axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");\r
- version = axo.GetVariable("$version");\r
- } catch (e) {\r
- }\r
-\r
- if (!version)\r
- {\r
- try {\r
- // version will be set for 6.X players only\r
- axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");\r
- \r
- // installed player is some revision of 6.0\r
- // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,\r
- // so we have to be careful. \r
- \r
- // default to the first public version\r
- version = "WIN 6,0,21,0";\r
-\r
- // throws if AllowScripAccess does not exist (introduced in 6.0r47) \r
- axo.AllowScriptAccess = "always";\r
-\r
- // safe to call for 6.0r47 or greater\r
- version = axo.GetVariable("$version");\r
-\r
- } catch (e) {\r
- }\r
- }\r
-\r
- if (!version)\r
- {\r
- try {\r
- // version will be set for 4.X or 5.X player\r
- axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");\r
- version = axo.GetVariable("$version");\r
- } catch (e) {\r
- }\r
- }\r
-\r
- if (!version)\r
- {\r
- try {\r
- // version will be set for 3.X player\r
- axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");\r
- version = "WIN 3,0,18,0";\r
- } catch (e) {\r
- }\r
- }\r
-\r
- if (!version)\r
- {\r
- try {\r
- // version will be set for 2.X player\r
- axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");\r
- version = "WIN 2,0,0,11";\r
- } catch (e) {\r
- version = -1;\r
- }\r
- }\r
- \r
- return version;\r
-}\r
-\r
-// JavaScript helper required to detect Flash Player PlugIn version information\r
-function GetSwfVer(){\r
- // NS/Opera version >= 3 check for Flash plugin in plugin array\r
- var flashVer = -1;\r
- \r
- if (navigator.plugins != null && navigator.plugins.length > 0) {\r
- if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {\r
- var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";\r
- var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description; \r
- var descArray = flashDescription.split(" ");\r
- var tempArrayMajor = descArray[2].split(".");\r
- var versionMajor = tempArrayMajor[0];\r
- var versionMinor = tempArrayMajor[1];\r
- if ( descArray[3] != "" ) {\r
- tempArrayMinor = descArray[3].split("r");\r
- } else {\r
- tempArrayMinor = descArray[4].split("r");\r
- }\r
- var versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;\r
- var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;\r
- }\r
- }\r
- // MSN/WebTV 2.6 supports Flash 4\r
- else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;\r
- // WebTV 2.5 supports Flash 3\r
- else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;\r
- // older WebTV supports Flash 2\r
- else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;\r
- else if ( isIE && isWin && !isOpera ) {\r
- flashVer = ControlVersion();\r
- } \r
- return flashVer;\r
-}\r
-\r
-// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available\r
-function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)\r
-{\r
- versionStr = GetSwfVer();\r
- if (versionStr == -1 ) {\r
- return false;\r
- } else if (versionStr != 0) {\r
- if(isIE && isWin && !isOpera) {\r
- // Given "WIN 2,0,0,11"\r
- tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]\r
- tempString = tempArray[1]; // "2,0,0,11"\r
- versionArray = tempString.split(","); // ['2', '0', '0', '11']\r
- } else {\r
- versionArray = versionStr.split(".");\r
- }\r
- var versionMajor = versionArray[0];\r
- var versionMinor = versionArray[1];\r
- var versionRevision = versionArray[2];\r
-\r
- // is the major.revision >= requested major.revision AND the minor version >= requested minor\r
- if (versionMajor > parseFloat(reqMajorVer)) {\r
- return true;\r
- } else if (versionMajor == parseFloat(reqMajorVer)) {\r
- if (versionMinor > parseFloat(reqMinorVer))\r
- return true;\r
- else if (versionMinor == parseFloat(reqMinorVer)) {\r
- if (versionRevision >= parseFloat(reqRevision))\r
- return true;\r
- }\r
- }\r
- return false;\r
- }\r
-}\r
-\r
-function AC_AddExtension(src, ext)\r
-{\r
- if (src.indexOf('?') != -1)\r
- return src.replace(/\?/, ext+'?'); \r
- else\r
- return src + ext;\r
-}\r
-\r
-function AC_Generateobj(objAttrs, params, embedAttrs) \r
-{ \r
- var str = '';\r
- if (isIE && isWin && !isOpera)\r
- {\r
- str += '<object ';\r
- for (var i in objAttrs)\r
- str += i + '="' + objAttrs[i] + '" ';\r
- for (var i in params)\r
- str += '><param name="' + i + '" value="' + params[i] + '" /> ';\r
- str += '></object>';\r
- } else {\r
- str += '<embed ';\r
- for (var i in embedAttrs)\r
- str += i + '="' + embedAttrs[i] + '" ';\r
- str += '> </embed>';\r
- }\r
-\r
- document.write(str);\r
-}\r
-\r
-function AC_FL_RunContent(){\r
- var ret = \r
- AC_GetArgs\r
- ( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"\r
- , "application/x-shockwave-flash"\r
- );\r
- AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);\r
-}\r
-\r
-function AC_GetArgs(args, ext, srcParamName, classid, mimeType){\r
- var ret = new Object();\r
- ret.embedAttrs = new Object();\r
- ret.params = new Object();\r
- ret.objAttrs = new Object();\r
- for (var i=0; i < args.length; i=i+2){\r
- var currArg = args[i].toLowerCase(); \r
-\r
- switch (currArg){ \r
- case "classid":\r
- break;\r
- case "pluginspage":\r
- ret.embedAttrs[args[i]] = args[i+1];\r
- break;\r
- case "src":\r
- case "movie": \r
- args[i+1] = AC_AddExtension(args[i+1], ext);\r
- ret.embedAttrs["src"] = args[i+1];\r
- ret.params[srcParamName] = args[i+1];\r
- break;\r
- case "onafterupdate":\r
- case "onbeforeupdate":\r
- case "onblur":\r
- case "oncellchange":\r
- case "onclick":\r
- case "ondblClick":\r
- case "ondrag":\r
- case "ondragend":\r
- case "ondragenter":\r
- case "ondragleave":\r
- case "ondragover":\r
- case "ondrop":\r
- case "onfinish":\r
- case "onfocus":\r
- case "onhelp":\r
- case "onmousedown":\r
- case "onmouseup":\r
- case "onmouseover":\r
- case "onmousemove":\r
- case "onmouseout":\r
- case "onkeypress":\r
- case "onkeydown":\r
- case "onkeyup":\r
- case "onload":\r
- case "onlosecapture":\r
- case "onpropertychange":\r
- case "onreadystatechange":\r
- case "onrowsdelete":\r
- case "onrowenter":\r
- case "onrowexit":\r
- case "onrowsinserted":\r
- case "onstart":\r
- case "onscroll":\r
- case "onbeforeeditfocus":\r
- case "onactivate":\r
- case "onbeforedeactivate":\r
- case "ondeactivate":\r
- case "type":\r
- case "codebase":\r
- case "id":\r
- ret.objAttrs[args[i]] = args[i+1];\r
- break;\r
- case "width":\r
- case "height":\r
- case "align":\r
- case "vspace": \r
- case "hspace":\r
- case "class":\r
- case "title":\r
- case "accesskey":\r
- case "name":\r
- case "tabindex":\r
- ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];\r
- break;\r
- default:\r
- ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];\r
- }\r
- }\r
- ret.objAttrs["classid"] = classid;\r
- if (mimeType) ret.embedAttrs["type"] = mimeType;\r
- return ret;\r
-}\r
-\r
-\r