// ****************************************
// ファイル名：flash_Chk.js
// 処理概要：Flashプラグインのバージョンチェック
// ****************************************


// --------------------------------------------------------
// 関数名：flash_chk
// 処理概要：Flashプラグインが存在するかのチェック
// 　　　　　Flashバージョンは4以上
// --------------------------------------------------------
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
var f_plugin;

function flash_chk(){

	f_plugin=0;

	//var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

	if(plugin){
		f_plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-2)) >= 4;
		
	}else if(navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && navigator.userAgent.indexOf("Windows")>=0){
		document.write('<script language="VBScript" type="text/vbscript">\n');
		document.write('on error resume next \n');
		document.write('f_plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
		document.write('</script>');
	}
	
	if(f_plugin){
		return true;
	}else{
		return false;
	}
}
