   function placeFlashTextContent ( flashId, containerId, swfPath, width, height ) {
	
	   var so = new SWFObject( swfPath, flashId, width, height, "8" ); //, backColor );
	   so.addParam("quality", "high");
       so.addParam("wmode", "transparent" ); //transparent" ); // "transparent" ); //window");
       so.addParam("allowScriptAccess", "always");
       so.addParam("salign", "tl" ); //tl");
	   so.addParam ( "scale", "exactFit" ); //noScale" );
	   // DO NOT SUPPORT EXPRESS INSTALL!!!.  IF THEY DON'T HAVE FLASH, WE FALL BACK ON
	   // HYPERLINKS FOR THE MENU INSTEAD... so.useExpressInstall('expressinstall.swf');
	   
	   so.write( containerId );
   }

   
   function placeStaticFlashTextIntoDiv ( containingDivId, swfFile ) {
	  // var containingDiv = document.getElementById ( containingDivId );
	   var flashContentId = containingDivId + "Flash";
	   
	   placeFlashTextContent ( flashContentId, containingDivId, swfFile, "100%", "100%" );
	   
   }


    /**
	* Call this to replace the anchor part of a <div><a>...</a></div> situation.  These constructs
	* implement menu items or just clickable text "buttons" where the text will be impelemented
	* with Flash -- allowing any font, any Flash-power text filters, and resizable text "images" by
	* virtue that the containing <div> is sized in terms of "em" units.
	*/
   function placeFlashTextIntoHyperlink ( createdFlashId, containingHyperlinkId, swfFile ) {

       var containingDiv = document.getElementById ( containingHyperlinkId );
	   var selected = (containingDiv.className.indexOf ("selected") >= 0 );
	   var hyperlink = containingDiv.getElementsByTagName ( "A" )[0];
	
	   var swfPathWithParms = swfFile + "?isInteractive=true&clickCallbackName=gotoUrlFromFlashText&flashId=" + containingHyperlinkId +
	      "&linkHref=" + hyperlink.href + "&highlight=" + selected;
	   
       /**
	   * This is where replace the <a> with an <embed> of Flash.  But if Flash isn't present on the person's computer, then this does 
	   * nothing.
	   */
	   placeFlashTextContent ( createdFlashId, containingHyperlinkId, swfPathWithParms, "100%", "100%" );
	   

	
	   /**
	   * Now check if there is still a hyperlink. If so, we don't have Flash installed. So resize the containing div to be the same width as 
	   * the hyperlink.
	   */
	   var hyperlinkAfterReplace = containingDiv.getElementsByTagName ( "A" );
	   if ( hyperlinkAfterReplace ) {
	      hyperlinkAfterReplace = hyperlinkAfterReplace[0];
	   }

       /**
	   * If the anchor tag is still hanging around, then stretch the <div> surrounding it to be the same width as the anchor tag.
	   */
	   if ( hyperlinkAfterReplace ) {
	      var widthHyperlink = hyperlinkAfterReplace.style.width;
		  var widthParentEm = containingDiv.style.width.split("em")[0];
		  var widthParentPx = containingDiv.offsetWidth;
		  var emToPxRatio = widthParentEm/widthParentPx;
		  var hyperlinkWidthPx = hyperlinkAfterReplace.offsetWidth;
		  var newEmWidthForDiv = hyperlinkWidthPx * emToPxRatio;
		  containingDiv.style.width = newEmWidthForDiv + "em";
		  hyperlinkAfterReplace.style.visibility = "visible";
		  hyperlinkAfterReplace.style.display = "block";
	   }
	   
   }	
	
    /**
	* This is called when an anchor <a> has been replaced with Flash Text.  When the
	* user clicks the Flash text, go to the link that anchor initially pointed to.
	* In other words, this ensures that the user gets an anchor-like experience when the
	* text for the anchor is Flash.
	*/
   function gotoUrlFromFlashText ( flashContainerId, linkHref ) {
      location.href = linkHref;
   }
	
