/***************************************************************************************** 
 * This function provides a fix for IE where flash movies aren't automatically initialized
 * which can cause some problems on the page like flashing, and cause the flash movie to
 * discontinue loading. This function works on ALL browsers so that you don't have to
 * do anything special in your code to deal with IE and Non-IE browsers. Just treat all
 * browsers as if they were IE for flash movies, and this function will make sure it
 * works on all of them.
 *
 * To make a FLASH object NOT require a CLICK within it's area to be activated and run as 
 * it should, a document.write() containing the HTML for the usual OBJECT tag HTML needs
 * to be issued. Strangely, the document.write needs to be done in an external JavaScript
 * file to work.
 *
 * @author		Kurt Bonnet
 * @elementID	Text ID for the <DIV> tag that contains the flash movie HTML.
 *				The ONLY HTML in the DIV tag should be the flash movie HTML,
 *				(object tags and their children) and the "flashFix" JavaScript.
 *
 * This function should be called DIRECTLY BEFORE the closing DIV tag containing the
 * flash movie. Simply pass in the ID of the DIV with the flash movie to this function,
 * and this function will activate the movie without any user interaction.
 *
 *
 * Example Usage:
 * --------------------------------------------------------
 * <SCRIPT type="text/javascript" src="flashFix.js" ></SCRIPT>
 *
 * <div id="myFlashMovie" >
 *   <object classid="03454353" ......
 *   .......
 *   </object>
 *   <script type="text/javascript" >
 *	  flashFix('myFlashMovie');
 *   </script>
 * </div>
 *
 */
function flashFix(elementID) {
	if(document.getElementById) {
		var flashContainer = document.getElementById(elementID);
		var ih = flashContainer.innerHTML;
	
		// Strip the SCRIPT block from the DIV to prevent recursion.
		ih = ih.substring(0, ih.toLowerCase().indexOf('<script'));
	
		flashContainer.innerHTML = '';
		document.write( ih );	
	}
}