(att, par, replaceElemIdStr, callbackFn)
| 310 | - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75 |
| 311 | */ |
| 312 | function showExpressInstall(att, par, replaceElemIdStr, callbackFn) { |
| 313 | isExpressInstallActive = true; |
| 314 | storedCallbackFn = callbackFn || null; |
| 315 | storedCallbackObj = {success:false, id:replaceElemIdStr}; |
| 316 | var obj = getElementById(replaceElemIdStr); |
| 317 | if (obj) { |
| 318 | if (obj.nodeName == "OBJECT") { // static publishing |
| 319 | storedAltContent = abstractAltContent(obj); |
| 320 | storedAltContentId = null; |
| 321 | } |
| 322 | else { // dynamic publishing |
| 323 | storedAltContent = obj; |
| 324 | storedAltContentId = replaceElemIdStr; |
| 325 | } |
| 326 | att.id = EXPRESS_INSTALL_ID; |
| 327 | if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; } |
| 328 | if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; } |
| 329 | doc.title = doc.title.slice(0, 47) + " - Flash Player Installation"; |
| 330 | var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn", |
| 331 | fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title; |
| 332 | if (typeof par.flashvars != UNDEF) { |
| 333 | par.flashvars += "&" + fv; |
| 334 | } |
| 335 | else { |
| 336 | par.flashvars = fv; |
| 337 | } |
| 338 | // 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, |
| 339 | // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work |
| 340 | if (ua.ie && ua.win && obj.readyState != 4) { |
| 341 | var newObj = createElement("div"); |
| 342 | replaceElemIdStr += "SWFObjectNew"; |
| 343 | newObj.setAttribute("id", replaceElemIdStr); |
| 344 | obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf |
| 345 | obj.style.display = "none"; |
| 346 | (function(){ |
| 347 | if (obj.readyState == 4) { |
| 348 | obj.parentNode.removeChild(obj); |
| 349 | } |
| 350 | else { |
| 351 | setTimeout(arguments.callee, 10); |
| 352 | } |
| 353 | })(); |
| 354 | } |
| 355 | createSWF(att, par, replaceElemIdStr); |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | /* Functions to abstract and display alternative content |
| 360 | */ |
no test coverage detected