// 덧글 삭제
function form_del_cmt(o, cno)
{
	var f = document.getElementById('form_cmt_del');
	if(confirm('삭제 하시겠습니까?')) {
		f.cno.value = cno;
		f.submit();
	}
}

function form_del_cmt_pw(o, cno)
{
	var pos = getPosition(o); pos.y += 10;
	var f = document.getElementById('form_cmt_del');
	var l = document.getElementById("form_cmt_del_layer");

	if(l.style.display == "") { l.style.display = "none"; return ; }

	var bg = "url("+g_path_board+"/../images/input_pass.gif) no-repeat 5px center white";

	f.cno.value = cno;
	f.pass.style.background = bg;
	f.pass.onfocus = function() { this.value = ''; this.style.background = ""; this.style.backgroundColor = "white"; }
	f.pass.onblur = function() { if(this.value == '') this.style.background = bg; }

	l.style.left = "" + pos.x + "px";
	l.style.top = "" + pos.y + "px";
	l.style.display = "";
}

function form_mod_cmt(o, cno)
{
	commentModify(cno, false);
}

function form_best_mod_cmt(o, cno)
{
	commentModify(cno, true);
}

function form_reply_cmt(o, cno)
{
	commentReply(cno);
}

function form_recommend_cmt(o, bid, cno)
{
	commentRecommend(bid, cno);
}

function form_singo_cmt(o, bid, cno)
{
	commentSingo(bid, cno);
}

function open_board_msg(code)
{
	switch(code) {
	case 100:   msg = "권한이 없습니다."; break;
	case 101:   msg = "로그인을 하시면 글을 작성할수 있습니다."; break;
	}

	myalert_open(msg);
}

