<!--
// -------------------------------------»ç¿ë ½ÃÀÛ -------------------------------------------//

// °ø¹é Ã¼Å©
	function emptyForm(text) {

		if (text.value.length==0)
			return true;

		for (var i=0; i<text.value.length; i++) {
			var ch=text.value.charAt(i);
		if (ch!=' ' && ch!='\t')
			return false;
		}
		return true;
	}

	// ÄÚ¸àÆ®, ÃßÃµ ¹öÆ° Ã¼Å©
	function commentformchk(kindNo, cYN, rYN, downID) {

		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if ( cYN != 'N' ) { // ÃßÃµ + ¾Æ·§±ÛÀ» Á¦¿ÜÇÏ°í ÄÚ¸àÆ® ÀÔ·Â°ª Ã¼Å©

			if(emptyForm(document.frmBoard_comment.comment_contents)) {
				alert('ÄÚ¸àÆ®¸¦ ÀÛ¼ºÇÏÁö ¾Ê¾Ò½À´Ï´Ù.');
				return document.frmBoard_comment.comment_contents.focus();
			}

		}

		document.frmBoard_comment.useComment.value = cYN ;
		document.frmBoard_comment.useRecommend.value = rYN ;
		document.frmBoard_comment.useDownID.value = downID ;
		document.frmBoard_comment.target = "initFrame" ;

        if ( kindNo == 14 ) { // º£ÀÌÂ¡ ¿Ã¸²ÇÈ
            actionUrl = "/Beijing2008/Jboard/comment_input.php" ;
        } else { // ±âÅ¸ ¸ðµÎ
            actionUrl = "/Jboard/comment_input.php" ;

        }
		document.frmBoard_comment.action = actionUrl ;
		document.frmBoard_comment.submit();

	}
	
	//2Â÷ µ¡±ÛÃß°¡
	function commentAdd(kindNo, db, cid){
		form = document.frmcmt_mod;
		name = eval("document.frmcmt_mod.comment_contentsAdd"+cid+".value");
		if(!name) {
			alert('ÄÚ¸àÆ®¸¦ ÀÛ¼ºÇÏÁö ¾Ê¾Ò½À´Ï´Ù!');
			return eval("document.frmcmt_mod.comment_contentsAdd"+cid+".focus()");
		}else{ // ±âÅ¸ ¸ðµÎ
			actionUrl = "/Jboard/comment_input.php" ;
		}

		form.cid.value = cid;
		form.method = "post" ;
		form.gubun.value = "add";
		form.target = "initFrame" ;
		form.action = actionUrl;
		form.submit();
	}
	
	//µ¡±Û Á¸º° °øÅë 2Â÷ µ¡±ÛÃß°¡
	function commentAddZone(cid){
		form = document.comment_mod;
		name = eval("document.comment_mod.comment_contentsAdd"+cid+".value");
		if(!name) {
			alert('ÄÚ¸àÆ®¸¦ ÀÛ¼ºÇÏÁö ¾Ê¾Ò½À´Ï´Ù!');
			return eval("document.comment_mod.comment_contentsAdd"+cid+".focus()");
		}
		form.idx.value = cid;
		form.method = "post" ;
		form.mode.value = "add";
		form.target = "tempFrame" ;
		form.action = "/Comment/commentProc.php";
		form.submit();
	}

	//µ¡±Û ÃßÃµ ¹öÆ°
	function commentInput2(){
		alert('ÇÏ·ç ÃßÃµ È½¼ö¸¦ ÃÊ°úÇÏ¼Ì½À´Ï´Ù.');
		return 
	}

	//µ¡±Û ÃßÃµ ¹öÆ°
	function commentInput(kindNo,db,id,cid,pbcid){
		form = document.frmcmt_mod;
		if (confirm('ÀÌ µ¡±ÛÀ» ÃßÃµ ÇÏ½Ã°Ú½À´Ï±î?')) {
			actionUrl = "/Jboard/comment_input.php" ;
			form.cid.value=cid;
			form.pbcid.value = pbcid;
			form.method = "post" ;
			form.target = "initFrame" ;
			form.action = actionUrl;
			form.submit();
		}
	}

// °Ô½Ã¹° »èÁ¦
	function DeleteContents(kindNo) {

		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if (confirm('ÀÌ °Ô½Ã¹°À» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?')) {
			document.myform.mission.value = "BD" ;
			document.myform.method = "post" ;
			document.myform.target = "initFrame" ;

            if ( kindNo == 14 ) { // º£ÀÌÂ¡ ¿Ã¸²ÇÈ
                actionUrl = "/Beijing2008/Jboard/jDelete_action.php" ;
            } else { // ±âÅ¸ ¸ðµÎ
                actionUrl = "/Jboard/jDelete_action.php" ;
            }

			document.myform.action = actionUrl ;
			document.myform.submit();
		}
	}


// ¸®ºä½Ç Á¢±Ù±ÝÁö : °Ô½Ã¹° »èÁ¦µµ Æ÷ÇÔ
    function accessProhibition(sSno, mSno, mission, cID, cateNo) {

        if ( sSno == mSno ) {
            alert('ÀÚ½ÅÀ» Á¢±ÙÂ÷´Ü ½ÃÅ°½Ç ¼ø ¾ø½À´Ï´Ù.') ;
            return ;
        }

		if (document.getElementById('write_delay').style.visibility == "visible") return;

        var form = ( mission == 'BD' ) ? document.myform : document.frmcmt_mod ;

        if ( mission == 'CD' ) {
            form.cid.value = cID ;
            form.cSno.value = mSno ;
            form.wSno.value = mSno ;
        }

		if (confirm('ÀÌ È¸¿øÀ» °Ô½ÃÆÇÀ¸·ÎÀÇ Á¢±ÙÀ» Â÷´Ü ½ÃÅ°½Ã°Ú½À´Ï±î?\n\n[È®ÀÎ] ¹öÆ°À» ´©¸£½Ã¸é ¾ÕÀ¸·Î 2ÁÖ µ¿¾È °Ô½ÃÆÇ Á¢±ÙÀÌ Â÷´ÜµË´Ï´Ù.\n[Ãë¼Ò] ¹öÆ°À» ´©¸£½Ã¸é ÇöÀç ÆäÀÌÁö¿¡ ¸Ó¹«¸£°Ô µË´Ï´Ù.')) {
			form.mission.value = mission ;
            form.submission.value = "AP" ; // [A]ccess [P]rohibition
            form.category.value = cateNo ;
			form.method = "post" ;
			form.target = "initFrame" ;

            form.action = "/Review/rBoard/rDelete_action.php" ;
            form.submit() ;
        }
    }


// Á¢±Ù±ÝÁö ¾È³»
    function apAlert() {

        if ( confirm("È¸¿ø´ÔÀº Â¯¸®ºä Ä«Å×°í¸®¿¡ Á¢±Ù±ÝÁö µÇ¾ú½À´Ï´Ù.\n\nÀÌ¿¡ °üÇÑ ¹®ÀÇ´Â [°í°´¼¾ÅÍ ÀÌ¿ë¹®ÀÇ]¿¡ ÇØÁÖ¼¼¿ä") ) {
            location.href = "/CustomerCenter/cCenterMain.html?pflag=Quew" ;
            return ;
        }

    }


// 2008³â ¼³ ¿¬ÈÞ ÀÌº¥Æ® ±â°£(2008-02-03 ~ 2008-02-14)Áß¿¡´Â °Ô½Ã¹° »èÁ¦ ºÒ°¡
	function DeleteContents2(kindNo) {
        alert("ÀÌº¥Æ® ±â°£ ÀÌ¿Ü¿¡´Â °Ô½Ã¹°À» »èÁ¦ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.") ;
	}


// ÄÚ¸àÆ® »èÁ¦
	function DeleteComments(kindNo, db, cid, id) {
		if (document.getElementById('write_delay').style.visibility == "visible") return;
		if (confirm('ÀÌ ÄÚ¸àÆ®¸¦ »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?')) {
			document.frmcmt_mod.db.value = db ;
			document.frmcmt_mod.cid.value = cid ;
			document.frmcmt_mod.id.value = id ;
			document.frmcmt_mod.mission.value = "CD" ;
			document.frmcmt_mod.method = "post" ;
			document.frmcmt_mod.target = "initFrame" ;
			document.frmcmt_mod.action = "/Jboard/jDelete_action.php" ;
			document.frmcmt_mod.submit();
		}
	}
//2Â÷ µ¡±ÛÀÌ ÀÖÀ»°æ¿ì 1Â÷ µ¡±Û »èÁ¦¹æÁöÀ§ÇØ
	function DeleteCannot(){
		alert('ÇÏÀ§ µ¡±ÛÀÌ ÀÖ´Â °æ¿ì »èÁ¦ ÇÒ ¼ö ¾ø½À´Ï´Ù.');
	}

// Á¸_°ø¿ë µ¡±Û »èÁ¦
	function DeleteComments2(zone_id,cid) {
		//if (document.getElementById('write_delay').style.visibility == "visible") return;
		if (confirm('»èÁ¦ÇÏ½Ã°Ú½À´Ï±î?')) {
			document.comment_mod.method = "post" ;
			document.comment_mod.target = "tempFrame" ;
			document.comment_mod.action ="/Comment/commentModify.php?cid="+cid+"&type=delete&zone_id="+zone_id  ;
			document.comment_mod.submit();
		}
	}
//Á¸_°ø¿ë 2Â÷ µ¡±ÛÀÌ ÀÖÀ»°æ¿ì 1Â÷ µ¡±Û »èÁ¦¹æÁöÀ§ÇØ
	function DeleteCannot2(){
		alert('ÇÏÀ§ µ¡±ÛÀÌ ÀÖ´Â °æ¿ì »èÁ¦ ÇÒ ¼ö ¾ø½À´Ï´Ù.');
	}

// ¸®ºä½Ç ÄÚ¸àÆ® »èÁ¦
	function DeleteReviewComments(kindNo, db, cid, id) {

		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if (confirm('ÀÌ ÄÚ¸àÆ®¸¦ »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?')) {
			document.frmcmt_mod.db.value = db ;
			document.frmcmt_mod.cid.value = cid ;
			document.frmcmt_mod.id.value = id ;
			document.frmcmt_mod.mission.value = "CD" ;
			document.frmcmt_mod.method = "post" ;
			document.frmcmt_mod.target = "initFrame" ;

            if ( kindNo == 14 ) { // º£ÀÌÂ¡ ¿Ã¸²ÇÈ
                actionUrl = "/Beijing2008/Jboard/jDelete_action.php" ;
            } else { // ±âÅ¸ ¸ðµÎ
                actionUrl = "/Jboard/jDelete_action.php" ;
            }

			document.frmcmt_mod.action = actionUrl ;
			document.frmcmt_mod.submit();
		}
	}


	function copyUrl(objNm) {
		window.clipboardData.setData('Text', objNm);
		alert("°Ô½Ã¹° URL ÁÖ¼Ò°¡ º¹»çµÇ¾ú½À´Ï´Ù.");
		return;
	}

	function copyWid(objNm) {
		window.clipboardData.setData('Text', objNm);
		alert("¾ÆÀÌµð°¡ º¹»çµÇ¾ú½À´Ï´Ù.");
		return;
	}


	function levelErrMsg(int, str) {

		switch (int) {

			case 1: alert('È¸¿ø´ÔÀº ÄÚ¸àÆ®¸¦ ÀÛ¼ºÇÏ½Ç ¼ö ÀÖ´Â ·¹º§ÀÌ ¾Æ´Õ´Ï´Ù.');
					break;
			case 2: alert('È¸¿ø´ÔÀº ÃßÃµ±â´ÉÀ» »ç¿ëÇÏ½Ç ¼ö ÀÖ´Â ·¹º§ÀÌ ¾Æ´Õ´Ï´Ù.');
					break;
			case 3: alert('È¸¿ø´ÔÀº ÄÚ¸àÆ® ¶Ç´Â ÃßÃµ±â´ÉÀ» »ç¿ëÇÏ½Ç ¼ö ÀÖ´Â ·¹º§ÀÌ ¾Æ´Õ´Ï´Ù.');
					break;
			case 4: alert('È¸¿ø´ÔÀº ´äº¯±ÛÀ» ÀÛ¼ºÇÏ½Ç ¼ö ÀÖ´Â ·¹º§ÀÌ ¾Æ´Õ´Ï´Ù.');
					break;
			case 5: alert('ÀÌ °Ô½ÃÆÇ¿¡ ±ÛÀ» ÀÛ¼ºÇÏ½Ç ¼ö ÀÖ´Â ·¹º§Àº '+str+' ÀÌ»óÀÔ´Ï´Ù.');
					break;
			case 6: alert('È¸¿ø´ÔÀº ½Å°í±â´ÉÀ» »ç¿ëÇÏ½Ç ¼ö ÀÖ´Â ·¹º§ÀÌ ¾Æ´Õ´Ï´Ù.');
					break;
			case 7: alert('ÀÌº´¿¡¼­ ÇÏ»ç °è±Þ±îÁö´Â Æ¯Á¤½Ã°£ ´ë(pm.8½ÃºÎÅÍ am.12½Ã) \n°øÀ¯½Ç ³» ÀÚ·á°øÀ¯ °Ô½ÃÆÇ¿¡ ±Û ÀÛ¼ºÀ» ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.');
					break;
		}
		return;
	}


	function same_recommend() {

		if (document.getElementById('write_delay').style.visibility == "visible") return;

	    alert('ÀÚ½ÅÀÌ ÀÛ¼ºÇÑ ±Û¿¡ ´ëÇØ¼­ ÃßÃµÀº ºÒ°¡´ÉÇÕ´Ï´Ù.');
		return;
	}


	function comment_delete(db,cmt_id,id)
	{
		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if (confirm('ÀÌ ÄÚ¸àÆ®¸¦ »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?')) {
			window.open('/board/comment_delete.php?db='+db+'&cmt_id='+cmt_id+'&id='+id,'initFrame','');
		}
		return;
	}


	/*************************************************************************
	//// ½Ç½Ã°£ µ¿¿µ»ó
	//// default ¿¡¼­ º¯¼ö °ªÀ» °¡Á® ¿ÀÁú ¸øÇØ
	//// ÀÏ´Ü Á÷Á¢ µðºñ ¹øÈ£¸¦ ¹è¿­·Î ÀÔ·Â
	**************************************************************************/
	function checkDB(db){
		var realDb = new Array('175','176','177','178','179','180','181','283','284');
		var tmpNo = '0';
		for( i = 0; i < realDb.length; i++){
			if(realDb[i] == db){
				tmpNo = '1';
			}
		}
	 	return tmpNo;
	}


	function movePopup(db, id) {
		if(checkDB(db) == '1'){
			MM_openBrWindow("/Popup/pop_move.html?db=" + db + "&select_kind=1&select_group=5&id=" + id, "movePop", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no,",360,250);
		} else {
			MM_openBrWindow("/Popup/pop_move.html?db=" + db + "&id=" + id, "movePop", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no,",360,250);
		}
		return;
	}

	function movePopup2(db, id) {
		MM_openBrWindow("/Popup/pop_move_noTitle.html?db=" + db + "&id=" + id, "movePop", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no,",360,250);
		return;
	}

	function newmovePopup(db, id) {
		MM_openBrWindow("/Popup/pop_newmove.html?db=" + db + "&id=" + id, "movePop", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no,",360,250);
		return;
	}

	function contentPopup(db, id) {
		MM_openBrWindow("/Popup/pop_content.html?db=" + db + "&id=" + id, "contentPop", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no,",360,290);
		return;
	}

	function reviewContentPopup(db, id, jct) {
		MM_openBrWindow("/Popup/pop_content.html?db=" + db + "&id=" + id + "&jct=" + jct, "contentPop", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no,",360,290);
		return;
	}
	
	function singoPopup2(){
		alert('ÇÏ·ç ½Å°í È½¼ö¸¦ ÃÊ°úÇÏ¼Ì½À´Ï´Ù.');
		return;
	}
	function singoPopup(mode, db, id, sno, cmt_id, url) {
		if ( !id && !sno ) { // °Ô½ÃÆÇ ¸®½ºÆ®¿¡¼­ ³Ñ¾î¿ÔÀ» ¶§
			var form = document.frmBoard;
			var str = '';
			var k = 0;
			// Ã¼Å©¹Ú½º ÀÖ´ÂÁö Ã¼Å©
			if (form.checkbox) {
				for (i = 0; i < form.checkbox.length; i++) {
					if (form.checkbox[i].checked == true) {
						k++;
						str = form.checkbox[i].value;
					}
				}
				if (k > 1) {
					alert("½Å°í ÇÒ ±ÛÀ» ÇÏ³ª¸¸ ¼±ÅÃÇØ ÁÖ¼¼¿ä.");
					return;
				} else if (k < 1) {
					alert('½Å°í ÇÒ ±ÛÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
					return;
				}
				arrVal = str.split("|");
				id = arrVal[0];
				sno = arrVal[1];
			} else {
				alert('½Å°í ÇÒ ±ÛÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
				return;
			}
		}
		MM_openBrWindow("/Popup/pop_report.html?mode="+mode+"&db="+db+"&id="+id+"&sno="+sno+"&cmt_id="+cmt_id+"&url="+url,"singoPop", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no",360,317);
		return;
	}

// ¹è¿­ ½Å°í Å×½ºÆ® ÇÔ¼ö ½ÃÀÛ to 279 line
	var bool = true;

	function checkAll() {

		var checkbox = document.getElementsByName("checkbox[]");

		for (i = 0; i < checkbox.length; i++) if (checkbox[i].disabled == false) checkbox[i].checked = bool;

		bool = bool ? false : true;

		return;

	}

	function MultisingoPopup() {

		var form = document.frmBoard;
		var checkbox = document.getElementsByName("checkbox[]");
		var str = '';
		var k = 0;

		for (i = 0; i < checkbox.length; i++) {

			if (checkbox[i].checked == true && checkbox[i].disabled == false) {

				k++;
				have_comma = (str) ? ',' : '';
				str += have_comma + checkbox[i].value;

			}

		}

		if (k < 1) {

			alert('½Å°í ÇÒ ±ÛÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
			return;

		}

		MM_openBrWindow("", "singoPop", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no",360,317);
		form.singoVal.value = str ;
		form.target = "singoPop";
		form.action = "/Popup/multiSingo.html" ;
		form.submit() ;
		return;

	}

	/*************************************************************************
	//// °øÀ¯½Ç ¸®½ºÆ® °øÀ¯½Ç Á¦Àç  --> HooNy Ãß°¡
	**************************************************************************/

	function MultiPunishPopup() {

		var form = document.frmBoard;
		var checkbox = document.getElementsByName("checkbox[]");
		var str = '';
		var k = 0;

		for (i = 0; i < checkbox.length; i++) {

			if (checkbox[i].checked == true && checkbox[i].disabled == false) {

				k++;
				have_comma = (str) ? ',' : '';
				str += have_comma + checkbox[i].value;

			}

		}

		if (k < 1) {

			alert('Á¦Àç ÇÒ ±ÛÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
			return;

		}

		MM_openBrWindow("", "punishPop", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no",360,317);
		form.singoVal.value = str ;
		form.target = "punishPop";
		form.action = "/Popup/multiPunish.html" ;
		form.submit() ;
		return;

	}

	/*************************************************************************
	//// °øÀ¯½Ç ºä °øÀ¯½Ç Á¦Àç  --> HooNy Ãß°¡
	**************************************************************************/
	function PunishPopup(mode, db, jct, id, sno, cmt_id, url) {

		if ( !id && !sno ) { // °Ô½ÃÆÇ ¸®½ºÆ®¿¡¼­ ³Ñ¾î¿ÔÀ» ¶§

			var form = document.frmBoard;
			var str = '';
			var k = 0;

			// Ã¼Å©¹Ú½º ÀÖ´ÂÁö Ã¼Å©
			if (form.checkbox) {

				for (i = 0; i < form.checkbox.length; i++) {

					if (form.checkbox[i].checked == true) {

						k++;
						str = form.checkbox[i].value;

					}

				}

				if (k > 1) {

					alert("Á¦Àç ÇÒ ±ÛÀ» ÇÏ³ª¸¸ ¼±ÅÃÇØ ÁÖ¼¼¿ä.");
					return;

				} else if (k < 1) {

					alert('Á¦Àç ÇÒ ±ÛÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
					return;

				}

				arrVal = str.split("|");
				id = arrVal[0];
				sno = arrVal[1];

			} else {

				alert('Á¦Àç ÇÒ ±ÛÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
				return;

			}

		}

		MM_openBrWindow("/Popup/pop_Punish.html?mode=" + mode + "&db=" + db + "&jct=" + jct + "&id=" + id + "&sno=" + sno + "&cmt_id=" + cmt_id + "&url=" + url, "singoPop", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no",360,317);
		return;

	}

// ¹è¿­ ½Å°í Å×½ºÆ® ÇÔ¼ö ³¡

	function login_check(kind, param) { // ±ÛÀÛ¼º µîÀÇ Æ¯Á¤ ÆäÀÌÁö·Î ºÐ±â
		MM_openBrWindow("/Popup/login_check.html?kind=" + kind + "&" + param, "login_check", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no,",467,205);
		return;
	}

	function login_check2(kind, id, param) { // ±Û ³»¿ëº¸±â ÆäÀÌÁö·Î ºÐ±â
		MM_openBrWindow("/Popup/login_check.html?kind=" + kind + "&id=" + id + "&" + param + "&pflag=v", "login_check", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no,",467,205);
		return;
	}


	// ÂÊÁöº¸³»±â
	function memo_send(id) {
	if(!id) {
		login_check2();
		return;
	}
	MM_openBrWindow("", "UserMenu", "location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no, width=452,height=422, scrollbars=no",452,422);

	document.Frmboard_etc.target = "UserMenu";
	document.Frmboard_etc.action = "/Membership/memo_send.html?flag=1";
	document.Frmboard_etc.submit();
	return;
	}

	//1Â÷ µ¡±Û ¼öÁ¤
	function comment_modify(kindNo, db, cid) {
		var targetUrl = "/Jboard/comment_modify.php" ;
		if (document.getElementById('cmt_mod'+cid).innerHTML == '') {
				window.open(targetUrl + "?kindNo="+kindNo+"&db="+db+"&cid="+cid,"initFrame","toolbar=no,location=no,menubar=0,scrollbars=no");
		} else {
			document.getElementById('cmt_mod'+cid).innerHTML = '' ;
			/*
			var pat = parent.frames["useComments"].document.getElementById("Comment");
			if(pat.offsetHeight == 0){} 
			else 
			{
				height = pat.offsetHeight;
				width = pat.offsetWidth;
				parent.frames["useComments"].resizeTo(width,height);
			}
			*/
		}
		return;
	}
	//µ¡±Û Á¸º° ¼öÁ¤
	function comment_modifyZone(cid,comment) {
		var targetUrl = "/Comment/commentModify.php" ;
		if (document.getElementById('cmt_mod'+cid).innerHTML == '') {
				//window.open(targetUrl + "?cid="+cid,"tempFrame","toolbar=no,location=no,menubar=0,scrollbars=no");
			eval(document.getElementById('cmt_mod'+cid)).style.display="block";
			str = "<table width=552 border=0 cellpadding=0 cellspacing=0><tr><td align='center'>";
			str += "<textarea name='comment_' rows='2' class='textarea03' style='height:42;width:500;'>"+comment+"</textarea></td><td width=42 align=center style='background-image:url(http://i.jjang0u.com/Jimages/board/btn/btn_bg.gif);background-repeat:repeat-x;'> <a href='javascript:cmt_modifyZone("+cid+")' hidefocus>È® ÀÎ</a>";
			str += "</td></tr></table></form>";
			eval(document.getElementById('cmt_mod'+cid)).innerHTML=str;
		} else {
			document.getElementById('cmt_mod'+cid).innerHTML = '' ;
			/*
			var pat = parent.parent.frames["useComments"].document.getElementById("Comment");
			if(pat.offsetHeight == 0){} 
			else 
			{
				height = pat.offsetHeight;
				width = pat.offsetWidth;
				parent.parent.frames["useComments"].resizeTo(width,height);
			}
			*/
		}
		return;
	}
	//µ¡±Û Á¸º° 2Â÷ µ¡±Û Æû
	function comment_addZone(cid){
		/*if (parent.frames["useComments"].document.getElementById('cmt_mod'+cid).innerHTML == ''){
			eval(parent.frames["useComments"].document.getElementById('cmt_mod'+cid)).style.display="block";
			str = "<table width=480 border=0 cellpadding=5 cellspacing=0><tr><td align='center'>";
			str += "<textarea name='comment_contentsAdd"+cid+"' cols='48' rows='2' class='textarea03' style='height:42'></textarea> <a href='javascript:commentAddZone("+cid+")' hidefocus><img src='http://i.jjang0u.com/Jimages/board/btn/btn_ok02.gif' align='absmiddle'></a>";
			str += "</td></tr></table></form>";
			eval(parent.frames["useComments"].document.getElementById('cmt_mod'+cid)).innerHTML=str;

			var pat = parent.frames["useComments"].document.getElementById("Comment");
			if(pat.offsetHeight == 0){} 
			else 
			{
				height = pat.offsetHeight;
				width = pat.offsetWidth;
				parent.frames["useComments"].resizeTo(width,height);
			}
		}else{
			parent.frames["useComments"].document.getElementById('cmt_mod'+cid).innerHTML = '' ;
		}*/
		if (document.getElementById('cmt_mod'+cid).innerHTML == ''){
			eval(document.getElementById('cmt_mod'+cid)).style.display="block";
			str = "<table width=552 border=0 cellpadding=0 cellspacing=0><tr><td align='center'>";
			str += "<textarea name='comment_contentsAdd"+cid+"' rows='2' class='textarea03' style='height:42;width:500;'></textarea></td><td width=42 align=center style='background-image:url(http://i.jjang0u.com/Jimages/board/btn/btn_bg.gif);background-repeat:repeat-x;'> <a href='javascript:commentAddZone("+cid+")' hidefocus>È® ÀÎ</a>";
			eval(document.getElementById('cmt_mod'+cid)).innerHTML=str;
		}else{
			document.getElementById('cmt_mod'+cid).innerHTML = '' ;
		}
	}

	//2Â÷ µ¡±Û 
	function comment_add(kindNo, db, cid){
		/*if (parent.frames["useComments"].document.getElementById('cmt_mod'+cid).innerHTML == ''){
			eval(parent.frames["useComments"].document.getElementById('cmt_mod'+cid)).style.display="block";
			str = "<table width=684 border=0 cellpadding=5 cellspacing=0><tr><td align='center'>";
			str += "<textarea name='comment_contentsAdd"+cid+"' cols='101' rows='2' class='textarea03' style='height:42'></textarea> <a href='javascript:commentAdd("+kindNo+","+db+","+cid+")' hidefocus><img src='http://i.jjang0u.com/Jimages/board/btn/btn_ok02.gif' align='absmiddle'></a>";
			str += "</td></tr></table></form>";
			eval(parent.frames["useComments"].document.getElementById('cmt_mod'+cid)).innerHTML=str;

			var pat = parent.frames["useComments"].document.getElementById("Comment");
			if(pat.offsetHeight == 0){} 
			else 
			{
				height = pat.offsetHeight;
				width = pat.offsetWidth;
				parent.frames["useComments"].resizeTo(width,height);
			}
		}else{
			parent.frames["useComments"].document.getElementById('cmt_mod'+cid).innerHTML = '' ;
		}*/
		if (document.getElementById('cmt_mod'+cid).innerHTML == ''){
			eval(document.getElementById('cmt_mod'+cid)).style.display="block";
			str = "<table width=684 border=0 cellpadding='0' cellspacing='0'><tr><td align='center' width=620>";
			str += "<textarea name='comment_contentsAdd"+cid+"' rows='2' class='textarea03' style='height:42; width:620;'></textarea><td><td width=42 align=center style='background-image:url(http://i.jjang0u.com/Jimages/board/btn/btn_bg.gif);background-repeat:repeat-x;'> <a href='javascript:commentAdd("+kindNo+","+db+","+cid+")' hidefocus>È® ÀÎ</a>";
			str += "</td></tr></table></form>";
			eval(document.getElementById('cmt_mod'+cid)).innerHTML=str;
		}else{
			document.getElementById('cmt_mod'+cid).innerHTML = '' ;
		}
	}


//*****************************************************
// ¸®ºä½Ç ´ñ±Û ¼öÁ¤
//*****************************************************

	function comment_modify2(kindNo, db, cid) {
		var targetUrl = "/Review/jBoard/comment_modify.php" ;
		if (document.getElementById('cmt_mod'+cid).innerHTML == '') {
			window.open(targetUrl + "?kindNo="+kindNo+"&db="+db+"&cid="+cid,"initFrame","toolbar=no,location=no,menubar=0,scrollbars=no");
		} else {
			document.getElementById('cmt_mod'+cid).innerHTML = '' ;
			/*var pat = parent.frames["useComments"].document.getElementById("Comment");
			if(pat.offsetHeight == 0){} 
			else 
			{
				height = pat.offsetHeight;
				width = pat.offsetWidth;
				parent.frames["useComments"].resizeTo(width,height);
			}*/
		}
		return;
	}


//*****************************************************

	function cmt_modify(kindNo, db,cid) {
		if (document.getElementById('write_delay').style.visibility == "hidden") {
			if(confirm("¼öÁ¤ÇÏ½Ã°Ú½À´Ï±î?")) {
				form = document.frmcmt_mod;
				form.method = "post" ;
				form.target = "initFrame" ;
                if ( kindNo == 14 ) { // º£ÀÌÂ¡ ¿Ã¸²ÇÈ
                    actionUrl = "/Beijing2008/Jboard/comment_modify.php" ;
                } else { // ±âÅ¸ ¸ðµÎ
                    actionUrl = "/Jboard/comment_modify.php" ;
                }
				form.action = actionUrl + "?db="+db+"&cid="+cid;
				form.submit();
			}
		}
		return;
	}
	
	//µ¡±Û ¼öÁ¤ - Á¸º°
	function cmt_modifyZone(cid) {
		//f (parent.document.all.write_delay.style.visibility == "hidden") {
			if(confirm("¼öÁ¤ÇÏ½Ã°Ú½À´Ï±î?")) {
				form = document.comment_mod;
				form.method = "post" ;
				form.target = "tempFrame" ;
                actionUrl = "/Comment/commentModify.php" ;
				form.action = actionUrl + "?cid="+cid+"&type=modify";
				form.submit();
			}
		//}
		return;
	}

	// °Ô½ÃÆÇ °ü¸®ÀÚ ¶Ç´Â ¿î¿µÀÚ º¸³Ê½º Æ÷ÀÎÆ® ÁÖ±â
	function bonus_ok(db, id) {

		if (document.getElementById('write_delay').style.visibility == 'visible') return;

		var point = document.getElementById('bonus_point').value;

		if (point < 5 || point > 100) {
			alert("5Á¡ ºÎÅÍ 100Á¡ ±îÁö ÁÙ ¼ö ÀÖ½À´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇØÁÖ¼¼¿ä.!");
			return;
		}

		if (confirm(point + "Á¡ÀÇ º¸³Ê½º Æ÷ÀÎÆ®¸¦ ÁÖ½Ã°Ú½À´Ï±î?")) {
			window.open("/Jboard/bonus_point.php?db="+db+"&id="+id+"&point="+point,"initFrame","width=1,height=1,left=1,top=1,scrollbars=yes");
		}

		return;
	}

	function commentformchk2() { // °í°´¼¾ÅÍ 1:1 ¹®ÀÇ °Ô½ÃÆÇ¿¡¼­ ¾²´Â ÇÔ¼ö

		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if(emptyForm(document.frmBoard_comment.comment_contents)) {
			alert('´äº¯À» ÀÛ¼ºÇÏÁö ¾Ê¾Ò½À´Ï´Ù.');
			return document.frmBoard_comment.comment_contents.focus();
		}
		document.frmBoard_comment.job.value = "comment";
		document.frmBoard_comment.target = "initFrame";
		document.frmBoard_comment.submit();
		return;
	}

	function comment_write(mode) { // ±Û¾¥½Ã°Ô ½Ã¼±ÁýÁß¿¡¼­ ¾²´Â ÇÔ¼ö

		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if (emptyForm(document.frmBoard_comment.comment_contents)) {
			alert('ÄÚ¸àÆ®¸¦ ÀÛ¼ºÇÏÁö ¾Ê¾Ò½À´Ï´Ù.');
			return document.frmBoard_comment.comment_contents.focus();
		}

		document.frmBoard_comment.job.value = mode;
		document.frmBoard_comment.target = "initFrame";
		document.frmBoard_comment.submit();
		return;

	}

// °Ô½Ã¹° »èÁ¦, ÄÚ¸àÆ® »èÁ¦
	function contents_delete(mode, cid) { // ±Û¾¥½Ã°Ô ½Ã¼±ÁýÁß¿¡¼­ ¾²´Â ÇÔ¼ö

		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if (mode == "BD") {

			if (confirm('ÀÌ °Ô½Ã¹°À» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?')) {
				document.myform.job.value = "BD";
				document.myform.method = "post";
				document.myform.target = "initFrame";
				document.myform.action = "/Articles2/jDelete_action.php";
				document.myform.submit();
			}

			return;

		} else if (mode == "CD") {

			if (confirm('ÀÌ µ¡±ÛÀ» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?')) {
				document.frmBoard_comment.job.value = "CD";
				document.frmBoard_comment.cid.value = cid ;
				document.frmBoard_comment.method = "post";
				document.frmBoard_comment.target = "initFrame";
				document.frmBoard_comment.action = "/Articles2/jDelete_action.php";
				document.frmBoard_comment.submit();
			}

			return;

		} else if (mode == "RD") {

			if (confirm('ÀÌ ´äº¯À» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?')) {
				document.frmBoard_comment.job.value = "CD";
				document.frmBoard_comment.cid.value = cid ;
				document.frmBoard_comment.method = "post";
				document.frmBoard_comment.target = "initFrame";
				document.frmBoard_comment.action = "/Articles2/jDelete_action.php";
				document.frmBoard_comment.submit();
			}

			return;

		}

	}


	function viewImage(db, id) {
		 //window.open('/Jboard/jImageViewer.php?db=' + db + '&id=' + id, 'ImageViewer', '');	
		var win = window.open('/Jboard/jImageViewer.php?db=' + db + '&id=' + id,'ImageViewer','top=0,left=0,width=20,height=20,scrollbars=yes,resizable=yes');
		win.window.focus();
	}

	// HelloTv ¿¡¼­ »ç¿ëµÇ´Â ÀÌ¹ÌÁö ºä - by kms 2007-06-04
	function viewImageHtv(db, id) {
		window.open('/uboard/uImageViewer.php?db=' + db + '&id=' + id, 'ImageViewer', 'top=0,left=0,width=20,height=20,scrollbars=yes,resizable=yes');
	}



	function uBoardModify(param) {
		MM_openBrWindow('/uboard/uModify.html?' + param, 'boardModify', ",width=380,height=270,scrollbars=no,resizable=yes",380,315);
	}
// -------------------------------------»ç¿ë ³¡ -------------------------------------------//

	function comment_recommend() {

		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if(emptyForm(document.frmBoard_comment.comment_contents)) {
			alert('ÄÚ¸àÆ®¸¦ ÀÛ¼ºÇÏÁö ¾Ê¾Ò½À´Ï´Ù.(Ãß+ÄÚ)');
			return document.frmBoard_comment.comment_contents.focus();
		}
			document.frmBoard_comment.job.value = "comment";
			document.frmBoard_comment.com_recom.value = "Y";
			document.frmBoard_comment.only_recom.value = "N";
			document.frmBoard_comment.down_id.value = "";
			document.frmBoard_comment.target = "initFrame";
			document.frmBoard_comment.submit();
			return;
	}

	function comment_recommend_down(id) {

		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if(emptyForm(document.frmBoard_comment.comment_contents)) {
			alert('ÄÚ¸àÆ®¸¦ ÀÛ¼ºÇÏÁö ¾Ê¾Ò½À´Ï´Ù.');
			return document.frmBoard_comment.comment_contents.focus();
		}
			document.frmBoard_comment.job.value = "comment";
			document.frmBoard_comment.com_recom.value = "Y";
			document.frmBoard_comment.only_recom.value = "N";
			document.frmBoard_comment.down_id.value = id;
			document.frmBoard_comment.target = "initFrame";
			document.frmBoard_comment.submit();
			return;
	}

	function only_recommend() {

		if (document.getElementById('write_delay').style.visibility == "visible") return;

			document.frmBoard_comment.job.value = "N";
			document.frmBoard_comment.com_recom.value = "N";
			document.frmBoard_comment.only_recom.value = "Y";
			document.frmBoard_comment.down_id.value = "";
			document.frmBoard_comment.target = "initFrame";
			document.frmBoard_comment.submit();
			return;
	}

	function recommend_down(id) {

		if (document.getElementById('write_delay').style.visibility == "visible") return;

			document.frmBoard_comment.job.value = "N";
			document.frmBoard_comment.com_recom.value = "N";
			document.frmBoard_comment.only_recom.value = "Y";
			document.frmBoard_comment.down_id.value = id;
			document.frmBoard_comment.target = "initFrame";
			document.frmBoard_comment.submit();
			return;
	}


	function comment_down(id) {

		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if(emptyForm(document.frmBoard_comment.comment_contents)) {
			alert('ÄÚ¸àÆ®¸¦ ÀÛ¼ºÇÏÁö ¾Ê¾Ò½À´Ï´Ù.');
			return document.frmBoard_comment.comment_contents.focus();
		}
			document.frmBoard_comment.job.value = "comment";
			document.frmBoard_comment.com_recom.value = "N";
			document.frmBoard_comment.only_recom.value = "N";
			document.frmBoard_comment.down_id.value = id;
			document.frmBoard_comment.target = "initFrame";
			document.frmBoard_comment.submit();
			return;
	}

	function comment_all()
	{
		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if(confirm("ÀüÃ¼ ÄÚ¸àÆ®¸¦ ÀÛ¼ºÇÏ½Ã°Ú½À´Ï±î?")) {
			window.open('/board/write_all_comment.php?mode=comment_all&db=<?=$db?>&page=<?=$page?>&memo='+document.frmBoard_comment.comment_contents.value,'initFrame','');
		}
		return;
	}

	function comment_all_del()
	{
		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if(confirm("ÀüÃ¼ ÄÚ¸àÆ®¸¦ »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")) {
			window.open('/board/write_all_comment.php?mode=comment_all_del&db=<?=$db?>&page=<?=$page?>','initFrame','');
		}
		return;
	}

	function comment_fix()
	{
		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if(confirm("ÀüÃ¼ ÄÚ¸àÆ®¼ö¸¦ Á¤¸®ÇÏ½Ã°Ú½À´Ï±î?")) {
			window.open('/board/write_all_comment.php?mode=comment_fix&db=<?=$db?>&page=<?=$page?>','initFrame','');
		}
		return;
	}

	function comment_fix2()
	{
		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if(confirm("ÀÌ ±Û ÄÚ¸àÆ®¼ö¸¦ Á¤¸®ÇÏ½Ã°Ú½À´Ï±î?")) {
			window.open('/board/write_all_comment.php?mode=comment_fix2&db=<?=$db?>&id=<?=$id?>&page=<?=$page?>','initFrame','');
		}
		return;
	}

	function SpdeleteContents() {

		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if (confirm('ÀÌ °Ô½Ã¹°À» ±×»èÇÏ½Ã°Ú½À´Ï±î?')) {
			window.open('/board/delete.html?mode=sp_delete&db=<?=$db?>&str=<?=$id?>&page=<?=$page?>&order_cate=<?=$order_cate?>','initFrame','');
		}
		return;
	}

	function SpdeleteContents2() {

		if (document.getElementById('write_delay').style.visibility == "visible") return;

		if (confirm('ÀÌ °Ô½Ã¹°À» À½»èÇÏ½Ã°Ú½À´Ï±î?')) {
			window.open('/board/delete.html?mode=sp_delete2&db=<?=$db?>&str=<?=$id?>&page=<?=$page?>&order_cate=<?=$order_cate?>','initFrame','');
		}
		return;
	}

	function ModifyContents(ad,chk) {
		if(ad != 4 && chk == 2) {
			window.alert("¼±ÅÃÇÏ½Å °Ô½Ã ±ÛÀº ÇÏÀÌ¶óÀÌÆ® µî·Ï ±Û·Î »èÁ¦ ¹× ¼öÁ¤ ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.\n¸¸ÀÏ »èÁ¦¸¦ ¿øÇÏ½Ç °æ¿ì °í°´¼¾ÅÍ > ¹®ÀÇ»çÇ×¿¡¼­ ¿äÃ»ÇØÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");
			return;
		}

		window.location = '/board/modify.html?mode=modify&db=<?=$db?>&id=<?=$id?>';
		return;
	}

	function copy_sitelink(j) {
		if (document.getElementById('write_delay').style.visibility == "visible") return;
		var form = document.myform;
	    var doc = eval("form.copy_sitelink"+j).createTextRange();
	    eval("form.copy_sitelink"+j).select();
	    doc.execCommand('copy');
	    alert('À¥ÇÏµå ID¸¦ º¹»çÇß½À´Ï´Ù.\nÀÌ¿ë¹æ¹ýÀ» ¸ð¸£½Ã¸é °øÀ¯½Ç ¸ÞÀÎÆäÀÌÁö \'Ã³À½ ¿À½ÅºÐµéÀº ÀÏ´Ü Å¬¸¯\' ÆäÀÌÁö¸¦ Âü°íÇØÁÖ¼¼¿ä');
		return;
	}

	function login_check3() {
		MM_openBrWindow("/board/popup/login_check.html?db=<?=$db?>&id=<?=$id?>", "login_check", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no,",467,205);
		return;
	}

	// °Ë»ö¾î ÀÔ·ÂºÎ Ã¼Å©
	function Change(obj) {
		if ( !obj.value ) obj.value = document.form1.tmpkeyword.value;
		return;
	}

	// °á°ú³» °Ë»ö Ã¼Å©¹Ú½º Ã¼Å©½Ã
	function clearFrm(obj) {
        obj.keyword.focus() ;
		return;
	}


// ¿©±â¼­ºÎÅÍ Line 452±îÁö´Â View ÆäÀÌÁö¿¡¼­ »ç¿ëµÇ´Â ÇÔ¼öÀÓ
	function restore_ok(id) {

		if (document.getElementById('write_delay').style.visibility == 'visible') return;

		if (confirm('½Å°í µÈ °Ô½Ã¹°À» º¹¿øÇÏ°Ú½À´Ï±î?')) {
			window.open('./restore_ok.html?mode=restore&db=<?=$db?>&id='+id,'initFrame','width=1,height=1,left=1,top=1,scrollbars=yes');
		}

		return;
	}

	function image_main_view(id) {

		if (document.getElementById('write_delay').style.visibility == 'visible') return;

		// ÀÌ¹ÌÁöºä ¿©ºÎ
		if (document.all.check_main_view.checked == true) {

			window.open('./restore_ok.html?mode=view_on&db=<?=$db?>&id='+id,'initFrame','width=1,height=1,left=1,top=1,scrollbars=yes');

		} else {

			window.open('./restore_ok.html?mode=view_off&db=<?=$db?>&id='+id,'initFrame','width=1,height=1,left=1,top=1,scrollbars=yes');

		}

		return;
	}

	function image_main_view2(id) {

		if (document.getElementById('write_delay').style.visibility == 'visible') return;

		// ÀÌ¹ÌÁöºä ¿©ºÎ
		if (document.all.check_main_view.checked == true) {
			window.open('./restore_ok.html?mode=view_off&db=<?=$db?>&id='+id,'initFrame','width=1,height=1,left=1,top=1,scrollbars=yes');
		} else {
			window.open('./restore_ok.html?mode=view_on&db=<?=$db?>&id='+id,'initFrame','width=1,height=1,left=1,top=1,scrollbars=yes');
		}

		return;
	}

	function highlight_on(db,id,sno,kno,gno,imgpath,imgname) {

		if (document.getElementById('write_delay').style.visibility == 'visible') return;

		if (confirm('ÇÏÀÌ¶óÀÌÆ® °Ô½Ã¹°·Î ÃßÃµÇÏ½Ã°Ú½À´Ï±î?')) {
			window.open('../Jbos/Contents2/ContentsDisplayArticleReg.php?pJobmode=high&pBno='+db+'&pAid='+id+'&pMsno='+sno+'&pKindno='+kno+'&pGrpno='+gno+'&pImgPath='+imgpath+'&pImgFile='+imgname,'initFrame','width=1,height=1,left=1,top=1,scrollbars=yes');
		}

		return;
	}

	function coverstory_on(db,id,sno,kno,gno,imgpath,imgname) {

		if (document.getElementById('write_delay').style.visibility == 'visible') return;

		if (confirm('Ä¿¹ö½ºÅä¸® °Ô½Ã¹°·Î ÃßÃµÇÏ½Ã°Ú½À´Ï±î?')) {
			window.open('../Jbos/Contents2/ContentsDisplayArticleReg.php?pJobmode=cover&pBno='+db+'&pAid='+id+'&pMsno='+sno+'&pKindno='+kno+'&pGrpno='+gno+'&pImgPath='+imgpath+'&pImgFile='+imgname,'initFrame','width=1,height=1,left=1,top=1,scrollbars=yes');
		}

		return;
	}

	function img_check() {

		var main_table_width = 700;
		var target_resize_num = document.myform.target_resize.length;

		for (i = 0; i < target_resize_num; i++) {

			if (document.myform.target_resize[i].width > main_table_width) {
				document.myform.target_resize[i].width = main_table_width;
			}
		}
	}

/*************************************************************************
//// À©µµ¿ì ÆË¾÷ ÇÔ¼ö  --> HooNy Ãß°¡
**************************************************************************/

	function Win( sURL, sName, scrollbars, w, h){
		var win;
		var height = screen.height;
		var width = screen.width;
		var leftpos = width / 2 - parseInt(w/2);
		var toppos = height / 2 - parseInt(h/2);
		win = window.open(sURL, sName, "status=no,toolbar=no,resizable=no,scrollbars="+scrollbars+",menubar=no, width=1, height=1, left="+leftpos+", top="+toppos);
		win.opener.self;
	}

/*************************************************************************
//// ÃßÃµÀÎ ÆË¾÷ ÇÔ¼ö --> HooNy Ãß°¡
**************************************************************************/
	// ÃßÃµÀÎ ÆË¾÷ ÇÔ¼ö --> HooNy Ãß°¡
	function recommID(dbno, idno){
		url="/Popup/recommPopup.html?db=" + dbno + "&id=" + idno;
		Win(url, '','yes','370','270');
	}

	// ±Û¾¥½Ã°Ô - ½Ã¼±ÁýÁß : ÃßÃµÀÎ ÆË¾÷ ÇÔ¼ö --> combaksa Ãß°¡
	function recommID2(dbno, idno){
		url="/Popup/recommPopup2.html?db=" + dbno + "&id=" + idno;
		Win(url, '','yes','370','270');
	}

	// ÃßÃµÀÎ ÆË¾÷ ÇÔ¼ö --> µ¡±Û ÃßÃµÆË¾÷
	function recommID3(dbno, idno,bcid){
		url="/Popup/recommPopup3.html?db=" + dbno + "&id=" + idno+"&bcID="+bcid;
		Win(url, '','yes','370','270');
	}

    // ¸®ºä½Ç ÃßÃµ, ºñÃßÃµ, ÄíÆùÃßÃµÀÎ ÆË¾÷
    function reviewRecommID(code, dbno, idno) {
		url="/Popup/pop_review.html?gubunCode=" + code + "&db=" + dbno + "&id=" + idno;
		Win(url, 'review','yes','370','270');
    }
/*************************************************************************
//// ÀúÀÛ±Ç ¾÷Ã¼ °øÀ¯½Ç °Ô½Ã¹° »èÁ¦  --> HooNy Ãß°¡
**************************************************************************/

	function MultiCopyrightPunish(){
		if (confirm("¼±ÅÃÇÏ½Å °Ô½Ã¹°À» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\r\n\nÀúÀÛ±Ç°ú °ü·Ã¾ø´Â °Ô½Ã¹°À» ÀÓÀÇ·Î »èÁ¦ ÇÒ °æ¿ì \r\n\n¸ðµç Ã¥ÀÓÀº ±Í»ç¿¡ ÀÖÀ¸¸ç ÀÌ·ÎÀÎÇÑ ¼ÕÇØ ¹è»ó Ã¥ÀÓ ¶ÇÇÑ ±Í»ç¿¡ ÀÖ½À´Ï´Ù.")) {
			var form = document.frmBoard;
			var checkbox = document.getElementsByName("checkbox[]");
			var str = '';
			var k = 0;

			for (i = 0; i < checkbox.length; i++) {

				if (checkbox[i].checked == true && checkbox[i].disabled == false) {

					k++;
					have_comma = (str) ? ',' : '';
					str += have_comma + checkbox[i].value;

				}

			}

			if (k < 1) {

				alert('»èÁ¦ ÇÒ ±ÛÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä.');
				return;

			}
			form.singoVal.value = str ;
			form.target="initFrame";
			form.action="/Popup/multiCopyright_action.php";
			form.submit();
		}
	}


	/*************************************************************************
	//// ÀúÀÛ±Ç ¾÷Ã¼ °øÀ¯½Ç ºä °Ô½Ã¹° »èÁ¦  --> HooNy Ãß°¡
	**************************************************************************/
	function CopyrightPunish() {

			if (confirm("¼±ÅÃÇÏ½Å °Ô½Ã¹°À» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\r\n\nÀúÀÛ±Ç°ú °ü·Ã¾ø´Â °Ô½Ã¹°À» ÀÓÀÇ·Î »èÁ¦ ÇÒ °æ¿ì \r\n\n¸ðµç Ã¥ÀÓÀº ±Í»ç¿¡ ÀÖÀ¸¸ç ÀÌ·ÎÀÎÇÑ ¼ÕÇØ ¹è»ó Ã¥ÀÓ ¶ÇÇÑ ±Í»ç¿¡ ÀÖ½À´Ï´Ù.")) {
			var form = document.myform;
			form.target="initFrame";
			form.method="post";
			form.action="/Popup/copyright_act.php";
			form.submit();

		}

	}


	/*************************************************************************
	//// ÀúÀÛ±Ç ¾÷Ã¼ ÂÊÁö ´Ð³×ÀÓ º¯°æ   --> HooNy Ãß°¡
	**************************************************************************/
	var checkflag = "false";

	function check(field) {
		if (checkflag == "false") {
			for (i = 0; i < field.length; i++) {
				if (field[i].disabled == true) {
					field[i].checked = false;
				} else { field[i].checked = true;  }
			}
				checkflag = "true";
		   }
		else {
			for (i = 0; i < field.length; i++) {
				field[i].checked = false; }
				checkflag = "false";
			}
	}

	/*************************************************************************
	//// °øÀ¯½Ç ±Ûº¸±â ±ÇÇÑ °æ°íÃ¢
	**************************************************************************/
	function testAlert() {
		alert("ÇØ´ç °Ô½Ã¹°ÀÇ ¿­¶÷Àº ·Î±×ÀÎ ÈÄ ÀÌ¿ëÀÌ °¡´ÉÇÕ´Ï´Ù.");
	}

	/*************************************************************************
	//// ¿µÈ­, ¾Ö´Ï ÀÌº¥Æ® °æ°íÃ¢
	//// By HooNy [2008-02-14]
	**************************************************************************/
	function EventErrMsg(int, str) {

		switch (int) {

			case 1: alert('ÀÌº¥Æ® ±â°£ ÀÌ¿Ü¿¡´Â ÀÌµ¿ ±â´ÉÀ» »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.');
					break;
			case 2: alert('ÀÌº¥Æ® ±â°£ ÀÌ¿Ü¿¡´Â »èÁ¦ ±â´ÉÀ» »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.');
					break;
			case 3: alert('ÀÌº¥Æ® ±â°£ ÀÌ¿Ü¿¡´Â ¼öÁ¤ ±â´ÉÀ» »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.');
					break;
			case 4: alert('ÀÌº¥Æ® ±â°£ ÀÌ¿Ü¿¡´Â ÃßÃµ ±â´ÉÀ» »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.');
					break;
			case 5: alert('ÀÌº¥Æ® ±â°£ ÀÌ¿Ü¿¡´Â ½Å°í ±â´ÉÀ» »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.');
					break;
			case 6: alert('ÀÌº¥Æ® ±â°£ ÀÌ¿Ü¿¡´Â µ¡±Û ±â´ÉÀ» »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.');
					break;
			case 7: alert('ÀÌº¥Æ® ±â°£ ÀÌ¿Ü¿¡´Â ±Û¾²±â ±â´ÉÀ» »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.');
					break;

		}
		return;
	}


// ¸®ºä½Ç ¸®½ºÆ®¿¡¼­ÀÇ Select ¹Ú½º
	function goReviewSort(sortNum) {

 		form = document.sortFrm ;

		if (sortNum) {

			window.location.href = '/Review/rBoardMain.html?db=' + form.db.value + '&jct=' + form.jct.value + '&sort=' + sortNum + '&searching=' + form.searching.value + '&search_field=' + form.search_field.value + '&keyword=' + form.keyword.value + '&mode2=' + form.mode2.value ;

		}
   }


// ¸®ºä½Ç ¸®½ºÆ®ÀÇ ÄÃ·¯º¯°æ
function bgColorOn(no) {
    document.getElementById('bg'+no).style.backgroundColor="#F7F7F7" ;
}

function bgColorOff(no) {
    document.getElementById('bg'+no).style.backgroundColor="#FFFFFF" ;
}


// ¸®ºä½Ç ºäÆäÀÌÁö ³» ±â´É Ã³¸®
function viewManage(frm, mCode, sSno, cID, recommBool) {

    //------------------------
    // mCode : °ü¸®ÄÚµå
    // sSno : È¸¿ø¹øÈ£
    // cID : ´ñ±Û¹øÈ£
    //------------------------


	if (document.getElementById('write_delay').style.visibility == "visible") return;

    var db, id, jct, searching, search_field, keyword, mode2, sort, param ;
    db = frm.db.value ;
    id = frm.id.value ;
    jct = frm.jct.value ;
    searching = frm.searching.value ;
    search_field = frm.search_field.value ;
    keyword = frm.keyword.value ;
    mode2 = frm.mode2.value ;
    sort = frm.sort.value ;

    param = "db=" + db + "&jct=" + jct + "&id=" + id + "&searching=" + searching + "&search_field=" + search_field + "&keyword=" + keyword + "&mode2=" + mode2 + "&sort=" + sort ;


    // ·Î±×ÀÎÀ» ÇÏÁö ¾Ê¾ÒÀ» °æ¿ì
    if ( sSno == '' ) {
		MM_openBrWindow("/Popup/login_check.html?kind=16&" + param + "&pflag=v", "login_check", "width=1,height=1,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no,",467,205);
        return ;
    }


    // Áßº¹ÃßÃµ¿©ºÎ È®ÀÎ
    if ( recommBool ) {
        alert('ÀÌ¹Ì ÃßÃµÀ» ÇÏ¼Ì½À´Ï´Ù.') ;
        return ;
    }

    switch (mCode) {

        case('inputComment') : // µ¡±Û µî·Ï
        case('commentRecomm') : // ÃßÃµ µî·Ï
            if ( emptyForm(frm.comment_contents) ) {
				alert('ÄÚ¸àÆ®¸¦ ÀÛ¼ºÇÏÁö ¾Ê¾Ò½À´Ï´Ù.');
                frm.comment_contents.focus() ;
                return ;
            }
            break ;


        case('editComment') : // µ¡±Û ¼öÁ¤
        case('recommend') : // ÃßÃµ
        case('opposite') : // ºñÃßÃµ
        case('couponUse') : // ÄíÆùÃßÃµ
        	break ;


        case('recommDown') : // ÃßÃµ + ¾Æ·§±Û [2008-09-02] Ãß°¡ by combaksa
       		frm.useDownID.value = id ;
            break ;


        case('managerRecomm') : // ¿î¿µÀÚ, °ü¸®ÀÚ¿¡ ÀÇÇÑ ´ñ±ÛÃßÃµ
        case('sympathy') : // °ø°¨
            frm.cid.value = cID ;
            break ;




    }
/*
    if ( mCode == 'cmtModify' ) {

alert("¾Æ¾Æ") ;
    		var targetUrl = "/Review/rBoard/rView_action.php"  ;

    		if (document.getElementById('cmt_mod'+cID).innerHTML == '') {
                document.getElementById('cmtContent'+cID).style.display = 'none' ;
    			window.open(targetUrl + "?kindNo=16&db="+db+"&cid="+cID+"&manageCode=aaa","initFrame","toolbar=no,location=no,menubar=0,scrollbars=no");

    		} else {

                document.getElementById('cmtContent'+cID).style.display = '' ;
    			document.getElementById('cmt_mod'+cID).innerHTML = '' ;

    		}

    		return;

    } else {
*/
        frm.manageCode.value = mCode ;
    	frm.target = "initFrame" ;
        frm.action = "/Review/rBoard/rView_action.php" ;
        frm.submit() ;
//    }

}


// ÈÄ¶óÀÌÆÇ ¸®½ºÆ®¿¡¼­ÀÇ Select ¹Ú½º
	function goFrypanSort(sortNum) {

 		form = document.fryFrm ;

		if (sortNum) {

			window.location.href = '/JJangtong/jBoardMain.html?db=' + form.db.value + '&sort=' + sortNum + '&searching=' + form.searching.value + '&search_field=' + form.search_field.value + '&keyword=' + form.keyword.value + '&mode2=' + form.mode2.value ;

		}
   }

	function singoWindow(db,id,sno) { //ÂûÄ«´Ú ÃÊ»ó±Ç Ä§ÇØ ½Å°í ¹öÆ°ÀÏ¶§ »ç¿ë
		MM_openBrWindow("/Popup/20091016_statement/popup_statement.html?db="+ db + "&id="+id+"&sno="+sno, "singo", "width=425,height=580,scrollbars=no,location=no, directories=no,resizable=no,status=no,toolbar=no,menubar=no,");
	}
//-->