/*
* File: activex_controls.js
*
* Author: Erin L. Parrill
*
* Purpose: Users can no longer directly interact with Microsoft ActiveX controls loaded by the 
* 			APPLET, EMBED, or OBJECT elements, due to changes made to Internet Explorer effective 04/11/06. 
*			Users now can only interact with such controls after activating their user interfaces.  
*			This file contains functions to load the ActiveX controls without requiring any 
*			interaction from the user.
*/

function insertSWF(divID, classID, objectID, width, height, url, flashVars) {
	/*
	* Replaces the divID with an Object tag, built with the parameters sent in to the function.
	*
	* params: 	divID - the ID of the DIV tag being replaced
	*			classID - classid parameter of the object tag
	*			objectID - the ID of the object tag being inserted
	*			width - width of the swf being embedded
	*			height - height of the swf being embedded
	*			url - url of the swf being embedded
	*			flashVars - any variables to be sent to Flash using the flashvars parameter
	* returns: 	none
	*/
	
	var divToReplace = document.getElementById(divID);
	
	divToReplace.innerHTML = '<object classid=' + classID + ' id=' + objectID + ' width=' + width + ' height=' + height +'>' +
			'<param name="allowScriptAccess" value="sameDomain" />' +
			'<param name="movie" value="' + url + '" />' +
			'<param name="quality" value="high" />' +
			'<param name="bgcolor" value="#FFFFFF" />' +
			'<param name="salign" value="TL" />' +
			'<param name="FlashVars" value="' + flashVars + '">' +
			'<embed src="' + url + '" flashvars="' + flashVars + '" quality="high" bgcolor="#ffffff" width="' + width + '" height="' + height + '" name="' + objectID + '" align="middle" salign="TL" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	
} // end insertSWF