请教关于swfobject.js api传值到as中的问题

?您当前的位置: >
[AS3]通过swfobject引进的flash用js动态控制的宽高
时间: 13:38来源:</  极酷网页播放器
[AS3]通过swfobject引进的flash用js动态控制的宽高
通过swfobject引进的flash,如何用js动态控制的宽高?
在swfobject中将宽和高设定为100%,然后在window.onresize方法中动态控制flash父容器(DIV)的宽高。
function&refreshMainSize()&&&&&{&&&&&&&&&var&main&=&document.getElementById(&game&);&&&&&&&&&var&klTop&=&document.getElementById(&kl_topbg&);&&&&&&&&&&if(main&&&&klTop)&&&&&&&&&{&&&&&&&&&&&&&main.height&=&(document.documentElememt&||&document.body).clientHeight&-&klTop.offsetH&&&&&&&&&}&&&&&}&&onresize=&refreshMainSize()&&
酷播技术服务
技术与代码Teamlab 开源的项目管理平台 展示 swfobject.js源代码
- 下载整个 - 类型:.js文件
/*! & & SWFObject v2.2 &/p/swfobject/&
& & & & is released under the MIT License &http://www.opensource.org/licenses/mit-license.php&
var swfobject = function&#40;&#41; &#123;
& & & & var UNDEF = &undefined&,
& & & & & & & & OBJECT = &object&,
& & & & & & & & SHOCKWAVE_FLASH = &Shockwave Flash&,
& & & & & & & & SHOCKWAVE_FLASH_AX = &ShockwaveFlash.ShockwaveFlash&,
& & & & & & & & FLASH_MIME_TYPE = &application/x-shockwave-flash&,
& & & & & & & & EXPRESS_INSTALL_ID = &SWFObjectExprInst&,
& & & & & & & & ON_READY_STATE_CHANGE = &onreadystatechange&,
& & & & & & & &
& & & & & & & & win = window,
& & & & & & & & doc = document,
& & & & & & & & nav = navigator,
& & & & & & & &
& & & & & & & & plugin = false,
& & & & & & & & domLoadFnArr = &#91;main&#93;,
& & & & & & & & regObjArr = &#91;&#93;,
& & & & & & & & objIdArr = &#91;&#93;,
& & & & & & & & listenersArr = &#91;&#93;,
& & & & & & & & storedAltContent,
& & & & & & & & storedAltContentId,
& & & & & & & & storedCallbackFn,
& & & & & & & & storedCallbackObj,
& & & & & & & & isDomLoaded = false,
& & & & & & & & isExpressInstallActive = false,
& & & & & & & & dynamicStylesheet,
& & & & & & & & dynamicStylesheetMedia,
& & & & & & & & autoHideShow = true,
& & & & /* Centralized function for browser feature detection
& & & & & & & & - User agent string detection is only used when no good alternative is possible
& & & & & & & & - Is executed directly for optimal performance
& & & & */& & &
& & & & ua = function&#40;&#41; &#123;
& & & & & & & & var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
& & & & & & & & & & & & u = nav.userAgent.toLowerCase&#40;&#41;,
& & & & & & & & & & & & p = nav.platform.toLowerCase&#40;&#41;,
& & & & & & & & & & & & windows = p ? /win/.test&#40;p&#41; : /win/.test&#40;u&#41;,
& & & & & & & & & & & & mac = p ? /mac/.test&#40;p&#41; : /mac/.test&#40;u&#41;,
& & & & & & & & & & & & webkit = /webkit/.test&#40;u&#41; ? parseFloat&#40;u.replace&#40;/^.*webkit\/(\d+(\.\d+)?).*$/, &$1&&#41;&#41; : false, // returns either the webkit version or false if not webkit
& & & & & & & & & & & & ie = !+&\v1&, // feature detection based on Andrea Giammarchi's solution: /-bytes-to-know-if-your-browser-is-ie.html
& & & & & & & & & & & & playerVersion = &#91;0,0,0&#93;,
& & & & & & & & & & & & d = null;
& & & & & & & & if &#40;typeof nav.plugins != UNDEF && typeof nav.plugins&#91;SHOCKWAVE_FLASH&#93; == OBJECT&#41; &#123;
& & & & & & & & & & & & d = nav.plugins&#91;SHOCKWAVE_FLASH&#93;.description;
& & & & & & & & & & & & if &#40;d && !&#40;typeof nav.mimeTypes != UNDEF && nav.mimeTypes&#91;FLASH_MIME_TYPE&#93; && !nav.mimeTypes&#91;FLASH_MIME_TYPE&#93;.enabledPlugin&#41;&#41; &#123; // navigator.mimeTypes[&application/x-shockwave-flash&].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
& & & & & & & & & & & & & & & & plugin = true;
& & & & & & & & & & & & & & & & ie = false; // cascaded feature detection for Internet Explorer
& & & & & & & & & & & & & & & & d = d.replace&#40;/^.*\s+(\S+\s+\S+$)/, &$1&&#41;;
& & & & & & & & & & & & & & & & playerVersion&#91;0&#93; = parseInt&#40;d.replace&#40;/^(.*)\..*$/, &$1&&#41;, 10&#41;;
& & & & & & & & & & & & & & & & playerVersion&#91;1&#93; = parseInt&#40;d.replace&#40;/^.*\.(.*)\s.*$/, &$1&&#41;, 10&#41;;
& & & & & & & & & & & & & & & & playerVersion&#91;2&#93; = /[a-zA-Z]/.test&#40;d&#41; ? parseInt&#40;d.replace&#40;/^.*[a-zA-Z]+(.*)$/, &$1&&#41;, 10&#41; : 0;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;
& & & & & & & & else if &#40;typeof win.ActiveXObject != UNDEF&#41; &#123;
& & & & & & & & & & & & try &#123;
& & & & & & & & & & & & & & & & var a = new ActiveXObject&#40;SHOCKWAVE_FLASH_AX&#41;;
& & & & & & & & & & & & & & & & if &#40;a&#41; &#123; // a will return null when ActiveX is disabled
& & & & & & & & & & & & & & & & & & & & d = a.GetVariable&#40;&$version&&#41;;
& & & & & & & & & & & & & & & & & & & & if &#40;d&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & ie = true; // cascaded feature detection for Internet Explorer
& & & & & & & & & & & & & & & & & & & & & & & & d = d.split&#40;& &&#41;&#91;1&#93;.split&#40;&,&&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & playerVersion = &#91;parseInt&#40;d&#91;0&#93;, 10&#41;, parseInt&#40;d&#91;1&#93;, 10&#41;, parseInt&#40;d&#91;2&#93;, 10&#41;&#93;;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & catch&#40;e&#41; &#123;&#125;
& & & & & & & & &#125;
& & & & & & & & return &#123; w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac &#125;;
& & & & &#125;&#40;&#41;,
& & & & /* Cross-browser onDomLoad
& & & & & & & & - Will fire an event as soon as the DOM of a web page is loaded
& & & & & & & & - Internet Explorer workaround based on Diego Perini's solution: /IEContentLoaded/
& & & & & & & & - Regular onload serves as fallback
& & & & */
& & & & onDomLoad = function&#40;&#41; &#123;
& & & & & & & & if &#40;!ua.w3&#41; &#123; return; &#125;
& & & & & & & & if &#40;&#40;typeof doc.readyState != UNDEF && doc.readyState == &complete&&#41; || &#40;typeof doc.readyState == UNDEF && &#40;doc.getElementsByTagName&#40;&body&&#41;&#91;0&#93; || doc.body&#41;&#41;&#41; &#123; // function is fired after onload, e.g. when script is inserted dynamically
& & & & & & & & & & & & callDomLoadFunctions&#40;&#41;;
& & & & & & & & &#125;
& & & & & & & & if &#40;!isDomLoaded&#41; &#123;
& & & & & & & & & & & & if &#40;typeof doc.addEventListener != UNDEF&#41; &#123;
& & & & & & & & & & & & & & & & doc.addEventListener&#40;&DOMContentLoaded&, callDomLoadFunctions, false&#41;;
& & & & & & & & & & & & &#125; & & & & & & &
& & & & & & & & & & & & if &#40;ua.ie && ua.win&#41; &#123;
& & & & & & & & & & & & & & & & doc.attachEvent&#40;ON_READY_STATE_CHANGE, function&#40;&#41; &#123;
& & & & & & & & & & & & & & & & & & & & if &#40;doc.readyState == &complete&&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & doc.detachEvent&#40;ON_READY_STATE_CHANGE, arguments.callee&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & callDomLoadFunctions&#40;&#41;;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & &#125;&#41;;
& & & & & & & & & & & & & & & & if &#40;win == top&#41; &#123; // if not inside an iframe
& & & & & & & & & & & & & & & & & & & & &#40;function&#40;&#41;&#123;
& & & & & & & & & & & & & & & & & & & & & & & & if &#40;isDomLoaded&#41; &#123; return; &#125;
& & & & & & & & & & & & & & & & & & & & & & & & try &#123;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & doc.documentElement.doScroll&#40;&left&&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & catch&#40;e&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & setTimeout&#40;arguments.callee, 0&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & return;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & callDomLoadFunctions&#40;&#41;;
& & & & & & & & & & & & & & & & & & & & &#125;&#41;&#40;&#41;;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & if &#40;ua.wk&#41; &#123;
& & & & & & & & & & & & & & & & &#40;function&#40;&#41;&#123;
& & & & & & & & & & & & & & & & & & & & if &#40;isDomLoaded&#41; &#123; return; &#125;
& & & & & & & & & & & & & & & & & & & & if &#40;!/loaded|complete/.test&#40;doc.readyState&#41;&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & setTimeout&#40;arguments.callee, 0&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & return;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & callDomLoadFunctions&#40;&#41;;
& & & & & & & & & & & & & & & & &#125;&#41;&#40;&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & addLoadEvent&#40;callDomLoadFunctions&#41;;
& & & & & & & & &#125;
& & & & &#125;&#40;&#41;;
& & & & function callDomLoadFunctions&#40;&#41; &#123;
& & & & & & & & if &#40;isDomLoaded&#41; &#123; return; &#125;
& & & & & & & & try &#123; // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
& & & & & & & & & & & & var t = doc.getElementsByTagName&#40;&body&&#41;&#91;0&#93;.appendChild&#40;createElement&#40;&span&&#41;&#41;;
& & & & & & & & & & & & t.parentNode.removeChild&#40;t&#41;;
& & & & & & & & &#125;
& & & & & & & & catch &#40;e&#41; &#123; return; &#125;
& & & & & & & & isDomLoaded = true;
& & & & & & & & var dl = domLoadFnArr.length;
& & & & & & & & for &#40;var i = 0; i & dl; i++&#41; &#123;
& & & & & & & & & & & & domLoadFnArr&#91;i&#93;&#40;&#41;;
& & & & & & & & &#125;
& & & & &#125;
& & & & function addDomLoadEvent&#40;fn&#41; &#123;
& & & & & & & & if &#40;isDomLoaded&#41; &#123;
& & & & & & & & & & & & fn&#40;&#41;;
& & & & & & & & &#125;
& & & & & & & & else &#123;
& & & & & & & & & & & & domLoadFnArr&#91;domLoadFnArr.length&#93; = fn; // Array.push() is only available in IE5.5+
& & & & & & & & &#125;
& & & & &#125;
& & & & /* Cross-browser onload
& & & & & & & & - Based on James Edwards' solution: /site/resources/scripts/onload/
& & & & & & & & - Will fire an event as soon as a web page including all of its assets are loaded
& & & & &*/
& & & & function addLoadEvent&#40;fn&#41; &#123;
& & & & & & & & if &#40;typeof win.addEventListener != UNDEF&#41; &#123;
& & & & & & & & & & & & win.addEventListener&#40;&load&, fn, false&#41;;
& & & & & & & & &#125;
& & & & & & & & else if &#40;typeof doc.addEventListener != UNDEF&#41; &#123;
& & & & & & & & & & & & doc.addEventListener&#40;&load&, fn, false&#41;;
& & & & & & & & &#125;
& & & & & & & & else if &#40;typeof win.attachEvent != UNDEF&#41; &#123;
& & & & & & & & & & & & addListener&#40;win, &onload&, fn&#41;;
& & & & & & & & &#125;
& & & & & & & & else if &#40;typeof win.onload == &function&&#41; &#123;
& & & & & & & & & & & & var fnOld = win.onload;
& & & & & & & & & & & & win.onload = function&#40;&#41; &#123;
& & & & & & & & & & & & & & & & fnOld&#40;&#41;;
& & & & & & & & & & & & & & & & fn&#40;&#41;;
& & & & & & & & & & & & &#125;;
& & & & & & & & &#125;
& & & & & & & & else &#123;
& & & & & & & & & & & & win.onload = fn;
& & & & & & & & &#125;
& & & & &#125;
& & & & /* Main function
& & & & & & & & - Will preferably execute onDomLoad, otherwise onload (as a fallback)
& & & & */
& & & & function main&#40;&#41; &#123;
& & & & & & & & if &#40;plugin&#41; &#123;
& & & & & & & & & & & & testPlayerVersion&#40;&#41;;
& & & & & & & & &#125;
& & & & & & & & else &#123;
& & & & & & & & & & & & matchVersions&#40;&#41;;
& & & & & & & & &#125;
& & & & &#125;
& & & & /* Detect the Flash Player version for non-Internet Explorer browsers
& & & & & & & & - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
& & & & & & & & & a. Both release and build numbers can be detected
& & & & & & & & & b. Avoid wrong descriptions by corrupt installers provided by Adobe
& & & & & & & & & c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
& & & & & & & & - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
& & & & */
& & & & function testPlayerVersion&#40;&#41; &#123;
& & & & & & & & var b = doc.getElementsByTagName&#40;&body&&#41;&#91;0&#93;;
& & & & & & & & var o = createElement&#40;OBJECT&#41;;
& & & & & & & & o.setAttribute&#40;&type&, FLASH_MIME_TYPE&#41;;
& & & & & & & & var t = b.appendChild&#40;o&#41;;
& & & & & & & & if &#40;t&#41; &#123;
& & & & & & & & & & & & var counter = 0;
& & & & & & & & & & & & &#40;function&#40;&#41;&#123;
& & & & & & & & & & & & & & & & if &#40;typeof t.GetVariable != UNDEF&#41; &#123;
& & & & & & & & & & & & & & & & & & & & var d = t.GetVariable&#40;&$version&&#41;;
& & & & & & & & & & & & & & & & & & & & if &#40;d&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & d = d.split&#40;& &&#41;&#91;1&#93;.split&#40;&,&&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & ua.pv = &#91;parseInt&#40;d&#91;0&#93;, 10&#41;, parseInt&#40;d&#91;1&#93;, 10&#41;, parseInt&#40;d&#91;2&#93;, 10&#41;&#93;;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & else if &#40;counter & 10&#41; &#123;
& & & & & & & & & & & & & & & & & & & & counter++;
& & & & & & & & & & & & & & & & & & & & setTimeout&#40;arguments.callee, 10&#41;;
& & & & & & & & & & & & & & & & & & & & return;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & b.removeChild&#40;o&#41;;
& & & & & & & & & & & & & & & & t = null;
& & & & & & & & & & & & & & & & matchVersions&#40;&#41;;
& & & & & & & & & & & & &#125;&#41;&#40;&#41;;
& & & & & & & & &#125;
& & & & & & & & else &#123;
& & & & & & & & & & & & matchVersions&#40;&#41;;
& & & & & & & & &#125;
& & & & &#125;
& & & & /* Perform Flash Player and SWF static publishing only
& & & & */
& & & & function matchVersions&#40;&#41; &#123;
& & & & & & & & var rl = regObjArr.length;
& & & & & & & & if &#40;rl & 0&#41; &#123;
& & & & & & & & & & & & for &#40;var i = 0; i & rl; i++&#41; &#123; // for each registered object element
& & & & & & & & & & & & & & & & var id = regObjArr&#91;i&#93;.id;
& & & & & & & & & & & & & & & & var cb = regObjArr&#91;i&#93;.callbackFn;
& & & & & & & & & & & & & & & & var cbObj = &#123;success:false, id:id&#125;;
& & & & & & & & & & & & & & & & if &#40;ua.pv&#91;0&#93; & 0&#41; &#123;
& & & & & & & & & & & & & & & & & & & & var obj = getElementById&#40;id&#41;;
& & & & & & & & & & & & & & & & & & & & if &#40;obj&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & if &#40;hasPlayerVersion&#40;regObjArr&#91;i&#93;.swfVersion&#41; && !&#40;ua.wk && ua.wk & 312&#41;&#41; &#123; // Flash Player version &= published SWF version: Houston, we have a match!
& & & & & & & & & & & & & & & & & & & & & & & & & & & & setVisibility&#40;id, true&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & if &#40;cb&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & cbObj.success = true;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & cbObj.ref = getObjectById&#40;id&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & cb&#40;cbObj&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & else if &#40;regObjArr&#91;i&#93;.expressInstall && canExpressInstall&#40;&#41;&#41; &#123; // show the Adobe Express Install dialog if set by the web page author and if supported
& & & & & & & & & & & & & & & & & & & & & & & & & & & & var att = &#123;&#125;;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & att.data = regObjArr&#91;i&#93;.expressInstall;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & att.width = obj.getAttribute&#40;&width&&#41; || &0&;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & att.height = obj.getAttribute&#40;&height&&#41; || &0&;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & if &#40;obj.getAttribute&#40;&class&&#41;&#41; &#123; att.styleclass = obj.getAttribute&#40;&class&&#41;; &#125;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & if &#40;obj.getAttribute&#40;&align&&#41;&#41; &#123; att.align = obj.getAttribute&#40;&align&&#41;; &#125;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & // parse HTML object param element's name-value pairs
& & & & & & & & & & & & & & & & & & & & & & & & & & & & var par = &#123;&#125;;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & var p = obj.getElementsByTagName&#40;&param&&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & var pl = p.length;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & for &#40;var j = 0; j & pl; j++&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & if &#40;p&#91;j&#93;.getAttribute&#40;&name&&#41;.toLowerCase&#40;&#41; != &movie&&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & par&#91;p&#91;j&#93;.getAttribute&#40;&name&&#41;&#93; = p&#91;j&#93;.getAttribute&#40;&value&&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & showExpressInstall&#40;att, par, id, cb&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & else &#123; // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
& & & & & & & & & & & & & & & & & & & & & & & & & & & & displayAltContent&#40;obj&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & if &#40;cb&#41; &#123; cb&#40;cbObj&#41;; &#125;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & else &#123;& // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
& & & & & & & & & & & & & & & & & & & & setVisibility&#40;id, true&#41;;
& & & & & & & & & & & & & & & & & & & & if &#40;cb&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & var o = getObjectById&#40;id&#41;; // test whether there is an HTML object element or not
& & & & & & & & & & & & & & & & & & & & & & & & if &#40;o && typeof o.SetVariable != UNDEF&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & cbObj.success = true;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & cbObj.ref = o;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & cb&#40;cbObj&#41;;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;
& & & & &#125;
& & & & function getObjectById&#40;objectIdStr&#41; &#123;
& & & & & & & & var r = null;
& & & & & & & & var o = getElementById&#40;objectIdStr&#41;;
& & & & & & & & if &#40;o && o.nodeName == &OBJECT&&#41; &#123;
& & & & & & & & & & & & if &#40;typeof o.SetVariable != UNDEF&#41; &#123;
& & & & & & & & & & & & & & & & r = o;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & else &#123;
& & & & & & & & & & & & & & & & var n = o.getElementsByTagName&#40;OBJECT&#41;&#91;0&#93;;
& & & & & & & & & & & & & & & & if &#40;n&#41; &#123;
& & & & & & & & & & & & & & & & & & & & r = n;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;
& & & & & & & & return r;
& & & & &#125;
& & & & /* Requirements for Adobe Express Install
& & & & & & & & - only one instance can be active at a time
& & & & & & & & - fp 6.0.65 or higher
& & & & & & & & - Win/Mac OS only
& & & & & & & & - no Webkit engines older than version 312
& & & & */
& & & & function canExpressInstall&#40;&#41; &#123;
& & & & & & & & return !isExpressInstallActive && hasPlayerVersion&#40;&6.0.65&&#41; && &#40;ua.win || ua.mac&#41; && !&#40;ua.wk && ua.wk & 312&#41;;
& & & & &#125;
& & & & /* Show the Adobe Express Install dialog
& & & & & & & & - Reference: /cfusion/knowledgebase/index.cfm?id=6a253b75
& & & & */
& & & & function showExpressInstall&#40;att, par, replaceElemIdStr, callbackFn&#41; &#123;
& & & & & & & & isExpressInstallActive = true;
& & & & & & & & storedCallbackFn = callbackFn || null;
& & & & & & & & storedCallbackObj = &#123;success:false, id:replaceElemIdStr&#125;;
& & & & & & & & var obj = getElementById&#40;replaceElemIdStr&#41;;
& & & & & & & & if &#40;obj&#41; &#123;
& & & & & & & & & & & & if &#40;obj.nodeName == &OBJECT&&#41; &#123; // static publishing
& & & & & & & & & & & & & & & & storedAltContent = abstractAltContent&#40;obj&#41;;
& & & & & & & & & & & & & & & & storedAltContentId = null;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & else &#123; // dynamic publishing
& & & & & & & & & & & & & & & & storedAltContent = obj;
& & & & & & & & & & & & & & & & storedAltContentId = replaceElemIdStr;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & att.id = EXPRESS_INSTALL_ID;
& & & & & & & & & & & & if &#40;typeof att.width == UNDEF || &#40;!/%$/.test&#40;att.width&#41; && parseInt&#40;att.width, 10&#41; & 310&#41;&#41; &#123; att.width = &310&; &#125;
& & & & & & & & & & & & if &#40;typeof att.height == UNDEF || &#40;!/%$/.test&#40;att.height&#41; && parseInt&#40;att.height, 10&#41; & 137&#41;&#41; &#123; att.height = &137&; &#125;
& & & & & & & & & & & & doc.title = doc.title.slice&#40;0, 47&#41; + & - Flash Player Installation&;
& & & & & & & & & & & & var pt = ua.ie && ua.win ? &ActiveX& : &PlugIn&,
& & & & & & & & & & & & & & & & fv = &MMredirectURL=& + win.location.toString&#40;&#41;.replace&#40;/&/g,&%26&&#41; + &&MMplayerType=& + pt + &&MMdoctitle=& + doc.title;
& & & & & & & & & & & & if &#40;typeof par.flashvars != UNDEF&#41; &#123;
& & & & & & & & & & & & & & & & par.flashvars += &&& + fv;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & else &#123;
& & & & & & & & & & & & & & & & par.flashvars = fv;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
& & & & & & & & & & & & // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
& & & & & & & & & & & & if &#40;ua.ie && ua.win && obj.readyState != 4&#41; &#123;
& & & & & & & & & & & & & & & & var newObj = createElement&#40;&div&&#41;;
& & & & & & & & & & & & & & & & replaceElemIdStr += &SWFObjectNew&;
& & & & & & & & & & & & & & & & newObj.setAttribute&#40;&id&, replaceElemIdStr&#41;;
& & & & & & & & & & & & & & & & obj.parentNode.insertBefore&#40;newObj, obj&#41;; // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
& & & & & & & & & & & & & & & & obj.style.display = &none&;
& & & & & & & & & & & & & & & & &#40;function&#40;&#41;&#123;
& & & & & & & & & & & & & & & & & & & & if &#40;obj.readyState == 4&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & obj.parentNode.removeChild&#40;obj&#41;;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & else &#123;
& & & & & & & & & & & & & & & & & & & & & & & & setTimeout&#40;arguments.callee, 10&#41;;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & &#125;&#41;&#40;&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & createSWF&#40;att, par, replaceElemIdStr&#41;;
& & & & & & & & &#125;
& & & & &#125;
& & & & /* Functions to abstract and display alternative content
& & & & */
& & & & function displayAltContent&#40;obj&#41; &#123;
& & & & & & & & if &#40;ua.ie && ua.win && obj.readyState != 4&#41; &#123;
& & & & & & & & & & & & // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
& & & & & & & & & & & & // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
& & & & & & & & & & & & var el = createElement&#40;&div&&#41;;
& & & & & & & & & & & & obj.parentNode.insertBefore&#40;el, obj&#41;; // insert placeholder div that will be replaced by the alternative content
& & & & & & & & & & & & el.parentNode.replaceChild&#40;abstractAltContent&#40;obj&#41;, el&#41;;
& & & & & & & & & & & & obj.style.display = &none&;
& & & & & & & & & & & & &#40;function&#40;&#41;&#123;
& & & & & & & & & & & & & & & & if &#40;obj.readyState == 4&#41; &#123;
& & & & & & & & & & & & & & & & & & & & obj.parentNode.removeChild&#40;obj&#41;;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & else &#123;
& & & & & & & & & & & & & & & & & & & & setTimeout&#40;arguments.callee, 10&#41;;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & &#125;&#41;&#40;&#41;;
& & & & & & & & &#125;
& & & & & & & & else &#123;
& & & & & & & & & & & & obj.parentNode.replaceChild&#40;abstractAltContent&#40;obj&#41;, obj&#41;;
& & & & & & & & &#125;
& & & & &#125;
& & & & function abstractAltContent&#40;obj&#41; &#123;
& & & & & & & & var ac = createElement&#40;&div&&#41;;
& & & & & & & & if &#40;ua.win && ua.ie&#41; &#123;
& & & & & & & & & & & & ac.innerHTML = obj.innerHTML;
& & & & & & & & &#125;
& & & & & & & & else &#123;
& & & & & & & & & & & & var nestedObj = obj.getElementsByTagName&#40;OBJECT&#41;&#91;0&#93;;
& & & & & & & & & & & & if &#40;nestedObj&#41; &#123;
& & & & & & & & & & & & & & & & var c = nestedObj.childNodes;
& & & & & & & & & & & & & & & & if &#40;c&#41; &#123;
& & & & & & & & & & & & & & & & & & & & var cl = c.length;
& & & & & & & & & & & & & & & & & & & & for &#40;var i = 0; i & cl; i++&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & if &#40;!&#40;c&#91;i&#93;.nodeType == 1 && c&#91;i&#93;.nodeName == &PARAM&&#41; && !&#40;c&#91;i&#93;.nodeType == 8&#41;&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & ac.appendChild&#40;c&#91;i&#93;.cloneNode&#40;true&#41;&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;
& & & & & & & & return ac;
& & & & &#125;
& & & & /* Cross-browser dynamic SWF creation
& & & & */
& & & & function createSWF&#40;attObj, parObj, id&#41; &#123;
& & & & & & & & var r, el = getElementById&#40;id&#41;;
& & & & & & & & if &#40;ua.wk && ua.wk & 312&#41; &#123; return r; &#125;
& & & & & & & & if &#40;el&#41; &#123;
& & & & & & & & & & & & if &#40;typeof attObj.id == UNDEF&#41; &#123; // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
& & & & & & & & & & & & & & & & attObj.id = id;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & if &#40;ua.ie && ua.win&#41; &#123; // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
& & & & & & & & & & & & & & & & var att = &&;
& & & & & & & & & & & & & & & & for &#40;var i in attObj&#41; &#123;
& & & & & & & & & & & & & & & & & & & & if &#40;attObj&#91;i&#93; != Object.prototype&#91;i&#93;&#41; &#123; // filter out prototype additions from other potential libraries
& & & & & & & & & & & & & & & & & & & & & & & & if &#40;i.toLowerCase&#40;&#41; == &data&&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & parObj.movie = attObj&#91;i&#93;;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & else if &#40;i.toLowerCase&#40;&#41; == &styleclass&&#41; &#123; // 'class' is an ECMA4 reserved keyword
& & & & & & & & & & & & & & & & & & & & & & & & & & & & att += ' class=&' + attObj&#91;i&#93; + '&';
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & else if &#40;i.toLowerCase&#40;&#41; != &classid&&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & att += ' ' + i + '=&' + attObj&#91;i&#93; + '&';
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & var par = &&;
& & & & & & & & & & & & & & & & for &#40;var j in parObj&#41; &#123;
& & & & & & & & & & & & & & & & & & & & if &#40;parObj&#91;j&#93; != Object.prototype&#91;j&#93;&#41; &#123; // filter out prototype additions from other potential libraries
& & & & & & & & & & & & & & & & & & & & & & & & par += '&param name=&' + j + '& value=&' + parObj&#91;j&#93; + '& /&';
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & el.outerHTML = '&object classid=&clsid:D27CDB6E-AE6D-11cf-96B8-&' + att + '&' + par + '&/object&';
& & & & & & & & & & & & & & & & objIdArr&#91;objIdArr.length&#93; = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
& & & & & & & & & & & & & & & & r = getElementById&#40;attObj.id&#41;;&
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & else &#123; // well-behaving browsers
& & & & & & & & & & & & & & & & var o = createElement&#40;OBJECT&#41;;
& & & & & & & & & & & & & & & & o.setAttribute&#40;&type&, FLASH_MIME_TYPE&#41;;
& & & & & & & & & & & & & & & & for &#40;var m in attObj&#41; &#123;
& & & & & & & & & & & & & & & & & & & & if &#40;attObj&#91;m&#93; != Object.prototype&#91;m&#93;&#41; &#123; // filter out prototype additions from other potential libraries
& & & & & & & & & & & & & & & & & & & & & & & & if &#40;m.toLowerCase&#40;&#41; == &styleclass&&#41; &#123; // 'class' is an ECMA4 reserved keyword
& & & & & & & & & & & & & & & & & & & & & & & & & & & & o.setAttribute&#40;&class&, attObj&#91;m&#93;&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & else if &#40;m.toLowerCase&#40;&#41; != &classid&&#41; &#123; // filter out IE specific attribute
& & & & & & & & & & & & & & & & & & & & & & & & & & & & o.setAttribute&#40;m, attObj&#91;m&#93;&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & for &#40;var n in parObj&#41; &#123;
& & & & & & & & & & & & & & & & & & & & if &#40;parObj&#91;n&#93; != Object.prototype&#91;n&#93; && n.toLowerCase&#40;&#41; != &movie&&#41; &#123; // filter out prototype additions from other potential libraries and IE specific param element
& & & & & & & & & & & & & & & & & & & & & & & & createObjParam&#40;o, n, parObj&#91;n&#93;&#41;;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & el.parentNode.replaceChild&#40;o, el&#41;;
& & & & & & & & & & & & & & & & r = o;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;
& & & & & & & & return r;
& & & & &#125;
& & & & function createObjParam&#40;el, pName, pValue&#41; &#123;
& & & & & & & & var p = createElement&#40;&param&&#41;;
& & & & & & & & p.setAttribute&#40;&name&, pName&#41;;&
& & & & & & & & p.setAttribute&#40;&value&, pValue&#41;;
& & & & & & & & el.appendChild&#40;p&#41;;
& & & & &#125;
& & & & /* Cross-browser SWF removal
& & & & & & & & - Especially needed to safely and completely remove a SWF in Internet Explorer
& & & & */
& & & & function removeSWF&#40;id&#41; &#123;
& & & & & & & & var obj = getElementById&#40;id&#41;;
& & & & & & & & if &#40;obj && obj.nodeName == &OBJECT&&#41; &#123;
& & & & & & & & & & & & if &#40;ua.ie && ua.win&#41; &#123;
& & & & & & & & & & & & & & & & obj.style.display = &none&;
& & & & & & & & & & & & & & & & &#40;function&#40;&#41;&#123;
& & & & & & & & & & & & & & & & & & & & if &#40;obj.readyState == 4&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & removeObjectInIE&#40;id&#41;;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & else &#123;
& & & & & & & & & & & & & & & & & & & & & & & & setTimeout&#40;arguments.callee, 10&#41;;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & &#125;&#41;&#40;&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & else &#123;
& & & & & & & & & & & & & & & & obj.parentNode.removeChild&#40;obj&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;
& & & & &#125;
& & & & function removeObjectInIE&#40;id&#41; &#123;
& & & & & & & & var obj = getElementById&#40;id&#41;;
& & & & & & & & if &#40;obj&#41; &#123;
& & & & & & & & & & & & for &#40;var i in obj&#41; &#123;
& & & & & & & & & & & & & & & & if &#40;typeof obj&#91;i&#93; == &function&&#41; &#123;
& & & & & & & & & & & & & & & & & & & & obj&#91;i&#93; = null;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & obj.parentNode.removeChild&#40;obj&#41;;
& & & & & & & & &#125;
& & & & &#125;
& & & & /* Functions to optimize JavaScript compression
& & & & */
& & & & function getElementById&#40;id&#41; &#123;
& & & & & & & & var el = null;
& & & & & & & & try &#123;
& & & & & & & & & & & & el = doc.getElementById&#40;id&#41;;
& & & & & & & & &#125;
& & & & & & & & catch &#40;e&#41; &#123;&#125;
& & & & & & & & return el;
& & & & &#125;
& & & & function createElement&#40;el&#41; &#123;
& & & & & & & & return doc.createElement&#40;el&#41;;
& & & & &#125;
& & & & /* Updated attachEvent function for Internet Explorer
& & & & & & & & - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
& & & & */& & &
& & & & function addListener&#40;target, eventType, fn&#41; &#123;
& & & & & & & & target.attachEvent&#40;eventType, fn&#41;;
& & & & & & & & listenersArr&#91;listenersArr.length&#93; = &#91;target, eventType, fn&#93;;
& & & & &#125;
& & & & /* Flash Player and SWF content version matching
& & & & */
& & & & function hasPlayerVersion&#40;rv&#41; &#123;
& & & & & & & & var pv = ua.pv, v = rv.split&#40;&.&&#41;;
& & & & & & & & v&#91;0&#93; = parseInt&#40;v&#91;0&#93;, 10&#41;;
& & & & & & & & v&#91;1&#93; = parseInt&#40;v&#91;1&#93;, 10&#41; || 0; // supports short notation, e.g. &9& instead of &9.0.0&
& & & & & & & & v&#91;2&#93; = parseInt&#40;v&#91;2&#93;, 10&#41; || 0;
& & & & & & & & return &#40;pv&#91;0&#93; & v&#91;0&#93; || &#40;pv&#91;0&#93; == v&#91;0&#93; && pv&#91;1&#93; & v&#91;1&#93;&#41; || &#40;pv&#91;0&#93; == v&#91;0&#93; && pv&#91;1&#93; == v&#91;1&#93; && pv&#91;2&#93; &= v&#91;2&#93;&#41;&#41; ? true : false;
& & & & &#125;
& & & & /* Cross-browser dynamic CSS creation
& & & & & & & & - Based on Bobby van der Sluis' solution: /articles/dynamicCSS.php
& & & & */& & &
& & & & function createCSS&#40;sel, decl, media, newStyle&#41; &#123;
& & & & & & & & if &#40;ua.ie && ua.mac&#41; &#123; return; &#125;
& & & & & & & & var h = doc.getElementsByTagName&#40;&head&&#41;&#91;0&#93;;
& & & & & & & & if &#40;!h&#41; &#123; return; &#125; // to also support badly authored HTML pages that lack a head element
& & & & & & & & var m = &#40;media && typeof media == &string&&#41; ? media : &screen&;
& & & & & & & & if &#40;newStyle&#41; &#123;
& & & & & & & & & & & & dynamicStylesheet = null;
& & & & & & & & & & & & dynamicStylesheetMedia = null;
& & & & & & & & &#125;
& & & & & & & & if &#40;!dynamicStylesheet || dynamicStylesheetMedia != m&#41; &#123;
& & & & & & & & & & & & // create dynamic stylesheet + get a global reference to it
& & & & & & & & & & & & var s = createElement&#40;&style&&#41;;
& & & & & & & & & & & & s.setAttribute&#40;&type&, &text/css&&#41;;
& & & & & & & & & & & & s.setAttribute&#40;&media&, m&#41;;
& & & & & & & & & & & & dynamicStylesheet = h.appendChild&#40;s&#41;;
& & & & & & & & & & & & if &#40;ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length & 0&#41; &#123;
& & & & & & & & & & & & & & & & dynamicStylesheet = doc.styleSheets&#91;doc.styleSheets.length - 1&#93;;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & dynamicStylesheetMedia = m;
& & & & & & & & &#125;
& & & & & & & & // add style rule
& & & & & & & & if &#40;ua.ie && ua.win&#41; &#123;
& & & & & & & & & & & & if &#40;dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT&#41; &#123;
& & & & & & & & & & & & & & & & dynamicStylesheet.addRule&#40;sel, decl&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;
& & & & & & & & else &#123;
& & & & & & & & & & & & if &#40;dynamicStylesheet && typeof doc.createTextNode != UNDEF&#41; &#123;
& & & & & & & & & & & & & & & & dynamicStylesheet.appendChild&#40;doc.createTextNode&#40;sel + & {& + decl + &}&&#41;&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;
& & & & &#125;
& & & & function setVisibility&#40;id, isVisible&#41; &#123;
& & & & & & & & if &#40;!autoHideShow&#41; &#123; return; &#125;
& & & & & & & & var v = isVisible ? &visible& : &hidden&;
& & & & & & & & if &#40;isDomLoaded && getElementById&#40;id&#41;&#41; &#123;
& & & & & & & & & & & & getElementById&#40;id&#41;.style.visibility = v;
& & & & & & & & &#125;
& & & & & & & & else &#123;
& & & & & & & & & & & & createCSS&#40;&#& + id, &visibility:& + v&#41;;
& & & & & & & & &#125;
& & & & &#125;
& & & & /* Filter to avoid XSS attacks
& & & & */
& & & & function urlEncodeIfNecessary&#40;s&#41; &#123;
& & & & & & & & var regex = /[\\\&&&\.;]/;
& & & & & & & & var hasBadChars = regex.exec&#40;s&#41; != null;
& & & & & & & & return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent&#40;s&#41; : s;
& & & & &#125;
& & & & /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
& & & & */
& & & & var cleanup = function&#40;&#41; &#123;
& & & & & & & & if &#40;ua.ie && ua.win&#41; &#123;
& & & & & & & & & & & & window.attachEvent&#40;&onunload&, function&#40;&#41; &#123;
& & & & & & & & & & & & & & & & // remove listeners to avoid memory leaks
& & & & & & & & & & & & & & & & var ll = listenersArr.length;
& & & & & & & & & & & & & & & & for &#40;var i = 0; i & ll; i++&#41; &#123;
& & & & & & & & & & & & & & & & & & & & listenersArr&#91;i&#93;&#91;0&#93;.detachEvent&#40;listenersArr&#91;i&#93;&#91;1&#93;, listenersArr&#91;i&#93;&#91;2&#93;&#41;;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
& & & & & & & & & & & & & & & & var il = objIdArr.length;
& & & & & & & & & & & & & & & & for &#40;var j = 0; j & il; j++&#41; &#123;
& & & & & & & & & & & & & & & & & & & & removeSWF&#40;objIdArr&#91;j&#93;&#41;;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & // cleanup library's main closures to avoid memory leaks
& & & & & & & & & & & & & & & & for &#40;var k in ua&#41; &#123;
& & & & & & & & & & & & & & & & & & & & ua&#91;k&#93; = null;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & ua = null;
& & & & & & & & & & & & & & & & for &#40;var l in swfobject&#41; &#123;
& & & & & & & & & & & & & & & & & & & & swfobject&#91;l&#93; = null;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & swfobject = null;
& & & & & & & & & & & & &#125;&#41;;
& & & & & & & & &#125;
& & & & &#125;&#40;&#41;;
& & & & return &#123;
& & & & & & & & /* Public API
& & & & & & & & & & & & - Reference: /p/swfobject/wiki/documentation
& & & & & & & & */
& & & & & & & & registerObject: function&#40;objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn&#41; &#123;
& & & & & & & & & & & & if &#40;ua.w3 && objectIdStr && swfVersionStr&#41; &#123;
& & & & & & & & & & & & & & & & var regObj = &#123;&#125;;
& & & & & & & & & & & & & & & & regObj.id = objectIdStr;
& & & & & & & & & & & & & & & & regObj.swfVersion = swfVersionStr;
& & & & & & & & & & & & & & & & regObj.expressInstall = xiSwfUrlStr;
& & & & & & & & & & & & & & & & regObj.callbackFn = callbackFn;
& & & & & & & & & & & & & & & & regObjArr&#91;regObjArr.length&#93; = regObj;
& & & & & & & & & & & & & & & & setVisibility&#40;objectIdStr, false&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & else if &#40;callbackFn&#41; &#123;
& & & & & & & & & & & & & & & & callbackFn&#40;&#123;success:false, id:objectIdStr&#125;&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;,
& & & & & & & &
& & & & & & & & getObjectById: function&#40;objectIdStr&#41; &#123;
& & & & & & & & & & & & if &#40;ua.w3&#41; &#123;
& & & & & & & & & & & & & & & & return getObjectById&#40;objectIdStr&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;,
& & & & & & & &
& & & & & & & & embedSWF: function&#40;swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn&#41; &#123;
& & & & & & & & & & & & var callbackObj = &#123;success:false, id:replaceElemIdStr&#125;;
& & & & & & & & & & & & if &#40;ua.w3 && !&#40;ua.wk && ua.wk & 312&#41; && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr&#41; &#123;
& & & & & & & & & & & & & & & & setVisibility&#40;replaceElemIdStr, false&#41;;
& & & & & & & & & & & & & & & & addDomLoadEvent&#40;function&#40;&#41; &#123;
& & & & & & & & & & & & & & & & & & & & widthStr += &&; // auto-convert to string
& & & & & & & & & & & & & & & & & & & & heightStr += &&;
& & & & & & & & & & & & & & & & & & & & var att = &#123;&#125;;
& & & & & & & & & & & & & & & & & & & & if &#40;attObj && typeof attObj === OBJECT&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & for &#40;var i in attObj&#41; &#123; // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
& & & & & & & & & & & & & & & & & & & & & & & & & & & & att&#91;i&#93; = attObj&#91;i&#93;;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & att.data = swfUrlStr;
& & & & & & & & & & & & & & & & & & & & att.width = widthStr;
& & & & & & & & & & & & & & & & & & & & att.height = heightStr;
& & & & & & & & & & & & & & & & & & & & var par = &#123;&#125;;
& & & & & & & & & & & & & & & & & & & & if &#40;parObj && typeof parObj === OBJECT&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & for &#40;var j in parObj&#41; &#123; // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
& & & & & & & & & & & & & & & & & & & & & & & & & & & & par&#91;j&#93; = parObj&#91;j&#93;;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & if &#40;flashvarsObj && typeof flashvarsObj === OBJECT&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & for &#40;var k in flashvarsObj&#41; &#123; // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
& & & & & & & & & & & & & & & & & & & & & & & & & & & & if &#40;typeof par.flashvars != UNDEF&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & par.flashvars += &&& + k + &=& + flashvarsObj&#91;k&#93;;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & else &#123;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & par.flashvars = k + &=& + flashvarsObj&#91;k&#93;;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & if &#40;hasPlayerVersion&#40;swfVersionStr&#41;&#41; &#123; // create SWF
& & & & & & & & & & & & & & & & & & & & & & & & var obj = createSWF&#40;att, par, replaceElemIdStr&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & if &#40;att.id == replaceElemIdStr&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & & & & & setVisibility&#40;replaceElemIdStr, true&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & & & & & callbackObj.success = true;
& & & & & & & & & & & & & & & & & & & & & & & & callbackObj.ref = obj;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & else if &#40;xiSwfUrlStr && canExpressInstall&#40;&#41;&#41; &#123; // show Adobe Express Install
& & & & & & & & & & & & & & & & & & & & & & & & att.data = xiSwfUrlStr;
& & & & & & & & & & & & & & & & & & & & & & & & showExpressInstall&#40;att, par, replaceElemIdStr, callbackFn&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & return;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & else &#123; // show alternative content
& & & & & & & & & & & & & & & & & & & & & & & & setVisibility&#40;replaceElemIdStr, true&#41;;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & if &#40;callbackFn&#41; &#123; callbackFn&#40;callbackObj&#41;; &#125;
& & & & & & & & & & & & & & & & &#125;&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & else if &#40;callbackFn&#41; &#123; callbackFn&#40;callbackObj&#41;; &#125;
& & & & & & & & &#125;,
& & & & & & & &
& & & & & & & & switchOffAutoHideShow: function&#40;&#41; &#123;
& & & & & & & & & & & & autoHideShow = false;
& & & & & & & & &#125;,
& & & & & & & &
& & & & & & & & ua: ua,
& & & & & & & &
& & & & & & & & getFlashPlayerVersion: function&#40;&#41; &#123;
& & & & & & & & & & & & return &#123; major:ua.pv&#91;0&#93;, minor:ua.pv&#91;1&#93;, release:ua.pv&#91;2&#93; &#125;;
& & & & & & & & &#125;,
& & & & & & & &
& & & & & & & & hasFlashPlayerVersion: hasPlayerVersion,
& & & & & & & &
& & & & & & & & createSWF: function&#40;attObj, parObj, replaceElemIdStr&#41; &#123;
& & & & & & & & & & & & if &#40;ua.w3&#41; &#123;
& & & & & & & & & & & & & & & & return createSWF&#40;attObj, parObj, replaceElemIdStr&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & else &#123;
& & & & & & & & & & & & & & & & return undefined;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;,
& & & & & & & &
& & & & & & & & showExpressInstall: function&#40;att, par, replaceElemIdStr, callbackFn&#41; &#123;
& & & & & & & & & & & & if &#40;ua.w3 && canExpressInstall&#40;&#41;&#41; &#123;
& & & & & & & & & & & & & & & & showExpressInstall&#40;att, par, replaceElemIdStr, callbackFn&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;,
& & & & & & & &
& & & & & & & & removeSWF: function&#40;objElemIdStr&#41; &#123;
& & & & & & & & & & & & if &#40;ua.w3&#41; &#123;
& & & & & & & & & & & & & & & & removeSWF&#40;objElemIdStr&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;,
& & & & & & & &
& & & & & & & & createCSS: function&#40;selStr, declStr, mediaStr, newStyleBoolean&#41; &#123;
& & & & & & & & & & & & if &#40;ua.w3&#41; &#123;
& & & & & & & & & & & & & & & & createCSS&#40;selStr, declStr, mediaStr, newStyleBoolean&#41;;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;,
& & & & & & & &
& & & & & & & & addDomLoadEvent: addDomLoadEvent,
& & & & & & & &
& & & & & & & & addLoadEvent: addLoadEvent,
& & & & & & & &
& & & & & & & & getQueryParamValue: function&#40;param&#41; &#123;
& & & & & & & & & & & & var q = doc.location.search || doc.location.hash;
& & & & & & & & & & & & if &#40;q&#41; &#123;
& & & & & & & & & & & & & & & & if &#40;/\?/.test&#40;q&#41;&#41; &#123; q = q.split&#40;&?&&#41;&#91;1&#93;; &#125; // strip question mark
& & & & & & & & & & & & & & & & if &#40;param == null&#41; &#123;
& & & & & & & & & & & & & & & & & & & & return urlEncodeIfNecessary&#40;q&#41;;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & var pairs = q.split&#40;&&&&#41;;
& & & & & & & & & & & & & & & & for &#40;var i = 0; i & pairs.length; i++&#41; &#123;
& & & & & & & & & & & & & & & & & & & & if &#40;pairs&#91;i&#93;.substring&#40;0, pairs&#91;i&#93;.indexOf&#40;&=&&#41;&#41; == param&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & return urlEncodeIfNecessary&#40;pairs&#91;i&#93;.substring&#40;&#40;pairs&#91;i&#93;.indexOf&#40;&=&&#41; + 1&#41;&#41;&#41;;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & &#125;
& & & & & & & & & & & & return &&;
& & & & & & & & &#125;,
& & & & & & & &
& & & & & & & & // For internal usage only
& & & & & & & & expressInstallCallback: function&#40;&#41; &#123;
& & & & & & & & & & & & if &#40;isExpressInstallActive&#41; &#123;
& & & & & & & & & & & & & & & & var obj = getElementById&#40;EXPRESS_INSTALL_ID&#41;;
& & & & & & & & & & & & & & & & if &#40;obj && storedAltContent&#41; &#123;
& & & & & & & & & & & & & & & & & & & & obj.parentNode.replaceChild&#40;storedAltContent, obj&#41;;
& & & & & & & & & & & & & & & & & & & & if &#40;storedAltContentId&#41; &#123;
& & & & & & & & & & & & & & & & & & & & & & & & setVisibility&#40;storedAltContentId, true&#41;;
& & & & & & & & & & & & & & & & & & & & & & & & if &#40;ua.ie && ua.win&#41; &#123; storedAltContent.style.display = &block&; &#125;
& & & & & & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & & & & & if &#40;storedCallbackFn&#41; &#123; storedCallbackFn&#40;storedCallbackObj&#41;; &#125;
& & & & & & & & & & & & & & & & &#125;
& & & & & & & & & & & & & & & & isExpressInstallActive = false;
& & & & & & & & & & & & &#125;
& & & & & & & & &#125;
& & & & &#125;;
&#125;&#40;&#41;;
- 下载整个
相关源码/软件:
利用Session对象制作留言或意见反馈程序,没有数据库,只是练习Session对...
- Hishop 的开发已经有5年的历史了,它架构于B2C,而且是免费软件。企业、个人、淘宝、拍拍、易趣...
- SampleChat Ajax聊天程序ASP.NET,主要是让初学者学习如何在ASP.NET页面内使...
- ASP.NET上传图片,并适时显示,学习ASP.NET编程必备的一个实例,上传文件也算是比较普通的一...
- LearnSite ASP.NET教学管理系统,无Flash上传控件终结版。  包含以下五方...
- 一个在ASP.NET环境下运行的网页拖动实例,运行之前最好确保安装有Atlas。内含三个网页拖动实例...
- fileManage 一款基于ASP.NET的在线文件管理程序,主要是通过FSO对文件和目录进行操作...
- EfsFrame是一套整体的企业级WEB开发框架,整个框架体系中包含了Web表现层开发包,组件开发包...
- Atlas及Asp.NET AJAX实例演示,压缩包内附有Atlas的下载及安装使用说明。实例中两个...
- ASP.NET使用Application实现网站计数器,实现最简单的网页访客计数,最基本的一个实现,...
- 简单天气查询源码是一个简单的联网获取天气信息并显示到控件上的小例子源码,非常适合新手学习简单的联网j...
- 创建、删除桌面快捷方式源码是一个在安卓手机桌面上创建和删除快捷方式的例子源码,在我的2.3.7摩托罗...
- 安卓便签记事本源码添加文本后默认文本是全文显示的,点击以后可以转换成预览显示,即只显示第一行文字。点...
- 安卓PDF阅读器精简版应用启动后直接加载SD卡目录,列出文件夹和文件信息。点击PDF文件就可以直接打...
- 支持单号扫描的快递查询源码基于安卓的快递查询项目源码,学生毕设作品,使用了爱查快递http://ww...
- 仿支付宝手势密码的功能在分辨率上显示有问题,在 854x480上没有问题,项目编码U...
- 简单音乐播放器源码是一个非常简单的音乐播放器项目源码,可以把SD卡上的音乐扫描出来并填充到ListV...
- 仿百度桌面转盘小工具源码是一个高仿安卓百度桌面原型小工具项目源码,启动应用后会有一个转盘效果,默认显...
- 安卓手机打车源码只包括用户端项目源码,没有司机端和服务端源码,因为服务端IP地址有变动导致项目不能正...
- 加密短信源码TextSecure是Whisper Systems(现已经被Twitter收购)出品的...

我要回帖

更多关于 swfobject.js 2.3 的文章

 

随机推荐