//次のバージョン以上のとき、FLASHを表示
var MM_contentVersion = 8;

//navigator.mimeTypesでapplication/x-shockwave-flashが使用可能かチェックし、trueもしくは0を変数へ格納
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

//pluginがtrueであった場合はバージョンナンバーの抽出、比較処理を実行
//trueでない場合はブラウザがwinのIEであるかチェックし、IEである場合は
//ShockwaveFlash.ShockwaveFlash.MM_contentVersionという、オブジェクトを生成するscriptタグと処理を出力
if ( plugin ) {

	//wordsにnavigator.pluginsのShockwave Flashに関するdescription（詳細情報）を半角スペース区切りで配列として格納
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");

	//wordsの配列要素分繰り返し処理
	for (var i = 0; i < words.length; ++i){

		//parseIntでwords[i]の内容をチェックし、返り値がisNaNでtrue(返り値がNaN)
		//であった場合はcontinue
		//そうでない場合にMM_PluginVersionへバージョンナンバーとしてwords[i]の内容を格納
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i];

	}

	//最初に設定したMM_contentVersionよりMM_PluginVersion（現在のプラグインのバージョン）が
	//大きいかチェックし、結果をMM_FlashCanPlayに格納
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;

}else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');//FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}

//MM_FlashCanPlayがtrueであればオブジェクトタグを生成
//そうでない場合//Flashのダウンロードを促すページへ遷移
if ( MM_FlashCanPlay ) {
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="500" height="324" id="yokokuHigh" align="left">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="allowFullScreen" value="false" />');
document.write('<param name="movie" value="../../common/data/eng_yokokuHigh.swf" />');
document.write('<param name="quality" value="high" />');
document.write('<param name="scale" value="noscale" />');
document.write('<param name="wmode" value="window" />');
document.write('<param name="wmode" value="transparent" />');
document.write('<param name="salign" value="lt" />');
document.write('<param name="bgcolor" value="#041122" />');
document.write('<embed src="../../common/data/eng_yokokuHigh.swf" quality="high" scale="noscale" salign="lt" bgcolor="#041122" width="500" height="324" name="yokokuHigh" align="center" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');

}else{

//エラーメッセージ出力
document.write('<div class="BoxNonFlash">');
document.write('<a href="http://get.adobe.com/jp/flashplayer/"><img src="img/trailer_nonflash.jpg" alt="FlashPlayer（無償）をインストールしてください。" width="320" height="220" /></a>');
document.write('</div>');
}