if (typeof Nicovideo == 'undefined') {
	Nicovideo = new Object();
}
if (typeof Nicovideo.Global == 'undefined') {
	Nicovideo.Global = {
		playerCount: 0,
		embedMode: "noflash"
	};
	(function () {
		if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] === "object" && navigator.mimeTypes && navigator.mimeTypes.length) {
			Nicovideo.Global.embedMode = "embed";
		} else if (typeof ActiveXObject !== "undefined") {
			try {
				var ax = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
				if (ax) {
					Nicovideo.Global.embedMode = "object";
				}
			} catch (e) {}
		}
	})();
	}

Nicovideo.version = '1.6.1';
Nicovideo.url = 'https://www.nicovideo.jp/';
Nicovideo.playerUrl = 'http://ext.nicovideo.jp/swf/player/thumbwatch.swf?ts=1556178770';

Nicovideo.Video = function (video) {
	if (video) {
		for (var key in video) {
			this[key] = video[key];
		}
	}
};
Nicovideo.Video.prototype = {
	getPlayURL: function () {
		return Nicovideo.url + 'watch/' + encodeURIComponent(this.v);
	},
	getShortTitle: function () {
		return this.title.substring(0, 60) +
			(this.title.length > 60 ? "..." : "");
	},
	getShortDescription: function () {
		return this.description.substring(0, 60) +
			(this.description.length > 60 ? "..." : "");
	}
};

Nicovideo.MiniPlayer = function (video, vars, width, height) {
	this.id          = Nicovideo.MiniPlayer.allocateId(this);
	this.video       = video;
	this.attributes  = {};
	this.parameters  = {};
	this.variables   = vars || {};
	this.width = width ? width : '485';
	this.height = height ? height : '385';
	if (window.innerWidth && this.width > window.innerWidth) {
		var scale = (window.innerWidth - 20) / this.width;		if (scale > 0) {
			this.width = this.width * scale;
			this.height = this.height * scale;
		}
	}
};
Nicovideo.MiniPlayer.prototype = {
	defaultAttributes: {},
	defaultParameters: {
		allowScriptAccess: 'always',
		allowFullScreen: 'true',
		bgcolor: '#000000',
		quality: 'high'
	},


	_merge: function () {
		var o = {};
		for (var i = 0, len = arguments.length; i < len; i++) {
			var arg = arguments[i];
			if (typeof arg != "object") continue;
			for (var key in arg) {
				o[key] = arg[key];
			}
		}
		return o;
	},
	_escape: function (s) {
		return String(s).replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
	},
	getHTML: function () {
		var id = this.id,
			video = this.video,
			attrs = this._merge(this.defaultAttributes, this.attributes),
			params = this._merge(this.defaultParameters, this.parameters),
			vars = this.variables;

		var flashvars = [];
		for (var key in vars) {
			flashvars.push(key + '=' + encodeURIComponent(vars[key]));
		}
		params.flashvars = flashvars.join("&");

		var html;
		switch (Nicovideo.Global.embedMode) {
		case "embed":
			html =
				'<embed type="application/x-shockwave-flash"'
				+ ' id="' + id + '"'
				+ ' name="' + id + '"'
				+ ' src="' + Nicovideo.playerUrl + '"'
				+ ' width="' + this.width  + '"'
				+ ' height="' + this.height + '"'
				;
			for (var key in params) {
				html += ' ' + key + '="' + params[key] + '"';
			}
			for (var key in attrs) {
				html += ' ' + key + '="' + attrs[key] + '"';
			}
			html += ' />';
			break;
		case "object":
			html =
				'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
				+ ' id="' + id + '"'
				+ ' name="' + id + '"'
				+ ' width="' + this.width + '"'
				+ ' height="' + this.height + '"'
				;
			for (var key in attrs) {
				html += ' ' + key + '="' + attrs[key] + '"';
			}
	 		html += '>';
			html += '<param name="movie" value="' + Nicovideo.playerUrl + '" />';
			for (var key in params) {
				html += '<param name="' + key + '" value="' + params[key] + '" />';
			}
			html += '</object>';
			break;
		default:
			html =
				'<div style="'
						+ 'width:' + (this.width === "100%" ? this.width : this.width + "px")
						+ '; height:' + (this.height === "100%" ? this.height : this.height + "px")
						+ '; display:inline-block; background:#000; color:#FFF; margin:0; padding:0; overflow:hidden;">'
				+ '<a href="' + video.getPlayURL() + '" target="_blank" title="' + this._escape(video.title) + '"'
						+ ' style="position:relative; display:inline-block; width:100%; height:100%;">'
					+ '<img src="' + video.thumbnail + '" alt="" style="width:100%; height:100%; border:none;" />';
			if (!video.isDeleted && (this.width === "100%" || this.width >= 240) && (this.height === "100%" || this.height >= 120)) {
				html += '<span style="display:inline-block; position:absolute; left:0; top:0; width:100%; height:100%;'
							+ ' background-image: url(https://nicovideo.cdn.nimg.jp/web/img/thumb/nico/play.png); background-repeat: no-repeat; background-position: center center;"></span>';
			}
			html += '</a>'
				+ '</div>';
			break;
		}

		return html;
	},
	write: function (id) {
		if (id === undefined) {
			document.write(this.getHTML());
		} else if (typeof id == "string") {
			var el = document.all ? document.all[id] : document.getElementById(id);
			if (el) el.innerHTML = this.getHTML();
		} else if (id) {
			id.innerHTML = this.getHTML();
		}
	}
};

Nicovideo.MiniPlayer.allocateId = function (player) {
	var id = 'external_nico_' + (Nicovideo.Global.playerCount++);
	return id;
};

if (document.all && !window.opera) {
	window.attachEvent("onbeforeunload", function () {
		window.attachEvent("onunload", function () {
			for (var i = 0, l = Nicovideo.Global.playerCount; i < l; i++) {
				var id = 'external_nico_' + i, el = document.all ? document.all[id] : document.getElementById(id);
				if (el && el.parentNode) {
					for (var key in el) {
						if (typeof el[key] == 'function')
							el[key] = null;
					}
					el.parentNode.removeChild(el);
				}
			}
		});
	});
}


(function () {
	var b = true;
	try {
		var w = window.parent, self = window.self;
		while (w && w != self) {
			if (w.location.host != self.location.host) {
				b = false;
				break;
			}
			if (w === w.parent) break;
			w = w.parent;
		}
	} catch (e) {
		b = false;
	}

	if (!b) {
		Nicovideo = undefined;
		document.write(
			'<p><a href="https://www.nicovideo.jp/watch/nm5016462" target="_blank">Back To The Future\u3000\u51fa\u6f14\u30ad\u30e3\u30b9\u30c8 \u30d3\u30d5\u30a9\u30fc\u30a2\u30d5\u30bf\u30fc</a></p>'
		);
		return;
	}

	var video = new Nicovideo.Video({
		v: 'nm5016462'
	,	id: 'nm5016462'
	,	title: 'Back To The Future\u3000\u51fa\u6f14\u30ad\u30e3\u30b9\u30c8 \u30d3\u30d5\u30a9\u30fc\u30a2\u30d5\u30bf\u30fc'
	,	description: '\u5f53\u6642\u3001\u7279\u6b8a\u30e1\u30a4\u30af\u3067\uff14\uff10\u4ee3\u3092\u6f14\u3058\u3066\u3044\u305f\u30ad\u30e3\u30b9\u30c8\u3082\u4eca\u3067\u306f\u305d\u308c\u4f4d\u306e\u5e74\u306b\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3002\u3000\u6c17\u306b\u306a\u3063\u305f\u306e\u3067\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002\u25a0\u3084\u3063\u3064\u3051\u306a\u3093\u3067\u3001\u4e2d\u76e4\u304b\u3089\u7121\u97f3\u306b\u306a\u3063\u305f\u308a\u3068\u3001\u81f3\u3089\u306a\u3044\u70b9\u3082\u305f\u304f\u3055\u3093\u3042\u308a\u307e\u3059\u3002\u3054\u5bb9\u8d66\u304f\u3060\u3055\u3044\u3002\u3000\u3000\uff08BTTF\u3001\u30d0\u30c3\u30af\u30fb\u30c8\u30a5\u30fb\u30b6\u30fb\u30d5\u30e5\u30fc\u30c1\u30e3\u30fc \uff09 \u3000\u25a0\u7d42\u76e4\u306e\u30af\u30e9\u30e9\u3068\u30cb\u30fc\u30c9\u30eb\u30ba\u306f\u6700\u521d\u3089\u3078\u3093\u306b\u3082\u3063\u3066\u304f\u308b\u3079\u304d\u3067\u3057\u305f\uff08\u00b4\u30fb\u30fb`\uff09\u53cd\u7701\u3000\u3000\u25a0\u30db\u30fc\u30e0\u30a2\u30ed\u30fc\u30f3\u306e\u30ad\u30e3\u30b9\u30c8\u306e\u30d3\u30d5\u30a9\u30fc\u30a2\u30d5\u30bf\u30fc\u3082\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002\u8ffd\u8de1\u5ea6\u4f4e\u3081\u2192nm8061690'
	,	thumbnail: 'http:\/\/nicovideo.cdn.nimg.jp\/thumbnails\/5016462\/5016462'
	,	postedAt: new Date('2008\/10\/22 22:59:49 +0900')
	,	length: 421
	,	viewCount: 79714
	,	mylistCount: 919
	,	commentCount: 9325
	,	movieType: 'swf'
	,	isDeleted: false	,	isMymemory: false	});
	var player = new Nicovideo.MiniPlayer(video, {
	'thumbWatch': '1'
	,'thumbPlayKey': '1619052731.0.1.TYGDlvsWLfnD_kFsuPSN-8ggvuo.aHR0cDovL3dvcmtpbmduZXdzLmJsb2cxMTcuZmMyLmNvbS9ibG9nLWVudHJ5LTI4ODIuaHRtbA==...0'
	,'playerTimestamp': '1597813798'
	,'player_version_xml': '1597813798'
	,'player_info_xml': '1556089684'
	,'translation_version_json': ''
	,'v': 'nm5016462'
	,'videoId': 'nm5016462'
	,'thumbTitle': 'Back To The Future\u3000\u51fa\u6f14\u30ad\u30e3\u30b9\u30c8 \u30d3\u30d5\u30a9\u30fc\u30a2\u30d5\u30bf\u30fc'
	,'thumbDescription': '\u5f53\u6642\u3001\u7279\u6b8a\u30e1\u30a4\u30af\u3067\uff14\uff10\u4ee3\u3092\u6f14\u3058\u3066\u3044\u305f\u30ad\u30e3\u30b9\u30c8\u3082\u4eca\u3067\u306f\u305d\u308c\u4f4d\u306e\u5e74\u306b\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3002\u3000\u6c17\u306b\u306a\u3063\u305f\u306e\u3067\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002\u25a0\u3084\u3063\u3064...'
	,'thumbTags': '\u5287\u7684\u30d3\u30d5\u30a9\u30fc\u30a2\u30d5\u30bf\u30fc bttf \u30d0\u30c3\u30af\u30fb\u30c8\u30a5\u30fb\u30b6\u30fb\u30d5\u30e5\u30fc\u30c1\u30e3\u30fc \u4f5c\u8005\u306f\u5929\u624d\u30b7\u30ea\u30fc\u30ba \u3068\u3053\u3068\u3093\u3001\u5fb9\u5e95\u7684\u306b\u8ffd\u8de1 \u8b0e\u306e\u611f\u52d5 \u3082\u3046\u4e00\u5ea6\u6620\u753b\u3092\u898b\u305f\u304f\u306a\u308b\u52d5\u753b \u7d30\u304b\u3059\u304e\u3066\u4f1d\u308f\u3089\u306a\u3044\u8abf\u67fb \u304d\u308c\u3044\u306a\u30d3\u30d5'
	,'thumbImage': 'http:\/\/nicovideo.cdn.nimg.jp\/thumbnails\/5016462\/5016462'
	,'movie_type': 'swf'
	,'wv_id': 'nm5016462'
	,'language': 'ja-jp'
	,'noAdSense': '1'
	,'leaf_switch': '2'
	,'accessFromHash': '1618966331:4b42add86d30777b0f7c666a771831a14b247bf1f74e716bebf68b4f039074eb'
	}, '485', '386');
	player.write();
})();

