[ Index ]

PHP Cross Reference of Nuke-Evolution v2.0.5

title

Body

[close]

/includes/ -> embed_fix.js (source)

   1  function ieupdate() {
   2      // Mark Bennett
   3      // Code to rewrite the swfs for the msie update
   4      // only affects ie on a pc
   5      if (isIE()) {
   6          var theObjects = document.getElementsByTagName("object");
   7          var theObjectsLen = theObjects.length;
   8          for (var i = 0; i < theObjectsLen; i++) {
   9              if (theObjects[i].outerHTML) {
  10                  // does the object use the 'data' attribute?
  11                  // if so msie completely ignores any <param> in the outerHTML
  12                  // so lets ditch it, as msie doesn't use it, only mozilla etc
  13                  if (theObjects[i].data) {
  14                      theObjects[i].removeAttribute("data");
  15                  }
  16                  theObjects[i].outerHTML = theObjects[i].outerHTML;
  17              }
  18          }
  19      }
  20  }
  21  
  22  function isIE() {
  23    // only for Win IE 6+
  24    // But not in Windows 98, Me, NT 4.0, 2000
  25    var strBrwsr= navigator.userAgent.toLowerCase();
  26    if (strBrwsr.indexOf("msie") > -1 && strBrwsr.indexOf("mac") < 0) {
  27      if (parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5)) < 6) {
  28        return false;
  29      }
  30      if (strBrwsr.indexOf("win98") > -1 ||
  31         strBrwsr.indexOf("win 9x 4.90") > -1 ||
  32         strBrwsr.indexOf("winnt4.0") > -1 ||
  33         strBrwsr.indexOf("windows nt 5.0") > -1)
  34      {
  35        return false;
  36      }
  37      return true;
  38    } else {
  39      return false;
  40    }
  41  }
  42  
  43  if (window.attachEvent)
  44      window.attachEvent("onload", ieupdate)
  45  else if (document.getElementById)
  46      womAdd('ieupdate()');


Generated: Wed Jun 6 11:38:01 2007 Cross-referenced by PHPXref 0.7