// JavaScript Document
/*******************************************************************************
	WRITE script
*******************************************************************************/
function verify_data(){
	// ÀÌ¸§ Ã¼Å©
	str = document.all['strName'];
	if(str.value == ""){alert("ÀÌ¸§À» ÀÔ·ÂÇØÁÖ¼¼¿ä.");str.focus();return;}

	// ºñ¹Ð¹øÈ£ Ã¼Å©
	str = document.all['strPassword'];
	if(document.all['strLoginID'].value == "guest"){
		if(WRITE_BOARD_ADMIN == "False"){
			if(str.value == ""){alert("ÆÐ½º¿öµå¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");str.focus();return;}
		}
	}

	// ÀÌ¸ÞÀÏ Ã¼Å©
	str = document.all['strEmail'];
	if(str.value != ""){if(!isEmailCheck(str.value)) {alert("ÀÌ¸ÞÀÏ Çü½ÄÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");str.focus();return;}}

	// Á¦¸ñ Ã¼Å©
	str = document.all['strSubject'];
	if(str.value == ""){alert("Á¦¸ñÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");str.focus();return;}

	// ³»¿ëÃ¼Å©
	str = document.all['strContent'];
	if(str.value == ""){
		alert("³»¿ëÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		if (WRITE_USE_EDITOR == "False"){
			str.focus();
		}
		return;
	}
	
	// Ä«Å×°í¸® Ã¼Å©
	if(CATEGORY_WRITE_METHOD == "True") {
		str = document.all['intCategory'];
		if (str.value == "0"){alert("Ä«Å×°í¸®¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.");str.focus();return;}
	}

	if (document.all['bitReMail']!=null && document.all['bitReMail'].checked == true){
		str = document.all['strEmail'];
		if (str.value == "" || !isEmailCheck(str.value)){
			alert("´äº¯±ÛÀ» ÀÌ¸ÞÀÏ·Î ¹ÞÀ¸½Ã·Á¸é ¿Ã¹Ù¸¥ ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			str.focus();
			return;
		}
	}

	show_waiting();

	document.theForm.strBoardBg.value = WRITE_BOARD_BG;
	document.theForm.submit();
}

	function OnBoardLoginCheck(){
		str = document.all['strLoginID'];
		if (str.value == ""){alert("·Î±×ÀÎ ¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");str.focus();return false;}

		str = document.all['strLoginPwd'];
		if (str.value == ""){alert("·Î±×ÀÎ ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");str.focus();return false;}
	}

	function OnBoardPwdCheck(){
		str = document.all['strPassword'];
		if (str.value == ""){alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");str.focus();return false;}
	}

 function show_waiting() {
  var _x = document.body.clientWidth / 2 + document.body.scrollLeft - 145;
  var _y = document.body.clientHeight / 2 + document.body.scrollTop - 44;
  mb_waiting.style.posLeft=_x;
  mb_waiting.style.posTop=_y;
  mb_waiting.style.visibility='visible';
 }

/*******************************************************************************
	LIST, WRITE, REPLE, EDIT script
*******************************************************************************/
	function OnReadArticle(str1, str2){
		if (str2 == "0"){
			location.href = "mboard.asp?exec=view&strBoardID=" + SET_STRBOARD_ID + "&intPage=" + SET_INTPAGE + "&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD + "&intSeq=" + str1;
		}else{
			switch (SET_READ_TYPE){
				case "0" :
					location.href = "mboard.asp?exec=view&strBoardID=" + SET_STRBOARD_ID + "&intPage=" + SET_INTPAGE + "&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD + "&intSeq=" + str1;
					break;
				case "1" :
					openWindows("mboard.asp?exec=popview&strBoardID=" + SET_STRBOARD_ID + "&intPage=" + SET_INTPAGE + "&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD + "&intSeq=" + str1, 'popupRead', SET_READ_POPUP_WIDTH, SET_READ_POPUP_HEIGHT, 3);
					break;
				case "2" :
					openWindows("mboard.asp?exec=view&strBoardID=" + SET_STRBOARD_ID + "&intPage=" + SET_INTPAGE + "&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD + "&intSeq=" + str1, 'popupRead', SET_READ_POPUP_WIDTH, SET_READ_POPUP_HEIGHT, 3);
					break;
			}
		}
	}

	function OnBoardList(){
		location.href = LINK_LIST;
	}

	function OnBoardWrite(str1, str2){
		switch (str1){
			case "write" :
				location.href = LINK_WRITE;
				break;
			case "edit" :
				location.href = LINK_EDIT + "&intSeq=" + str2;
				break;
			case "reply" :
				location.href = LINK_REPLY + "&intSeq=" + str2;
				break;
		}
	}

	function OnBoardRead(){
		obj = document.all['checkIntSeq'];
		if(!obj) return;

		var cntBox = obj.length - 1;
		var str = "";
		for(var i = 0; i <= cntBox; i++){
			if (obj[i].checked == true){
				str = str + obj[i].value + ",";
				if(document.all['checkIntSeqSecret'][i].value == "True"){
					alert("ºñ¹Ð °Ô½Ã¹°Àº ´ÙÁßÀÐ±â¸¦ ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
					return;
				}
			}
		}
		if (str == ""){
			alert("°Ô½Ã±ÛÀ» ¼±ÅÃÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");
			return;
		}
		
		switch (SET_READ_TYPE){
			case "0" :
				location.href = "mboard.asp?exec=view&strBoardID=" + SET_STRBOARD_ID + "&intPage=" + SET_INTPAGE + "&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD + "&checkIntSeq=" + str;
				break;
			case "1" :
				openWindows("mboard.asp?exec=popview&strBoardID=" + SET_STRBOARD_ID + "&intPage=" + SET_INTPAGE + "&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD + "&checkIntSeq=" + str, 'popupRead', SET_READ_POPUP_WIDTH, SET_READ_POPUP_HEIGHT, 3);
				break;
			case "2" :
				openWindows("mboard.asp?exec=view&strBoardID=" + SET_STRBOARD_ID + "&intPage=" + SET_INTPAGE + "&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD + "&checkIntSeq=" + str, 'popupRead', SET_READ_POPUP_WIDTH, SET_READ_POPUP_HEIGHT, 3);
				break;
		}
	}

	function OnBoardDelete(str){
		if (confirm("°Ô½Ã±ÛÀ» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")){
			location.href = LINK_DELETE + "&intSeq=" + str;
		}
	}

	function OnBoardLogin(){
		location.href = LINK_LOGIN;
	}

	function OnBoardLogout(){
		location.href = LINK_LOGOUT;
	}

	function OnBoardGalleryImg(str){
		location.href = LINK_READ + "&bitViewImageAll=" + str;
	}

	function OnBoardAdmin(){
		obj = document.all['checkIntSeq'];
		if(!obj){
			alert("°ü¸®ÇÒ °Ô½Ã±ÛÀÌ ¾ø½À´Ï´Ù.");
			return;
		}
		var str = "";
		var cntBox = obj.length - 1;
		if (obj.length == null){
			if (obj.checked == true){
				str = obj.value + ",";
			}
		}else{
			for(var i = 0; i <= cntBox; i++){
				if (obj[i].checked == true){
					str = str + obj[i].value + ",";
				}
			}
		}
		if (str == ""){alert("°Ô½Ã±ÛÀ» ¼±ÅÃÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");return;}
		openWindows("Library/Snap.asp?strBoardID=" + SET_STRBOARD_ID + "&intCategory=" + SET_INTCATEGORY + "&intSeq=" + str,"strSnap", 460, 299, 0);
	}

	function OnAddComment(intSeqNum, strLoginID, intThread){
		str = document.all['cmt' + intSeqNum + '_content'];
		if (str.value == ""){alert("³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");str.focus();return;}

		if (strLoginID == ""){		
			str = document.all['cmt' + intSeqNum + '_name'];
			if (str.value == ""){alert("ÀÌ¸§À» ÀÔ·ÂÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");str.focus();return;}

			str = document.all['cmt' + intSeqNum + '_pwd'];
			if (str.value.length < 4){alert("ºñ¹Ð¹øÈ£¸¦ 4ÀÚ¸® ÀÌ»ó ÀÔ·ÂÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");str.focus();return;}
			
			document.theCmtForm.comment_id.value = "guest";
		}else{
			document.theCmtForm.comment_id.value = strLoginID;
		}

		document.theCmtForm.comment_boardIntSeqNum.value = intSeqNum;
		document.theCmtForm.comment_intThread.value      = intThread;
		document.theCmtForm.comment_name.value           = document.all['cmt' + intSeqNum + '_name'].value;
		if (strLoginID == ""){		
			document.theCmtForm.comment_pwd.value            = document.all['cmt' + intSeqNum + '_pwd'].value;
		}
		document.theCmtForm.comment_content.value        = document.all['cmt' + intSeqNum + '_content'].value;

		obj = document.all['cmt' + intSeqNum + '_intScore'];
		if (obj!=null){
			var cntBox = obj.length - 1;
			for(var i = 0; i <= cntBox; i++){
				if (obj[i].checked == true){
					document.theCmtForm.comment_intScore.value = document.all['cmt' + intSeqNum + '_intScore'][i].value;
				}
			}
		}

		obj = document.all['cmt' + intSeqNum + '_intIcon'];
		if (obj!=null){
			document.theCmtForm.comment_intIcon.value = document.all['cmt' + intSeqNum + '_intIcon'].value;
		}

		document.theCmtForm.action = "Library/CommentExec.asp?exec=CMTADD&strBoardID=" + SET_STRBOARD_ID + "&intPage=" + SET_INTPAGE + "&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD + "&checkIntSeq=" + SET_CHECK_INT_SEQ;
		document.theCmtForm.submit();
	}

	function OnCommentPassword(cmtIntSeq, cmtDeleteOpt, intSeq, w, h) {

		document.theCmtForm.comment_boardIntSeqNum.value = intSeq
		document.theCmtForm.comment_intSeq.value = cmtIntSeq;

		if(cmtDeleteOpt == 2) {
			var obj = document.all["id_comment_pwd"];

			obj.style.posLeft    = event.x - 300 + document.body.scrollLeft;
			obj.style.posTop     = event.y + document.body.scrollTop;
			obj.style.visibility = "visible";

			document.all['cmtDeleteInput'].focus();
		}else{
			OnCommentDelete();
			event.returnValue = false;
		}
	}

	function OnCommentPasswordHide() {
		document.theCmtForm.comment_boardIntSeqNum.value = "";
		document.theCmtForm.comment_intSeq.value = "";
		document.all['cmtDeleteInput'].value = "";
		document.all["id_comment_pwd"].style.visibility = "hidden";
	}

function OnCommentDelete(){
	document.theCmtForm.comment_pwd.value = document.all['cmtDeleteInput'].value;
	theCmtForm.action = "Library/CommentExec.asp?exec=CMTDELETE&strBoardID=" + SET_STRBOARD_ID + "&intPage=" + SET_INTPAGE + "&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD + "&checkIntSeq=" + SET_CHECK_INT_SEQ;
	theCmtForm.submit();
	OnCommentPasswordHide();
}

	function OnVote(intSeq){
		if (confirm("ÇØ´ç °Ô½Ã±ÛÀ» ÃßÃµÇÏ½Ã°Ú½À´Ï±î?")){
			location.href = "Library/VoteExec.asp?strBoardID=" + SET_STRBOARD_ID + "&intPage=" + SET_INTPAGE + "&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD + "&checkIntSeq=" + SET_CHECK_INT_SEQ + "&intSeq=" + intSeq;
		}
	}

/*******************************************************************************
	IMAGE UPLOAD DIM script
*******************************************************************************/

var img_cnt = 1; 
function ImageUploader(strClass){ 
	var str;
	if(img_cnt < WRITE_IMAGE_COUNT + 1) {
		str = "<input type=file name='strImgFileName' size=50 onchange=javascript:ImageUploader(";
		if (strClass != ""){
			str = str + "'" + strClass + "'); class='" + strClass + "';";
		}else{
			str = str + ");"
		}
		str = str + "><br>&nbsp;<input type=text name='strFileMemo' size=65 class='" + strClass + "'>"

		if( img_cnt < 9 ) {
			eval('imgs_up' + img_cnt).innerHTML += "&nbsp;" + str + "<div id='imgs_up" + (img_cnt+1) + "'></div>";
			} else {
			eval('imgs_up' + img_cnt).innerHTML += "&nbsp;" + str + "<div id='imgs_up" + (img_cnt+1) + "'></div>";
		}
	} else {
		alert('ÀÌ¹ÌÁö ÆÄÀÏÀº ÃÖ´ë ' + WRITE_IMAGE_COUNT + '°³ ±îÁö¸¸ ÀÌ¿ë °¡´ÉÇÕ´Ï´Ù.');
	}
	img_cnt++; 
}

/*******************************************************************************
	ACTION script
*******************************************************************************/
// rollover bgcolor.
function rollover(obj, color) {
	if(!obj) return false;
	obj.style.backgroundColor = color;
}

function select_all(){
	obj = document.all['checkIntSeq'];
	if(!obj) return false;
		var cntBox = obj.length - 1;
		for(var i = 0; i <= cntBox; i++){
			if (obj[i].checked == false){
				obj[i].checked=true;
			}else{
				obj[i].checked=false;
			}
		}
}

// Category Select
function OnCategoryGo(str){
	document.theForm.action = "mboard.asp?exec=list&strBoardID=" + SET_STRBOARD_ID + "&intPage=" + SET_INTPAGE + "&intCategory=" + str + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD;
	document.theForm.submit();
}

// Move Page
function go_page(str){
	document.theForm.action = "mboard.asp?exec=list&strBoardID=" + SET_STRBOARD_ID + "&intPage=" + str + "&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD;
	document.theForm.submit();
}

function OnSearch(){
	var k = 0;
	var s = "";
	for (i=0; i < 4; i++){
		if (SET_SEARCH_CATEGORY_DIM[i]!= ""){
			k++;
		}
		s = s + SET_SEARCH_CATEGORY_DIM[i] + "|";
	}
	if (k == 0){
		alert("°Ë»öÇÒ Ç×¸ñÀ» ¼±ÅÃÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");
		return;
	}
	str = document.all['searchWord'];
	if (str.value == ""){
		alert("°Ë»öÇÒ ³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");
		str.focus();
		return;
	}

	document.theForm.action = "mboard.asp?exec=list&strBoardID=" + SET_STRBOARD_ID + "&intPage=1&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + s + "&strSearchWord=" + str.value;
	document.theForm.submit();
}

function OnSearchCancel(){
	document.theForm.action = "mboard.asp?exec=list&strBoardID=" + SET_STRBOARD_ID + "&intPage=1&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=&strSearchWord=";
	document.theForm.submit();
}

function check_enter(id) {
	if(event.keyCode == 13) {
		switch (id){
			case "search" :
				go_search();
				break;
			case "jump_page" :
				break;
			case "del_comment" :
				break;
		}
		event.returnValue = false;
	}
}

function go_jump(){
	str = document.all['jump_page'];
	if (str.value == "" || !onlynum(str)){
		alert("ÀÌµ¿ÇÒ ÆäÀÌÁö¸¦ ÀÔ·ÂÇÏÁö ¾Ê¾Ò°Å³ª ¼ýÀÚ°¡ ¾Æ´Ñ ¹®ÀÚ¸¦ ÀÔ·ÂÇÏ¼Ì½À´Ï´Ù.");
		str.focus();
		return;
	}
	document.theForm.action = "mboard.asp?exec=list&strBoardID=" + SET_STRBOARD_ID + "&intPage=" + str.value + "&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD;
	document.theForm.submit();
}

function OnExeImgSize(w){
	if (document.all['FileExe']!= null){
		if (document.all['FileExe'].length == undefined){
			new_img = new Image();
			new_img.src = (document.all['FileExe'].src);
			if (new_img.width > w){
				document.all['FileExe'].width = w;
			}
		}else{
			for(i=0;i<document.all['FileExe'].length;i++){
				new_img = new Image();
				new_img.src = (document.all['FileExe'][i].src);
				if (new_img.width > w){
					document.all['FileExe'][i].width = w;
				}
			}
		}
	}
}

function gallery_change(str1, str2, str3, str4, str5){
	SET_GALLERY_NOW_IMG = str2;
	var new_img = document['galleryIMG_' + str1];
	new_img.src = "/Pds/Board/" + str5 + "/" + str2;
	new_img.width = str3;
	new_img.height = str4;
	document.all['galleryIMGWidth_' + str1].innerHTML = str3;
	document.all['galleryIMGHeight_' + str1].innerHTML = str4;
}

/*******************************************************************************
	PREVIEW script
*******************************************************************************/
function OnListPreview(content) {
	var obj = document.all["id_preview"];

	// check content
	if(content == "") {
		obj.innerHTML = "";
		return;
	}

	var text = "";
	text =  "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
	text += "    <tr>";
	text += "        <td>";
	text += "            <td bgcolor='#FFFFFF' style='word-break:break-all; padding:5px;'>" + content + "</td>";
	text += "        </td>";
	text += "    </tr>";
	text += "</table>";

	obj.innerHTML = text;
	OnListMovePreview();
	obj.style.visibility = "visible";
}

function OnListMovePreview() {
	var obj = document.all["id_preview"];

	if(obj.innerHTML != "") {
		obj.style.posLeft = event.x - 40 + document.body.scrollLeft;
		obj.style.posTop = event.y + 10 + document.body.scrollTop;
	}
}

function OnListHidePreview() {
	document.all["id_preview"].style.visibility = "hidden";
}

/*******************************************************************************
	Name Click Script
*******************************************************************************/
function OnUserMenuShow(str, id, name, mail, homepage, num){

	if (str!= "3"){
		// user menu layer
		var obj = document.all["id_user_menu"];

		// set position
		obj.style.posLeft = event.x + document.body.scrollLeft;
		obj.style.posTop = event.y + document.body.scrollTop;

		var isReturn = "";
		var text = "";
		text += "<table width=132 border=3 cellpadding=2 cellspacing=0 bordercolor=#F1F1F1>";
		text += "  <tr>";
		text += "    <td bgcolor=#FFFFFF>";
		text += "			<table width=100%  border=0 cellspacing=0 cellpadding=0>";
		text += "			  <tr>";
		text += "					<td height=26 bgcolor=#F1F4F6 style='padding:0 0 0 10'><img src=Library/images/icon01.gif width=3 height=5 align=absmiddle> " + id + "</td>";
		text += "			  </tr>";
		text += "			  <tr>";
		text += "					<td><img src=Library/images/dot_line.gif width=122 height=1></td>";
		text += "			  </tr>";
		text += "			  <tr>";
		text += "					<td style='padding:3 0 3 0' bgcolor=#FFFFFF>";
		text += "						<table width=90%  border=0 align=center cellpadding=0 cellspacing=0>";

		if (str == "0" || str == "1"){
			isReturn = true;
			if (id!= "guest"){
				isReturn = true;
			}else{
				isReturn = false;
			}
		}else{
			isReturn = false;
		}

		if (isReturn == true){
		text += "						  <tr onMouseOver=\"this.style.backgroundColor='#F5F5F5'\" onMouseOut=\"this.style.backgroundColor=''\" bgcolor=#FFFFFF>";
		text += "								<td width=20 height=18><img src=Library/images/dot_icon01.gif width=11 height=11></td>";
		text += "								<td><a href=mboard.asp?exec=list&strBoardID=" + SET_STRBOARD_ID + "&intPage=1&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=s_id||||&strSearchWord=" + id + ">Search Id</a></td>";
		text += "							</tr>";
		}
		
		text += "						  <tr onMouseOver=\"this.style.backgroundColor='#F5F5F5'\" onMouseOut=\"this.style.backgroundColor=''\" bgcolor=#FFFFFF>";
		text += "								<td height=18><img src=Library/images/dot_icon01.gif width=11 height=11></td>";
		text += "								<td><a href=mboard.asp?exec=list&strBoardID=" + SET_STRBOARD_ID + "&intPage=1&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=|s_name|||&strSearchWord=" + name + ">Search Name</a></td>";
		text += "							</tr>";
		
		if (str == "0" || str == "2"){
			isReturn = true;
			if (mail == "False"){
				isReturn = false;
			}else{
				isReturn = true;
			}
		}else{
			isReturn = false;
		}

		if (isReturn == true){
		text += "						  <tr onMouseOver=\"this.style.backgroundColor='#F5F5F5'\" onMouseOut=\"this.style.backgroundColor=''\" bgcolor=#FFFFFF>";
		text += "								<td height=18><img src=Library/images/dot_icon02.gif width=11 height=9></td>";
		text += "								<td><a href='javascript:;' OnClick=openWindows('Library/sendmail.asp?strLoginID=" + id + "&strLoginName=" + name + "&intSeq=" + num + "','sendMail','510','615','0');OnUserMenuHide();>E-Mail</a></td>";
		text += "							</tr>";
		}

		if (str == "0" && homepage != ""){

		text += "						  <tr onMouseOver=\"this.style.backgroundColor='#F5F5F5'\" onMouseOut=\"this.style.backgroundColor=''\" bgcolor=#FFFFFF>";
		text += "								<td height=18><img src=Library/images/dot_icon03.gif width=12 height=12></td>";
		text += "								<td><a href='" + homepage + "' target='_blank'>url</a></td>";
		text += "							</tr>";
		}

		if (str == "0" && SET_USE_MEMO == "True"){
		text += "						  <tr onMouseOver=\"this.style.backgroundColor='#F5F5F5'\" onMouseOut=\"this.style.backgroundColor=''\" bgcolor=#FFFFFF>";
		text += "								<td height=18><img src=Library/images/dot_icon04.gif width=14 height=12></td>";
		text += "								<td><a href='javascript:;' OnClick=openWindows('memo.asp?exec=write&strUserID=" + id + "','memberMemo','300','300','0');OnUserMenuHide();>Memo</a></td>";
		text += "							</tr>";
		}

		if (str == "0" && id != "guest"){
		text += "						  <tr onMouseOver=\"this.style.backgroundColor='#F5F5F5'\" onMouseOut=\"this.style.backgroundColor=''\" bgcolor=#FFFFFF>";
		text += "								<td height=18><img src=Library/images/dot_icon05.gif width=11 height=11></td>";
		text += "								<td><a href='javascript:;' OnClick=openWindows('member.asp?exec=profile&strLoginID=" + id + "&strBoardID=" + SET_STRBOARD_ID + "','memberInfo','510','615','3');OnUserMenuHide();>Member Info</a></td>";
		text += "							</tr>";
		}

		text += "						</table>";
		text += "					</td>";
		text += "			  </tr>";
		text += "			</table>";
		text += "		</td>";
		text += "  </tr>";
		text += "  <tr>";
		text += "    <td height=17 align=right bgcolor=#F1F1F1 style='padding:0 9 0 0'><img src=Library/images/btn_close.gif width=32 height=5 border=0 OnClick='OnUserMenuHide();' style='cursor:hand;'></td>";
		text += "  </tr>";
		text += "</table>";
		
		obj.innerHTML = text;
		obj.style.visibility = "visible";
	}
}

function OnUserMenuHide() {
	document.all["id_user_menu"].style.visibility = "hidden";
}

function OnPasswordCheck(){
	str = document.all['strPassword'];
	if (str.value == ""){alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");str.focus();return false;}
	
	if (SET_strType == ""){
		document.theForm.action = "Include/BoardIncludePassword.asp?bitSecrecBoardCheck=1&strBoardID=" + SET_STRBOARD_ID;
		document.theForm.submit();
	}else{
		document.theForm.action = "mboard.asp?exec=view&strBoardID=" + SET_STRBOARD_ID + "&intPage=" + SET_INTPAGE + "&intCategory=" + SET_INTCATEGORY + "&strSearchCategory=" + SET_SEARCH_CATEGORY + "&strSearchWord=" + SET_SEARCH_WORD + "&intSeq=" + SET_intSeq;
		document.theForm.submit();
	}
}

function OnFileDown(str1, str2, str3){
	location.href = "../Library/fileDown.asp?strBoardID=" + str1 + "&intSeq=" + str2 + "&intFile=" + str3;
}

function OnBoardPrint(intSeq, strBoardID){
	window.open('Library/boardPrint.asp?strBoardID=' + strBoardID + '&intSeq=' + intSeq);
}

function OnBoardBad(intSeq, strBoardID){
	openWindows("Library/BoardBad.asp?strBoardID=" + strBoardID + "&intSeq=" + intSeq,"strBadBoard", 460, 370, 0);
}

function OnHtmlBr(){
	if(confirm("ÀÚµ¿ ÁÙ¹Ù²ÞÀ» ÇÏ½Ã°Ú½À´Ï±î?\n\nÀÚµ¿ ÁÙ¹Ù²ÞÀº °Ô½Ã¹° ³»¿ëÁß ÁÙ¹Ù²ï °÷À» <br>ÅÂ±×·Î º¯È¯ÇÏ´Â ±â´ÉÀÔ´Ï´Ù.")){
		document.all['bitHtmlBr'].value = "1";
	}
}




