function chkPlugin(reqver, codebase, width, height, swfid, filename, dmyimg, alt, usemap)
{
	
	// ----------------------------------------------------------------------
	// インストールされているFlashプラグインのバージョンを取得する
	// ----------------------------------------------------------------------
	
	// Mozilla系の場合
	if 	(
		navigator.mimeTypes && 
		navigator.mimeTypes["application/x-shockwave-flash"] && 
		navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin
		)
	{
		if 	(
			navigator.plugins && 
			navigator.plugins["Shockwave Flash"]
			)
				{
					cliver = navigator.plugins["Shockwave Flash"].description.substring(16,18)
					//cliver2 = navigator.plugins["Shockwave Flash"].description
					//alert(cliver + ":"+cliver2);
				}
	}
	// IEの場合 ----- VBScriptで取得する -----
	else if 	(
			navigator.userAgent && 
			(navigator.userAgent.indexOf("MSIE") >= 0) && 
			(navigator.userAgent.indexOf("Win") >= 0)
			)
				{
					document.write('<SCR'+'IPT LANGUAGE="VBScr'+'ipt"> \n');
					document.write('on error resume next \n');
					document.write('cliver=Left(Hex(Int(CreateObject("ShockwaveFlash.ShockwaveFlash").FlashVersion)),1)\n');
					document.write('cliver=CLng("&h"&cliver)\n');  //VBScriptで16進数を10進数にするためにCLngを使って&hを付ける
					//document.write('alert(cliver)');
					document.write('</SCR'+'IPT> \n');
				}
	
	
	
	// ----------------------------------------------------------------------
	// 指定以上のバージョンのFlashプラグインがある場合はswfを埋め込む記述を出力する
	// ----------------------------------------------------------------------
	
	// 指定以上の場合 
	if (Number(cliver)>=reqver)
	{
		// document.write("使用可");
		
		document.write('<object');
		document.write(' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
		document.write(' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+codebase+',0,0,0"');
		document.write(' width="'+width+'"');
		document.write(' height="'+height+'"');
		document.write(' id="'+swfid+'"');
		document.write(' align="middle">');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="movie" value="'+filename+'" />');
		document.write('<param name="quality" value="high" />');
		document.write('<param name="bgcolor" value="#ffffff" />');
		document.write('<param name="menu" value="false" />');
		document.write('<embed');
		document.write(' src="'+filename+'"');
		document.write(' quality="high"');
		document.write(' bgcolor="#ffffff"');
		document.write(' width="'+width+'"');
		document.write(' height="'+height+'"');
		document.write(' name="'+swfid+'"');
		document.write(' align="middle"');
		document.write(' allowscriptaccess="sameDomain"');
		document.write(' type="application/x-shockwave-flash"');
		document.write(' pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
	}
	// 指定以下またはplugin値がない場合 
	else
	{
		// document.write("使用不可");
		document.write('<img src="'+dmyimg+'" width="'+width+'" height="'+height+'" border="0" alt="'+alt+'" usemap="'+usemap+'" />');
	}
	
	// document.write(navigator.plugins["Shockwave Flash"].description);
	
}
