var MM_contentVersion = 7;
var Check_Flash = 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 Plugin_Ver = words[i]; 
	}
		Check_Flash = Plugin_Ver >= MM_contentVersion;
}
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('Check_Flash = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
		document.write('</scr' + 'ipt\> \n');
}

function put_flash(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="allowScriptAccess" value="sameDomain" />';
	obj += '<param name="movie" value="'+file_path+'">';
	obj += '<param name="quality" value="high">';
	obj += '<param name="bgcolor" value="#ffffff">';
	obj += '<embed src="'+file_path+'"width='+obj_width+' height='+obj_height+' quality=high bgcolor=#ffffff name='+obj_name+' align=middle allowScriptAccess="sameDomain type=application/x-shockwave-flash pluginspage="https://www.macromedia.com/go/getflashplayer" '+w_mode+'><'+'/embed><'+'/object>';

	document.write(obj);
}

if (Check_Flash) {
	// フラッシュムービー
	put_flash("/skins/smeijin/img/top_movie02.swf", "400", "200", "top_movie","","true");
}

else{
	// フラッシュプラグインが無いときの代替
	document.write('<img src="/skins/smeijin/img/top_movie.jpg" width="400" height="200" alt="ケータイ1人1台時代の『固定客』づくりに、3000店以上の実績を持つ「ぱど商売名人」" />');
}


