/*
License: activateActiveX is Copyright (C) 2006 Jason Baker (therippa AT gmail.com). It is available as open source code from: http://therippa.blogspot.com
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details http://www.gnu.org/licenses/gpl.html
*/
window.onload=function () {
  if (navigator.appName=='Microsoft Internet Explorer') {
    var div=document.getElementsByTagName('div');
    for (var i=0;i<div.length;i++) {
      if (div[i].className.indexOf('flash')>=0) {
        var flash=div[i].removeChild(div[i].childNodes[0]);
        var eleres;
        if(flash.getAttribute('data')!='') eleres=flash.getAttribute('data');
        else eleres=flash.getAttribute('movie');
        var so=new SWFObject(eleres,eleres,flash.getAttribute('width'),flash.getAttribute('height'),'8','#ffffff');
		so.addParam('wmode','transparent');
        so.addParam('bgcolor','#fff');
		so.write(div[i].getAttribute('id'));
      }
    }
    /*
    var arrElements=new Array(3);
    arrElements[0]='object';
    arrElements[1]='embed';
    arrElements[2]='applet';
    for (var n=0;n<arrElements.length;n++) {
      replaceObj=document.getElementsByTagName(arrElements[n]);
      for (var i=0;i<replaceObj.length;i++) {
        parentObj=replaceObj[i].parentNode;
        newHTML=parentObj.innerHTML;
        parentObj.removeChild(replaceObj[i]);
        parentObj.innerHTML=newHTML;
      }
    }
    */
  }
}