var nicoroPlayer = document.getElementById('nicoro_player');
if (nicoroPlayer == null) {
	var playerElem = document.getElementById('flvplayer_container');
	if (playerElem == null) {
		playerElem = document.getElementById('nico-player');
	}
	if (playerElem != null) {
		var elem = document.createElement('div');
		var getFlvplayerContainerHtml = 'nicorojs_getFlvplayerContainerHtml:' + document.URL;
		elem.innerHTML = window.prompt(getFlvplayerContainerHtml);
		elem.id = 'nicoro_player';
		playerElem.parentNode.insertBefore(elem, playerElem);
	} else {
		var log = 'nicorojs_log:' + 'flvplayer_container and nico-player not found';
		window.alert(log);
	}
} else {
	var getFlvplayerContainerHtml = 'nicorojs_getFlvplayerContainerHtml:' + document.URL;
	nicoroPlayer.innerHTML = window.prompt(getFlvplayerContainerHtml);
}

var nicoroPlayerQ = document.getElementById('nicoro_player_q');
if (nicoroPlayerQ == null) {
	var nicoplayerContainerInner = document.getElementById('nicoplayerContainerInner');
	if (nicoplayerContainerInner != null) {
		var elem = document.createElement('div');
		var getNicoplayerContainerInnerHtml = 'nicorojs_getNicoplayerContainerInnerHtml:' + document.URL;
		elem.innerHTML = window.prompt(getNicoplayerContainerInnerHtml);
		elem.id = 'nicoro_player_q';
		nicoplayerContainerInner.parentNode.insertBefore(elem, nicoplayerContainerInner);
		nicoplayerContainerInner.style.display = 'none';
		var videoInformationWrapper = document.getElementById('videoInformationWrapper');
		if (videoInformationWrapper != null) {
			videoInformationWrapper.style.display = 'none';
		} else {
			var log = 'nicorojs_log:' + 'videoInformationWrapper not found';
			window.alert(log);
		}

		var playerContainer = document.getElementById('playerContainer');
		if (playerContainer != null) {
			playerContainer.style.height = 'auto';
		} else {
			var log = 'nicorojs_log:' + 'playerContainer not found';
			window.alert(log);
		}
		var nicoplayerContainer = document.getElementById('nicoplayerContainer');
		if (nicoplayerContainer != null) {
			nicoplayerContainer.style.height = 'auto';
		} else {
			var log = 'nicorojs_log:' + 'nicoplayerContainer not found';
			window.alert(log);
		}
	} else {
		var log = 'nicorojs_log:' + 'nicoplayerContainerInner not found';
		window.alert(log);
	}
} else {
	var getNicoplayerContainerInnerHtml = 'nicorojs_getNicoplayerContainerInnerHtml:' + document.URL;
	nicoroPlayerQ.innerHTML = window.prompt(getNicoplayerContainerInnerHtml);
}
