// JavaScript Document
var MM_contentVersion = 8;
var MM_FlashCanPlay = false;
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]; 
	}
	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');
}




/* Flash 書き出し
--------------------------------------------------------------------------	*/

function object_write(file_path, obj_width, obj_height, obj_name, obj_color, obj_wmode){
	var obj = '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" data="'+file_path+'" id="'+obj_name+'" width="'+obj_width+'" height="'+obj_height+'">';

	if (obj_wmode == "true"){
		obj += '<param name="wmode" value="transparent">';
		var w_mode = 'wmode=transparent';
	} else {
		var w_mode = '';
	}

	obj += '<param name="menu" value="false">';
	obj += '<param name="movie" value="'+file_path+'">';
	obj += '<param name="quality" value="high">';
	obj += '<param name="bgcolor" value="#'+ obj_color +'">';
	obj += '<embed src="'+file_path+'" menu=false width='+obj_width+' height='+obj_height+' quality=high bgcolor=#'+obj_color+' name='+obj_name+' align=middle type=application/x-shockwave-flash pluginspage="https://www.macromedia.com/go/getflashplayer" '+w_mode+'><'+'/embed><'+'/object>';

	document.write(obj);
}




/* 家ラブ Flash 書き出し
--------------------------------------------------------------------------	*/

function doLove(file_path){
	var sQuery = location.search;
	var embedStr = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH="560" HEIGHT="464">';
	embedStr += '<PARAM NAME="movie" VALUE="'+file_path + sQuery+ '">';
	embedStr += '<PARAM NAME="quality" VALUE="high">';
	embedStr += '<EMBED src="'+file_path + sQuery + '" quality="high" bgcolor="#FFFFFF" WIDTH="560" HEIGHT="464" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>';
	embedStr += '</OBJECT>';
	document.write(embedStr);
}



/* 製品 3D 書き出し
（旧ページ:dolce sh700is d901is n901is d901is p901is sh901is d701i n701i fomarakuraku2）
--------------------------------------------------------------------------	*/

function object_write_3d_old(blz_name){
	var obj = '<applet archive=./holomatix.jar code=blaze3d.class width=560 height=260 MAYSCRIPT><param name=src value=./'+blz_name+'.swf></applet>';

	document.write(obj);
}



/* 製品 3D 書き出し
--------------------------------------------------------------------------	*/

function object_write_3d($blz_name){
	var obj = '<applet archive=./images/holomatix.jar code=blaze3d.class width=560 height=260 MAYSCRIPT><param name=src value=./images/'+$blz_name+'.swf></applet>';

	document.write(obj);
}



/* 3Dショウルーム（/product/showroom/3d/以下で使用）
--------------------------------------------------------------------------	*/

function doEmbed(c3dFilename){
	var embedStr = '<object id="CultObject" classid="clsid:31B7EB4E-8B4B-11D1-A789-00A0CC6651A8" height="287" width="361" border="0" codebase="http://www.cult3d.com/download/cult.cab">'
	embedStr += '<param name="SRC" value="'+ c3dFilename +'">'
	embedStr += '<param name="axis" value="X">'
	embedStr += '<param name="speed" value="0.1">'
	embedStr += '<param name="antialiasing" value="2">'
	embedStr += '<embed type="application/x-cult3d-object" src="'+ c3dFilename +'" axis="X" speed="0.1" width="361" height="287" border="0" antialiasing="2" name="CultObject" pluginspage="http://www.cult3d.com/newuser/index.html" onloadfinished="finishedLoading()" onSendMessage="messageSent()">'
	embedStr += '</embed> '
	embedStr += '</object>';

	document.write(embedStr);
}