
// Flash読み込み
function swfwrite(thisVersion,swfName,myWidth,myHeight,baseURL){ 
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version='+thisVersion+',0,0,0" width="'+myWidth+'" height="'+myHeight+'">');
	document.write('<param name="movie" value="'+swfName+'.swf" />');
	document.write('<param name="base" value="'+baseURL+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="menu" value="false" />');
	document.write('<embed src="'+swfName+'.swf" base="'+baseURL+'" quality="high" menu="false" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+myWidth+'" height="'+myHeight+'"></embed>');
	document.write('</object>');
}

function testPlugin(thisVersion,swfName,thisWidth,thisHeight,baseURL) {
	if(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
		if(navigator.plugins && navigator.plugins["Shockwave Flash"]){
			plugin = navigator.plugins["Shockwave Flash"].description.substring(16,17)
		}
	} else if(navigator.userAgent && (navigator.userAgent.indexOf("MSIE") >= 0) && (navigator.userAgent.indexOf("Win") >= 0)){
				document.write('<s'+'cript language="VBS'+'cript"> \n');
				document.write('on error resume next \n');
				document.write('plugin=Left(Hex(Int(CreateObject("ShockwaveFlash.ShockwaveFlash").FlashVersion)),1)\n');
				document.write('</s'+'cript> \n');
		}
//		if(Number(plugin)>=thisVersion){
		if((Number(plugin)>=thisVersion)||(Number(plugin)==1)||(plugin=="A")){
			swfwrite(thisVersion,swfName,thisWidth,thisHeight,baseURL);
		} else {
			// 設定バージョンより低いバージョンの時の表示内容
			document.write('<a href="http://www.adobe.com/shockwave/download/index.cgi?Lang=Japanese&P5_Language=Japanese&P1_Prod_Version=ShockwaveFlash&Lang=Japanese" target="_blank"><img src="'+swfName+'_alert_fla.jpg" alt="" width="'+thisWidth+'" height="'+thisHeight+'" border="0" /></a>');
        }
}
