/* --- Flash --- */

var MM_contentVersion = 8;
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) {
	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 wmode="transparent" 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\nFLASH 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 (fval.length>0) {document.write('<a href="' +fval+ '" target="_blank">');}
			document.write('<img src="' +subs+ '" height="' +h+ '" width="' +w+ '" />');
			if (fval.length>0) {document.write('</a>');}
		} else {
			window.location = subs;
		}
	}

}