// sample_SWF.js   Writes the html code for object and embed tags, so that the SWF it calls runs properly in IE

function writeSwfTag(swfFile,intWidth,intHeight,hexColor,htmlTag)
{

	var strObjTag;
	var strEmbTag;
	var strTagClose;
	var strTag;
	
	// object tag, remember to specify the width, height, align, name and path of swf file (value of "movie" parameter), and any other parameters you want specified.
	
	strObjTag = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + intWidth +'" height="' + intHeight +'" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="' + swfFile +'" /><param name="quality" value="high" /><param name="bgcolor" value="#' + hexColor + '" />';
	
	// embed tag, remember to specify the name and path of swf file (src), width, height, align, and any other parameters you want specified.
	
	strEmbTag = '<embed src="' + swfFile +'" quality="high" bgcolor="#' + hexColor + '" width="' + intWidth +'" height="' + intHeight +'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';


	// close tags
	strTagClose = '<\/embed><\/object>';
	
	// complete tag
	strTag = strObjTag + strEmbTag + strTagClose;
	
	//return strTag;
 
	document.getElementById(htmlTag).innerHTML = strTag;
}
