/*======================================================================================
　win IE 対応 Flash write script
======================================================================================*/

var ContentVer = 7;
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 PluginVer = words[i]; 
	    }
	var FlashCanPlay = PluginVer >= ContentVer;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & ContentVer)))\n');
	document.write('</SCR' + 'IPT\> \n');
}

function Flash_Content_Write(contentUrl, commonImage){
	if ( FlashCanPlay ) {
		document.write('\
			<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,65,0" width="780" height="240">\
			<param name="movie" value="'+contentUrl+'">\
			<param name="loop" value="true">\
			<param name="menu" value="false">\
			<param name="quality" value="high">\
			<param name="play" value="true">\
			<param name="wmode" value="window">\
			<param name="salign" value="lt">\
			<embed src="'+contentUrl+'" play="true" loop="true" salign="lt" wmode="window" quality="high" menu="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="780"/>\
 			</object>\
		');
	} else{
		document.write('<a href="http://www.adobe.com/shockwave/download/?P1_Prod_Version=ShockwaveFlash&Lang=Japanese" target="_blank">');
		document.write('<p><img src="'+commonImage+'" width="780" height="240" border="0" alt="Adobe Flash Player 最新版をダウンロードしてください。" title="ダウンロード"></a></p>');
	}
}

function Flash_Content_Product_Write(movieName, swfPath, xmlPath){
	if ( 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="342" height="300" id="product_movie" align="middle">');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="allowFullScreen" value="false" />');
		document.write('<param name="movie" value="' + swfPath + '" />');
		document.write('<param name="FlashVars" value="mv=' + movieName + '" />');
		document.write('<param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />');
		document.write('<embed src="' + swfPath + '?mv=' + movieName + '" quality="high" bgcolor="#ffffff" width="342" height="300" name="product_movie" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
	}
}

