
// idセレクタ表示・非表示切り替え
function changeDisplay(id) {
	if(document.getElementById(id).style.display == 'block'){
		document.getElementById(id).style.display = 'none';
	} else {
		document.getElementById(id).style.display = 'block';
	}
	return false;
}

// idセレクタ表示
function displayBlock(id) {
	document.getElementById(id).style.display = 'block';
}

// idセレクタ非表示
function displayNone(id) {
	document.getElementById(id).style.display = 'none';
}

function showMovie(url, w, h) {
	document.write('<embed src="' + url + '" ');
	document.write('wmode="transparent" width="' + w + '" height="' + h + '" ');
	document.write('type="application/x-shockwave-flash" />');
}

function showMovie300(id) {
	document.write('<object width="300" height="251">');
	document.write('<param name="movie" value="http://www.youtube.com/v/' + id + '"></param>');
	document.write('<param name="wmode" value="transparent"></param>');
	document.write('<embed src="http://www.youtube.com/v/' + id + '" wmode="transparent" width="300" height="251" type="application/x-shockwave-flash" />');
	document.write('</object>');
}

// swfプレーヤー書き出し
function player_m(domain, dir, id, d, o, p) {
	document.write('<embed src="/shared/swf/player_m.swf" FlashVars="domain=' + domain + '&dir=' + dir + '&id=' + id + '&d=' + d + '&o=' + o + '&p=' + p + '" ');
	document.write('width="18" height="18" allowScriptAccess="sameDomain" ');
	document.write('type="application/x-shockwave-flash" />');
}

function player(domain, dir, id, n) {
	document.write('<embed src="/shared/swf/player.swf" FlashVars="domain=' + domain + '&dir=' + dir + '&id=' + id + '&' + n + '" ');
	document.write('wmode="transparent" width="285" height="160" allowScriptAccess="sameDomain" ');
	document.write('type="application/x-shockwave-flash" />');
}

// コメントウィンドウ表示
function openCommentWin(id) {
	var wx = 500;
	var wy = 450;
	var x = (screen.width - wx)  / 2;
	var y = (screen.height - wy) / 2;
	var url = '/comment.php?id=' + id;
	window.open(url, 'comment', 'scrollbars=yes, left=' + x + ', top=' + y + ', width=' + wx + ', height=' + wy);
}
