1. /* 2. activateActiveX 3. --------------- 4. Purpose:  Dynamically replace any elements that will be affected by the new security feature in IE6/IE7 that requires a user to click certain types of elements to activate them before use. 5.  6. Usage:  Include this file at the end of your html document using the following... 7.     <script language="JScript" type="text/jscript" src="activateActiveX.js"></script> 8.      9. 10. 11. Since this script is in response to a software patent lawsuit, I feel it necessary to state the following...    12. 13. License:14. activateActiveX is Copyright (C) 2006 Jason Baker (therippa AT gmail.com). It is available as open source code from:15. http://therippa.blogspot.com16. 17. 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.18. 19. 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20. */21. 22. 23. //Determine browser, we only need this for Internet Explorer24. if (navigator.appName == "Microsoft Internet Explorer") {25.     26.     //Array of elements to be replaced27.     var arrElements = new Array(3);28.     arrElements[0] = "object";29.     arrElements[1] = "embed";30.     arrElements[2] = "applet";31. 32.     33.     //Loop over element types34.     for (n = 0; n < arrElements.length; n++) {35.     36.         //set object for brevity37.         replaceObj = document.getElementsByTagName(arrElements[n]);38.         39.         //loop over element objects returned40.         for (i = 0; i < replaceObj.length; i++ ) {41.         42.             //set parent object for brevity43.             parentObj = replaceObj[i].parentNode;44.             45.             //grab the html inside of the element before removing it from the DOM46.             newHTML = parentObj.innerHTML;47.             48.             //remove element from the DOM49.             parentObj.removeChild(replaceObj[i]);50.             51.             //stick the element right back in, but as a new object52.             parentObj.innerHTML = newHTML;53.         54.             }55.         }56.     }57.     58. 
