function embedSWF(flashDetectionPath,flashFileName,flashWidth,flashHeight,flashPath,transparent,backgroundColor,scale,salign,align,flashID,secure){

            if(transparent == null){

                        transparent = false;

            }

            if(backgroundColor == null){

                        backgroundColor = "#FFFFFF";

            }

			var theHeader = "";
			if(secure == null){
				secure == false;
			}
			
            if(secure){
      			theHeader = "https";
			}
			else {
				theHeader = "http";
			}
			
			

            // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)

            var hasProductInstall = DetectFlashVer(6, 0, 65);

 

            // Version check based upon the values entered above in "Globals"

            var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

 

            // Location visited after installation is complete if installation is required

            var MMredirectURL = window.location;

 

            // Stored value of document title used by the installation process to close the window that started the installation process

            // This is necessary to remove browser windows that will still be utilizing the older version of the player after installation is complete

            // DO NOT MODIFY THE FOLLOWING TWO LINES

            document.title = document.title.slice(0, 47);

            var MMdoctitle = document.title;

            

            // Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback

            if ( hasProductInstall && !hasReqestedVersion ) {

            var productInstallOETags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'

            + 'width="230" height="160"'

            + 'codebase="'+theHeader+'://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'

    + '<param name="movie" value='+flashDetectionPath+'playerProductInstall.swf?MMredirectURL='+MMredirectURL+'&MMplayerType=ActiveX&MMdoctitle='+MMdoctitle+'" />'

            + '<param name="quality" value="high" /><param name="bgcolor" value="'+backgroundColor+'" />';

            if(transparent){

                        productInstallOETags = productInstallOETags + '<param name="wmode" value="transparent">';

            }

            productInstallOETags = productInstallOETags + '<embed ';

            if(transparent){

                        productInstallOETags = productInstallOETags + 'wmode="transparent" ';

            }

            productInstallOETags = productInstallOETags + 'src="'+flashDetectionPath+'playerProductInstall.swf?MMredirectURL='+MMredirectURL+'&MMplayerType=PlugIn" quality="high" bgcolor="'+backgroundColor+'" '

    + 'width="230" height="160" name="detectiontest" aligh="middle"'

    + 'play="true"'

    + 'loop="false"'

    + 'quality="high"'

    + 'allowScriptAccess="sameDomain"'

    + 'type="application/x-shockwave-flash"'

    + 'pluginspage="'+theHeader+'://www.macromedia.com/go/getflashplayer">'

    + '<\/embed>'

    + '<\/object>';

    document.write(productInstallOETags);   // embed the Flash Product Installation SWF

} else if (hasReqestedVersion) {  // if we've detected an acceptable version

    var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'

    + 'width="'+flashWidth+'" height="'+flashHeight+'"'

    + 'codebase="'+theHeader+'://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"';

            

            if(align != "" && align != null){
				oeTags = oeTags + 'align="'+align+'"';
            }
            
            if(flashID != "" && flashID != null){
            	oeTags = oeTags + 'id="'+flashID+'"';
            }

            oeTags = oeTags + '>';

            

    oeTags = oeTags + '<param name="movie" value="'+flashPath+'" /><param name="quality" value="high" /><param name="bgcolor" value="'+backgroundColor+'" />'

    if(transparent){

                        oeTags = oeTags + '<param name="wmode" value="transparent">';

            }

            if(scale != "" && scale != null){

                        oeTags = oeTags + '<param name="scale" value="'+scale+'" />';

            }

            if(salign != "" && salign != null){

                        oeTags = oeTags + '<param name="salign" value="'+salign+'" />';

            }

            

    oeTags = oeTags + '<embed ';

    if(transparent){

                        oeTags = oeTags + 'wmode="transparent" ';

            }

            if(scale != "" && scale != null){

                        oeTags = oeTags + 'scale="'+scale+'"';

            }

            if(salign != "" && salign != null){

                        oeTags = oeTags + 'salign="'+salign+'"';

            }

            if(align != "" && align != null){

                        oeTags = oeTags + 'align="'+align+'"';

            }

            

    oeTags = oeTags + 'src="'+flashPath+'" quality="high" bgcolor="'+backgroundColor+'" '

    + 'width="'+flashWidth+'" height="'+flashHeight+'" name="'+flashFileName+'"'

    + 'play="true"'

    + 'loop="false"'

    + 'quality="high"'

    + 'allowScriptAccess="sameDomain"'

    + 'type="application/x-shockwave-flash"'

    + 'pluginspage="'+theHeader+'://www.macromedia.com/go/getflashplayer">'

    + '<\/embed>'

    + '<\/object>';

    document.write(oeTags);   // embed the Flash Content SWF when all tests are passed

  } else {  // flash is too old or we can't detect the plugin

    var alternateContent = 'This content requires the Macromedia Flash Player.'

            +'<A HREF="'+theHeader+'://www.macromedia.com/go/getflashplayer"><IMG SRC="'+flashDetectionPath+'get_flash_player.gif" BORDER="0" WIDTH="88" HEIGHT="31"/></A>'

            + '<a href='+theHeader+'://www.macromedia.com/go/getflash/>Get Flash</a>';

    document.write(alternateContent);  // insert non-flash content

  }

}

