// FLASH Checker

var MM_contentVersion = 6;

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if ( plugin ) {

		var words = navigator.plugins["Shockwave Flash"].description.split(" ");

		for (var i = 0; i < words.length; ++i)
		{
		if (isNaN(parseInt(words[i])))

		continue;

		var MM_PluginVersion = words[i]; 

		}
	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');
}



function makeFlash(swffile, w, h, subs, fval) {
	// 引数 FLASHversion, SWFfile Width, Heright, [代替画像orURL], [代替画像用リンク]
	if ( MM_FlashCanPlay ) {

		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');

		document.write(' ID="flashObj" WIDTH="' +w+ '" HEIGHT="' +h+ '" ALIGN="">');

		document.write(' <PARAM NAME=FlashVars VALUE="h=' +fval+ '"><PARAM NAME=movie VALUE="' +swffile+ '"><PARAM NAME=menu VALUE=false><PARAM NAME=quality VALUE=best><param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#FFFFFF" /> '); 

		document.write(' <EMBED src="' +swffile+ '"  ');

		document.write(' FlashVars="h='+fval+'" swLiveConnect=true WIDTH="' +w+ '" HEIGHT="' +h+ '" NAME="flashObj" ALIGN="" allowScriptAccess="sameDomain" menu=false quality=best bgcolor="#FFFFFF" ');

		document.write(' TYPE="application/x-shockwave-flash" ');

		document.write(' </EMBED>');

		document.write(' </OBJECT>');

	} else{ 

		if (subs.length==0){

			rs = confirm("FLASHバージョンをご覧頂くには、\nFLASH PLAYER verion "+MM_contentVersion+" 以上が必要です。\n\n現在のPC環境にはインストールされていません        \n\n最新のFLASH PLAYERをインストールしますか？");

			if (rs) window.open("http://www.macromedia.com/jp/shockwave/download/?P1_Prod_Version=ShockwaveFlash&Lang=Japanese");

		} else if (subs.indexOf(".gif")>-1 || subs.indexOf(".jpg")>-1){

			if (sublnk.length>0) {document.write('<a href="' +sublink+ '" >');}

			document.write('<img src="' +subs+ '" height="' +h+ '" width="' +w+ '" border="0">');

			if (sublnk.length>0) {document.write('</a>');}

		} else {

			window.location = subs;

		}
	}
}

function makeWMP (fname, w, h) {
	document.write('<object id="MediaPlayer" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version= 6,4,5,715" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" width="'+w+'" height="'+h+'"><param name="FileName" value="' + fname + '"><param name="AutoStart" value="TRUE"><param name="ShowControls" value="TRUE"><param name="ShowPositionControls" value="FALSE"><param name="EnableContextMenu" value="0"><param name="AutoSize" value="0"><param name="DisplaySize" value="0"><param name="ShowStatusBar" value="1"><embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&" src="' + fname + '" AutoStart=1 ShowControls=1 ShowPositionControls=0 width='+w+' height='+h+' ShowStatusBar=1 AutoSize=0 DisplaySize=0 vspace=0 hspace=0 nojava=1></embed></object>');
}


function makeQT (fname, w, h) {
	document.write('<embed src="' + fname + '" width="' + w + '" height="' + h + '" PLUGINSPAGE="http://quicktime.apple.com/" AUTOPLAY="true" CONTROLLER="true" cache="true" type="video/quicktime"></embed>');
}


