﻿function output_swf() {
	var file = "../loading.swf"; // file
	var size = "470,200";           // size
	var sub  = '<img src="../images/solede.jpg" width="470" height="200" alt="新品ウェディングドレス,カラードレス販売価格2万円台～。サイズオーダー無料." title="新品ウェディングドレス,カラードレス販売価格2万円台～。サイズオーダー無料." />';

	var FlaCheck = new FlashCheck(7);
	var FlaTags  = new FlashTags("7,0,0,0");

	var tags = ((FlaCheck.detect())
		? FlaTags.output("",size,{ movie:file,quality:"high",bgcolor:"#ffffff",menu:"false" })
		: sub
	);
	document.write(tags);
}

// FlashCheck
function FlashCheck(ver) {
	this._mustver = (ver) ? ver : 1;
	this._plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if(this._plugin) {
		this._apply = (navigator.plugins["Shockwave Flash"].description.match(/\s([0-9.]*)\s/)[1] >= this._mustver);
	} else if(navigator.userAgent && navigator.userAgent.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Win") != -1) {
		try {
			applytmp = false;
			execScript("on error resume next : applytmp = (IsObject(CreateObject('ShockwaveFlash.ShockwaveFlash." + this._mustver + "')))", "VBScript");
			this._apply = applytmp;
		} catch(e) {}
	}
	this._detect = function() { return this._apply; };
}
FlashCheck.prototype = {
	"detect": function() { return this._detect(); }
};

// FlashTags
function FlashTags(ver,pro) {
	this._tags =
		"<object{ID1} classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\"" +
		" codebase=\"" + ((pro) ? pro : "http") +
			"://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" + ver + "\"" +
		" type=\"application/x-shockwave-flash\"" + "{SIZE}>\n" +
		"{PARAM1}" +
		"<div><PARAM NAME=wmode VALUE=transparent><embed{ID2}{PARAM2} type=\"application/x-shockwave-flash\"" +
		" pluginspage=\"" + ((pro) ? pro : "http") +
			"://www.macromedia.com/go/getflashplayer\"" + "{SIZE}></embed></div>\n</object>";
	if(navigator.userAgent.indexOf("Mac") != -1 && navigator.userAgent.indexOf("MSIE") != -1)
		this._tags = this._tags.replace(/^<[^<]+/,"").replace(/<\/object>$/,"");
	this._output = function(id,sz,prm) {
		sz = ' width="' + sz.replace(',','" height="') + '"';
		var ptmp = ["",""];
		var itmp = [((id != "") ? ' id="' + id + '"' : ""),((id != "") ? ' name="' + id + '"' : "")];
		for(var i in prm) {
			ptmp[0] += '<param name="' + i + '" value="' + prm[i] + '" />' + "\n";
			ptmp[1] += ((i == "movie") ? ' src' : ' ' + i) + '="' + prm[i] + '"';
		}
		return this._tags.replace(/{SIZE}/g,sz).replace("{ID1}",itmp[0]).replace("{ID2}",itmp[1]).replace("{PARAM1}",ptmp[0]).replace("{PARAM2}",ptmp[1]);
	};
}
FlashTags.prototype = {
	"output": function(id,size,param) { return this._output(id,size,param); }
};

output_swf();



