function writeSWF(swfname, swfwidth, swfheight) {
	var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	if (hasReqestedVersion || isWin) {  // if we've detected an acceptable version
	    var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
	    + 'width="' + swfwidth + '" height="' + swfheight + '"'
	    + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
	    + '<param name="movie" value="' + swfname + '" /><param name="quality" value="high" /><PARAM NAME=bgcolor VALUE=#000000>'
	    + '<embed src="' + swfname + '" quality="high" '
	    + 'width="' + swfwidth + '" height="' + swfheight + '" name="detectiontest" aligh="middle"'
	    + 'play="true"'
	    + 'loop="true"'
	    + 'quality="high"'
	    + 'allowScriptAccess="sameDomain"'
	    + 'type="application/x-shockwave-flash"'
	    + 'pluginspage="http://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 = 'Alternate HTML content should be placed here.'
	  	+ 'This content requires the Macromedia Flash Player.'
	   	+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
	    // document.write(alternateContent);   insert non-flash content
	  }
}
