﻿// JScript File


var renderSwfCounter = 0;
	function RenderSwfOLD(swfFile, width, height, fallback, bgcolor, transparent, name, hideMenu, scriptAccess)
	{
		
		if(swfFile==null){ alert("The parameter 'swfFile' is required for the RenderSwf-method"); return; }
		if(width==null){ alert("The parameter 'width' is required for the RenderSwf-method"); return; }
		if(height==null){ alert("The parameter 'height' is required for the RenderSwf-method"); return; }		
		if(fallback==null){ alert("The parameter 'fallback' is required for the RenderSwf-method"); return; }
		if(bgcolor==null){ bgcolor='#FFFFFF'; }
		if(transparent==null){ transparent = false; }
		if(hideMenu==null){ hideMenu = false; }
		if(name==null){ name='Life'+(renderSwfCounter++); }
		if(scriptAccess == null) { scriptAccess = "sameDomain"; }
			
		var	content = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
				+ 'width="'+width+'" height="'+height+'" id="'+name+'" '
				+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
				+ '<param name="movie" value="'+swfFile+'" />'
				+ '<param name="quality" value="high" />'
				+ '<param name="bgcolor" value="'+bgcolor+'" />'
				+ '<param name="allowScriptAccess" value="' + scriptAccess + '">'
				+ (transparent?'<param name="wmode" value="transparent">':'')
				+ (hideMenu?'<param name="menu" value="false">':'')
				+ '<embed src="'+swfFile+'" quality="high" bgcolor="'+bgcolor+'" '
				+ 'width="'+width+'" height="'+height+'" name="'+name+'" id="'+name+'" aligh="middle" '
				+ 'play="true" loop="false" quality="high" allowScriptAccess="sameDomain" '
				+ (transparent?'wmode="transparent" ':'')
				+ 'type="application/x-shockwave-flash" '
				+ 'allowScriptAccess="' + scriptAccess + '" '
				+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
				+ '<\/embed><\/object>'

		document.write(content);
	}
	
	
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 28;
// -----------------------------------------------------------------------------

// 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 defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

function RenderSwf(src, width, height, id, bgColor, scriptAccess, flashVars, transparent)
{
    if (transparent == null) { transparent = false; }
    var wMode = (transparent ? "transparent" : "opague");
    if ( hasProductInstall && !hasRequestedVersion ) {
          // DO NOT MODIFY THE FOLLOWING FOUR LINES
          // Location visited after installation is complete if installation is required
          
          var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
          var MMredirectURL = window.location;
        document.title = document.title.slice(0, 47) + " - Flash Player Installation";
        var MMdoctitle = document.title;

          AC_FL_RunContent(
                "src", "playerProductInstall",
                "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
                "width", width,
                "height", height,
                "align", "middle",
                "id", id,
                "quality", "high",
                "bgcolor", bgColor,
                "name", id,
                "allowScriptAccess","sameDomain",
                "type", "application/x-shockwave-flash",
                "pluginspage", "http://www.adobe.com/go/getflashplayer"
          );
    } else if (hasRequestedVersion) {
          // if we've detected an acceptable version
          // embed the Flash Content SWF when all tests are passed
          AC_FL_RunContent(
                      "src", src,
                      "width", width,
                      "flashVars", flashVars,
                      "height", height,
                      "align", "middle",
                      "id", id,
                      "quality", "high",
                      "bgcolor", bgColor,
                      "name", id,
                      "wmode", wMode, 
                      "allowScriptAccess", scriptAccess,
                      "type", "application/x-shockwave-flash",
                      "pluginspage", "http://www.adobe.com/go/getflashplayer"
          );
      } else {  // flash is too old or we can't detect the plugin
        var alternateContent = ''
          + 'This content requires the Adobe Flash Player. '
          + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
        document.write(alternateContent);  // insert non-flash content
      }
}





