resizeWindow();

var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

// if we've detected an acceptable version
if(hasRightVersion) {
    var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+swfObjectId+'" name="'+swfName+'" '
    + 'width="'+swfWidth+'" height="'+swfHeight+'" '
    + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"> '
    + '<param name="movie" value="'+swfFileName+'" /><param name="quality" value="high" /><param name="scale" value="'+swfScale+'" /> '
    + '<embed name="'+swfName+'" id="'+swfEmbedId+'" src="'+swfFileName+'" quality="high" '
    + 'width="'+swfWidth+'" height="'+swfHeight+'" name="course" align="middle" '
    + 'play="true" '
    + 'loop="false" '
    + 'quality="high" '
    + 'scale="'+swfScale+'" '
    + 'allowScriptAccess="sameDomain" '
    + 'type="application/x-shockwave-flash" '
    + 'pluginspage="http://www.macromedia.com/go/getflashplayer"> '
    + '<\/embed>'
    + '<\/object>';
    document.write(oeTags);   // embed the flash movie

// if flash is too old or we can't detect the plugin
  } else {
    var alternateContent = '<div style="background-color: #FFF; padding: 1px 10px 10px 10px;">'
	+ '<h1><font face="Arial, Helvetica, sans-serif">Attention:</font></h1>'
  	+ '<p><font face="Arial, Helvetica, sans-serif">It appears that you need to install '
	+ 'Flash Player to run this lesson. Click '
   	+ '<a href="http://www.macromedia.com/go/getflash/" target="_blank">here to install the Flash Player</a> '
   	+ 'or contact your network administrator for assistance.</font></p></div>';
    document.write(alternateContent);  // insert non-flash content
  }