/*
++++++++++++++++++++++
+ Some background    +
++++++++++++++++++++++    
Microsoft got into some law suit with Eolas Technologies about patents of ActiveX controls being 
immediately available to the user (and browser). While most people are not to keen on ActiveX controls,
 this has had a knock on effect onto other objects such as Flash and any other object that uses 
 <OBJECT> <EMBED> or <APPLET> tags.

Before user can interact with the object, user first have to click on it to activate it. 
This is not really a problem with a movie that just plays as that is allowed, the problem rises 
with a button created in flash as you have to first click the object to activate it then click it
 again to actually use it! Very frustrating!


This is serveral ways to fix this issue. Here are the common two

Fix #1
Courtesy of Mix FX

Create a javascript file,  for example, ieObjectActivation.js, and paste in the following Code:
theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
theObjects[i].outerHTML = theObjects[i].outerHTML;
}

Then just before the closing </body> tag you need to paste the following
Code:
<script language="Javascript" type="text/Javascript" src="ieObjectActivation.js"></script>

This simple bit of code will scan through the html and replace the objects with copies of themselves. 
Apparently, this is not an infringement of the patent as the object is now called by 
an external source, not inline code.

Now this fix works for very simple objects, however, I found there was 2 problems with our code.

   1. The screen is drawn, then all the objects disapear and are then re-drawn. Not very pleasing to the eye.
   2. Problems seemed to occur with applet loading, it removes all params


So...

Fix #2
Again, We have to use an external js file and call it, 
but the object is this time created by the javascript, not replaced. 
It's also pretty simple to modify our existing code.

Create a javascript file,  for example, ieObjectActivation.js, and paste in the following Code:
    function writeHTML(htmlString) {
     document.write(htmlString);
    }       
Load the java script file into webserver.

Modify Splash.jsp:
	replace 
		<OBJECT ......> ......................... </OBJECT>
	with 
		<SCRIPT type="text/javascript">
   		writeHTML('<OBJECT ......> ......................... </OBJECT>');
   		</SCRIPT>


 Modify AbstractAppletTagBuilder.buildAppletObjectTag() method to wrap object tag string inside SCRIPT tag
        AbstractAppletTagBuilder.getObjectTag() should return like:

 		<SCRIPT type="text/javascript">
   		writeHTML('<OBJECT ......> ......................... </OBJECT>');
   		</SCRIPT>
        
 
FIX #2 works a lot better as it only draws the object once and keeps the integrity of the param lines for applet.
*/   
    
    
    
function writeHTML(htmlString) {
	document.write(htmlString);
}       
   
