//¾ÆÀÌÇÁ·¹ÀÓ Å©±âº¯°æ
function IframeResize(id) {
	var ifrm = document.getElementById(id);
	var the_height = ifrm.contentWindow.document.body.scrollHeight;
	if (the_height < 1)
		time_id = window.setTimeout("IframeResize('"+id+"')", 10);
	ifrm.height = the_height;
}


function DelCheck(msg) {
	if (!msg) {
		msg = "Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?";
	}

	if (confirm(msg)) {
		return true;
	}
	return false;
}


function goURL(url) {
	if (url)
	{
		location.href = url;
	}
	
}


//ÁÖ¹Î¹øÈ£ ¿©ºÎ Ã¼Å© ÇÔ¼ö
//function isJumin(str_f_num,str_l_num){  
//        var i3=0
//        for (var i=0;i<str_f_num.length;i++){
//         var ch1 = str_f_num.substring(i,i+1);
//            if (ch1<'0' || ch1>'9') i3=i3+1;
//        }
//        if ((str_f_num == '') || ( i3 != 0 )) return false;
//        var i4=0;
//        for (var i=0;i<str_l_num.length;i++){
//            var ch1 = str_l_num.substring(i,i+1);
//            if (ch1<'0' || ch1>'9') i4=i4+1; 
//        }
//        if ((str_l_num == '') || ( i4 != 0 )) return false;
//        if(str_f_num.substring(0,1) < 4) return false;
//        if(str_l_num.substring(0,1) > 2) return false;
//        if((str_f_num.length > 7) || (str_l_num.length > 8)) return false;
//        if ((str_f_num == '72') || ( str_l_num == '18'))  return false;
//                
//        var f1=str_f_num.substring(0,1)
//        var f2=str_f_num.substring(1,2)
//        var f3=str_f_num.substring(2,3)
//        var f4=str_f_num.substring(3,4)
//        var f5=str_f_num.substring(4,5)
//        var f6=str_f_num.substring(5,6)
//        var hap=f1*2+f2*3+f3*4+f4*5+f5*6+f6*7
//        var l1=str_l_num.substring(0,1)
//        var l2=str_l_num.substring(1,2)
//        var l3=str_l_num.substring(2,3)
//        var l4=str_l_num.substring(3,4)
//        var l5=str_l_num.substring(4,5)
//        var l6=str_l_num.substring(5,6)
//        var l7=str_l_num.substring(6,7)
//        hap=hap+l1*8+l2*9+l3*2+l4*3+l5*4+l6*5
//        hap=hap%11
//        hap=11-hap
//        hap=hap%10
//        if (hap != l7) return false;
//        return true; 
//    } 


// ÁÖ¹Î¹øÈ£ 7¹øÂ° ÀÚ¸®ÀÇ ±ÔÄ¢ ########################
// 1800³â´ë: ³²ÀÚ 9, ¿©ÀÚ 0
// 1900³â´ë: ³²ÀÚ 1, ¿©ÀÚ 2
// 2000³â´ë: ³²ÀÚ 3, ¿©ÀÚ 4
// 2100³â´ë: ³²ÀÚ 5, ¿©ÀÚ 6
// ¿Ü±¹ÀÎ µî·Ï¹øÈ£: ³²ÀÚ 7, ¿©ÀÚ 8

// ÁÖ¹Î¹øÈ£, ¿Ü±¹ÀÎ µî·Ï¹øÈ£ÀÇ  validation Ã¼Å© ÇÔ¼ö
function isJumin(str_f_num,str_l_num)
{
	var socno    = str_f_num+str_l_num;
	var socnoStr = socno.toString();
     a = socnoStr.substring(0, 1);
     b = socnoStr.substring(1, 2);
     c = socnoStr.substring(2, 3);
     d = socnoStr.substring(3, 4);
     e = socnoStr.substring(4, 5);
     f = socnoStr.substring(5, 6);
     g = socnoStr.substring(6, 7);
     h = socnoStr.substring(7, 8);
     i = socnoStr.substring(8, 9);
     j = socnoStr.substring(9, 10);
     k = socnoStr.substring(10, 11);
     l = socnoStr.substring(11, 12);
     m = socnoStr.substring(12, 13);
	 month = socnoStr.substring(2,4);
	 day = socnoStr.substring(4,6);
	 socnoStr1 = socnoStr.substring(0, 7);
	 socnoStr2 = socnoStr.substring(7, 13);

	 // ¿ù,ÀÏ Validation Check
	 if(month <= 0 || month > 12) { return false; }
	 if(day <= 0 || day > 31) { return false; }

	 // ÁÖ¹Îµî·Ï¹øÈ£¿¡ °ø¹éÀÌ µé¾î°¡µµ °¡ÀÔÀÌ µÇ´Â °æ¿ì°¡ ¹ß»ýÇÏÁö ¾Êµµ·Ï ÇÑ´Ù.
	 if (isNaN(socnoStr1) || isNaN(socnoStr2))  { return false; }

     temp=a*2+b*3+c*4+d*5+e*6+f*7+g*8+h*9+i*2+j*3+k*4+l*5;
     temp=temp%11;
     temp=11-temp;
     temp=temp%10;

     if(temp == m) {
        return true;
     } else {
        return false;
     }
}



//viewportGPS°´Ã¼ - viewport»óÀÇ ÁÂÇ¥¸¦ ºÒ·¯¿Â´Ù.
viewportGPS = function() {
	if (window.innerWidth) {
		this.innerWidth = window.innerWidth;
		this.innerHeight = window.innerHeight;
		this.leftScroll = window.pageXOffset;
		this.topScroll = window.pageYOffset;
	} else if (document.documentElement && document.documentElement.clientWidth) {
		this.innerWidth = document.documentElement.clientWidth;
		this.innerHeight = document.documentElement.clientHeight;
		this.leftScroll = document.documentElement.scrollLeft;
		this.topScroll = document.documentElement.scrollTop;
	} else if (document.body.clientWidth) {
		this.innerWidth = document.body.clientWidth;
		this.innerHeight = document.body.clientHeight;
		this.leftScroll = document.body.scrollLeft;
		this.topScroll = document.body.scrollTop;
	}
}

//Ã¼Å©¹Ú½º¸¦ ÀüÃ¼ Ã¼Å©-ÇØÁ¦¿ë
function allListCheck(obj) {

	$(obj).bind("click", function(e) {
		var targetObj = $(".jsSeqs").children(":checkbox");
		var mode = this.checked;

		targetObj.each(function(i) {
			this.checked = mode;
		});
	});
}


//°´Ã¼ °ª ±æ¿¡ Ã¼Å©ÈÄ ±æ¸é Àß¶ó³»±â
function byteCheckNCut(obj, length_limit) {
	var length = calculate_msglen(obj.value);
	if (length > length_limit) {
		alert("ÃÖ´ë " + length_limit + "Byte ÀÌ¹Ç·Î ÃÊ°úµÈ ±ÛÀÚ¼ö´Â ÀÚµ¿À¸·Î »èÁ¦µË´Ï´Ù.");
		obj.value = obj.value.replace(/\r\n$/, "");
		obj.value = assert_msglen(obj.value, length_limit);

		obj.focus();
	}
}

//¹®ÀÚ¿­ Byte¼ö Ã¼Å©
function calculate_msglen(message) {
	var nbytes = 0;
	for (i = 0; i < message.length; i++) {
		var ch = message.charAt(i);
		if (escape(ch).length > 4) {
			nbytes += 2;
		} else if (ch == '\n') {
			if (message.charAt(i - 1) != '\r') {
				nbytes += 1;
			}
		} else if (ch == '<' || ch == '>') {
			nbytes += 4;
		} else {
			nbytes += 1;
		}
	}
	
	return nbytes;
}

//¹®ÀÚ¿­ ¿øÇÏ´Â ¹ÙÀÌÆ®¸¸Å­ Àß¶ó³»±â
function assert_msglen(message, maximum){
	var inc = 0;
	var nbytes = 0;
	var msg = "";
	var msglen = message.length;

	for (i=0; i<msglen; i++) {
		var ch = message.charAt(i);
		if (escape(ch).length > 4) {
			inc = 2;
		} else if (ch == '\n') {
			if (message.charAt(i-1) != '\r') {
				inc = 1;
			}
		} else if (ch == '<' || ch == '>') {
			inc = 4;
		} else {
			inc = 1;
		}
		if ((nbytes + inc) > maximum) {
			break;
		}
		nbytes += inc;
		msg += ch;
	}
	return msg;
}

//¹®ÀÚ¿­ÀÌ IDÇüÅÂÀÎÁö È®ÀÎ 8ÀÚÀÌ»ó, ¿µ¹®+¼ýÀÚ
String.prototype.isUserid = function() {

	if (!this.match(/[a-zA-z]{1}[0-9a-zA-Z]+$/)) {
		return true;
	}

	if (this.length < 6) {
		return true;
	}
/*
	sameCnt = 0;
	checkStr = "";
	for (i = 0; i < this.length; i++) {
		if (i == 0) {
			checkStr = this.charAt(i);
		} else {
			if (checkStr == this.charAt(i)) {
				sameCnt++
			} else {
				checkStr = this.charAt(i);
				sameCnt = 0;
			}
		}

		if (sameCnt > 3) {
			return true;
		}
	}

*/
	return false;
}


//¹®ÀÚ¿­ÀÌ ºñ¹Ð¹øÈ£¿¡ ÀûÇÕÇÑ ÇüÅÂÀÎÁö È®ÀÎ 8ÀÚÀÌ»ó, ¿µ¹®+¼ýÀÚ
String.prototype.isUnablePwd = function() {
	if (!this.trim().match(/[a-zA-z]{1}[0-9a-zA-Z]+$/)) {
		return true;
	}

	if (this.length < 8) {
		return true;
	}

	sameCnt = 0;
	checkStr = "";
	for (i = 0; i < this.length; i++) {
		if (i == 0) {
			checkStr = this.charAt(i);
		} else {
			if (checkStr == this.charAt(i)) {
				sameCnt++
			} else {
				checkStr = this.charAt(i);
				sameCnt = 0;
			}
		}

		if (sameCnt > 2) {
			return true;
		}
	}

	return false;
}


//¾÷·Îµå °¡´ÉÇÑ ÆÄÀÏ È®ÀåÀÚÀÎÁö Ã¼Å©
// - ,·Î ±¸ºÐµÈ ¹®ÀÚ¿­À» ¹è¿­·Î ¸¸µé¾î ³Ñ¾î¿Â value°ª°ú ÀÏÄ¡ÇÏ´Â ¼ººÐÀÌ ÀÖÀ¸¸é true ¾øÀ¸¸é false ¹ÝÈ¯
function ableUpload(value, checkStr) {
	checkArr = checkStr.split(",")

	for (i = 0; i < checkArr.length; i++) {
		if (value.split(".")[value.split(".").length - 1].toUpperCase() == checkArr[i].toUpperCase()) {
			return false
		}
	}
	return true
}


//ÀÌ¹ÌÁö ¸®»çÀÌÂ¡
//ÆäÀÌÁö ³»ÀÇ ¸ðµç imgÁß cls°ª°ú ÀÏÄ¡ÇÏ´Â class°ªÀ» °¡Áø ÀÌ¹ÌÁö¸¦ width, height ¿µ¿ª ¾ÈÀ¸·Î ºñÀ²¿¡ ¸ÂÃç Ãà¼Ò½ÃÅ²´Ù.
//width, height°ªÀº ÃÖ¼Ò 1º¸´Ù Ä¿¾ßÇÑ´Ù.
//·ÎµùÁß ÆäÀÌÁö Æ²¾îÁüÀ» ¸·±âÀ§ÇØ div·Î °¨½ÎÁÖ´Â°ÍÀÌ ÁÁ´Ù
function ImageResize(cls, width, height) {
	if (width == null || width <= 1 || height == null || height <= 1) {
		alert("[ImageResize()] width, height°ªÀº ¹Ýµå½Ã 1ÀÌ»óÀÇ °ªÀÌ µé¾î°¡¾ßÇÕ´Ï´Ù.");
		return false;
	}

	if (cls == null || cls == "") {
		alert("[ImageResize()] cls°ªÀÌ ÇÊ¿äÇÕ´Ï´Ù.");
		return false;
	}

	var images = $("." + cls);

	images.each(function() {
		if (this.nodeName.toUpperCase() == "IMG") {
			var imgWidth;
			var imgHeight;
			var widthRatio;
			var heigthRatio;
			var resizeRatio;

			if (this.style.width) {
				imgWidth = parseInt(this.style.width);
			}
			else {
				imgWidth = parseInt(this.width);
			}

			if (this.style.height) {
				imgHeight = parseInt(this.style.height);
			}
			else {
				imgHeight = parseInt(this.height);
			}

			widthRatio = width / imgWidth;
			heigthRatio = height / imgHeight;

			if (widthRatio > heigthRatio) {
				resizeRatio = heigthRatio;
			}
			else {
				resizeRatio = widthRatio;
			}

			this.style.width = (imgWidth * resizeRatio) + "px";
			this.style.height = (imgHeight * resizeRatio) + "px";
		}
	});

}

//·Î±×ÀÎ Ã¼Å©
function loginCheck()
{
	if(!confirm("·Î±×ÀÎ ÈÄ ÀÌ¿ë °¡´ÉÇÕ´Ï´Ù\n\n·Î±×ÀÎ ÆäÀÌÁö·Î ÀÌµ¿ ÇÏ½Ã°Ú½À´Ï±î?"))
		return false;
	document.footerLoginForm.submit();
}


//°Ô½Ã±Û ÃßÃµ
function addRecommend(pIdx, bbsType, userIdx)
{
	$.post("/include/inc_Recommend_data.asp",
			{
				pIdx : pIdx,
				bbsType : bbsType,
				userIdx : userIdx
			},
			function (data){
				if (data == "FAILURE")
				{
					alert("ÀÌ¹Ì ÇØ´ç °Ô½Ã¹°À» ÃßÃµÇÏ¼Ì½À´Ï´Ù. ");
					return;
				}
				else
				{
					alert("ÃßÃµµÇ¾ú½À´Ï´Ù.");
					location.reload();
				}
			},
			"text");
}


//Ã·ºÎÆÄÀÏ »èÁ¦
function DelAttachFile(pIdx, bbsType)
{
	$.post("/include/inc_AttachFileDel.asp",
			{
				pIdx : pIdx,
				bbsType : bbsType
			},
			function (data){
				alert("»èÁ¦µÇ¾ú½À´Ï´Ù.");
				location.reload();
			},
			"text");
}



//ÇÃ·¡½¬ »ðÀÔ-----------------------------------------------------------------------------------------
function flashWrite(url,w,h,vars,bg,win){
	
	var id=url.split("/")[url.split("/").length-1].split(".")[0]; //id´Â ÆÄÀÏ¸íÀ¸·Î ¼³Á¤
	if(vars==null) vars='';
	if(bg==null) bg='#3f3f4b';
	if(win==null) win='transparent';

	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr= "	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
		flashStr+="		codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0'";
		flashStr+="		width='"+w+"'";
		flashStr+="		height='"+h+"'";
		flashStr+="		id='"+id+"'";
		flashStr+="		align='middle'>";

		flashStr+="		<param name='allowScriptAccess' value='always' />";
		flashStr+="		<param name='movie' value='"+url+"' />";
		flashStr+="		<param name='FlashVars' value='"+vars+"' />";
		flashStr+="		<param name='wmode' value='"+win+"' />";
		flashStr+="		<param name='menu' value='false' />";
		flashStr+="		<param name='quality' value='high' />";
		flashStr+="		<param name='bgcolor' value='"+bg+"' />";
		flashStr+="		<param name='allowFullScreen' value='true' />";	
	
		flashStr+="		<embed src='"+url+"'";
		flashStr+="		       flashVars='"+vars+"'";
		flashStr+="		       wmode='"+win+"'";
		flashStr+="		       menu='false'";
		flashStr+="		       quality='high'";
		flashStr+="		       bgcolor='"+bg+"'";
		flashStr+="		       width='"+w+"'";
		flashStr+="		       height='"+h+"'";
		flashStr+="		       name='"+id+"'";
		flashStr+="		       align='middle'";
		flashStr+="		       allowScriptAccess='always'";
		flashStr+="		       type='application/x-shockwave-flash'";
		flashStr+="		       pluginspage='http://www.macromedia.com/go/getflashplayer' />";
		flashStr+=" </object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);
}


function flashWrite2(src, id, width, height, bgColor) {
	var requiredMajorVersion = 9;
	var requiredMinorVersion = 0;
	var requiredRevision = 124;

	var hasProductInstall = DetectFlashVer(6, 0, 65);
	var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

	if (hasProductInstall && !hasRequestedVersion) {
		// DO NOT MODIFY THE FOLLOWING FOUR LINES
		// Location visited after installation is complete if installation is required
		var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
		var MMredirectURL = window.location;
		document.title = document.title.slice(0, 47) + " - Flash Player Installation";
		var MMdoctitle = document.title;

		AC_FL_RunContent(
		"src", "/include/playerProductInstall",
		"FlashVars", "MMredirectURL=" + MMredirectURL + '&MMplayerType=' + MMPlayerType + '&MMdoctitle=' + MMdoctitle + "",
		"width", "100%",
		"height", "100%",
		"align", "middle",
		"id", "singleFileManager",
		"quality", "high",
		"bgcolor", "#869ca7",
		"name", "singleFileManager",
		"allowScriptAccess", "sameDomain",
		"type", "application/x-shockwave-flash",
		"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
	} else if (hasRequestedVersion) {
		// if we've detected an acceptable version
		// embed the Flash Content SWF when all tests are passed
		AC_FL_RunContent(
			"src", src,
			"width", width,
			"height", height,
			"align", "middle",
			"id", id,
			"quality", "high",
			"bgcolor", bgColor,
			"name", "singleFileManager",
			"allowScriptAccess", "sameDomain",
			"type", "application/x-shockwave-flash",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
	} else {  // flash is too old or we can't detect the plugin
		var alternateContent = 'Alternate HTML content should be placed here. '
  	+ 'This content requires the Adobe Flash Player. '
   	+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
		document.write(alternateContent);  // insert non-flash content
	}
}


//ÆÄÀÏ¾÷·Îµå
function fileUploadPopOpen(pidx, pType, foName) {

		$("#uploadFileCode").val(pType);
		$("#uploadFileFormName").val(foName);

		$("#fileUploadPopArea").dialog({
			bgiframe : true,
			modal: true,
			width: 400,
			height:100,
			resizable: false,
			draggable:false,
			title: "ÆÄÀÏ ¾÷·Îµå",
			show: "slide",
			hide: "slide"
		});

		$("#fileUploadPopArea").dialog('open');
	}


//¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÏµµ·Ï
function isOnlyNumber (obj){
	if (isNaN(obj.value)){
		obj.value = "";
	}
}


//µ¿ÀÏ·¹³ª¿î ÆË¾÷¿­±â
function diPopupOpen(popId, width, height, top, left, scrolling, idx)
{
	eval('var ' + popId + ' = window.open("/include/inc_popup.asp?idx='+idx+'", '+popId+', "width='+width+', height='+height+', top='+top+', left='+left+', scrollbars='+scrolling+'");');
}


//·¹ÀÌ¾îÆË¾÷¿­±â(°ü¸®ÀÚ, iframe)
function iframePopOpen_admin(_width, _height, pageUrl, popTitle)
{
	document.getElementById("commonPopIframe").src = pageUrl

	$("#commonIframePopArea").dialog({
			bgiframe : true,
			modal: true,
			width: _width,
			height: _height,
			resizable: false,
			draggable:false,
			title:popTitle,
			show: "slide",
			hide: "slide"
		});

	$("#commonIframePopArea").dialog('open');
}


//ÄíÅ°ÀúÀå
function setCookie(cookieName, value, expiredays)
{
	var todayDate = new Date();
	todayDate.setDate(todayDate.getDate() + expiredays);
	document.cookie = cookieName + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
//ÄíÅ°¹ÝÈ¯
function getCookie(cookieName)
{
	var nameOfCookie = cookieName + "=";
	var x = 0;
	while(x <= document.cookie.length)
	{
		var y = (x + nameOfCookie.length);
		if (document.cookie.substring(x, y) == nameOfCookie)
		{
			if ((endOfCookie = document.cookie.indexOf(";", y)) == -1)
			{
					endOfCookie = document.cookie.length;
			}

			return unescape(document.cookie.substring(y, endOfCookie));
		}

		x = document.cookie.indexOf(" ", x) + 1;
		if (x == 0)
		{
				break;
		}
	}

	return "";
}


//¿¤¸®¸ÕÆ® ³»ºÎ ³»¿ë º¹»çÇÏ±â
//objId:³»¿ëÀ» º¹»çÇÒ DOM°³Ã¼ id°ª
//callBack:¸Þ¸ð¸® º¹»ç ÈÄ ½ÇÇàÇÒ ÄÝ¹éÇÔ¼ö
function copyInnerContent(objId)
{
	inElement = document.getElementById(objId);
	var browserName = navigator.appName;

	if (browserName.search("Explorer" > 0))
	{
		var range = inElement.createTextRange();
		range.execCommand('Copy');
	}
	else
	{
		var flashCopier = 'flashcopier';
		if (!document.getElementById(flashCopier))
		{
			var divHolder = document.createElement("div");
			divHolder.id = flashCopier;
			document.body.appendChild(divHolder);
		}
		document.getElementById(flashCopier).innerHTML = "";
		var divInfo = "<embed src='/include/flex/clipboard-wishkjh.swf' FlashVars='clipboard="+encodeURIComponent(inElement.value)+"' width='0' height='0' type='application/x-shockwave-flash'></embed>"
		document.getElementById(flashCopier).innerHTML = divInfo;
	}
}




/*******************************************¸®ÇÃ°ü·Ã*************************************************/
	function refreshReply(_areaId, _pContIdx, _pDepth, _page)
	{
		$.post("/include/inc_reply.asp",
				{
					pContIdx : _pContIdx,
					replyCode : _pDepth,
					page : _page,
					areaId : _areaId
				},
				function (data){
					document.getElementById(_areaId).innerHTML = data;
				},
				"text");
	}

	function refreshReply2(_areaId, _pContIdx, _pDepth, _page)
	{
		$.post("/include/inc_reply_ucc.asp",
				{
					pContIdx : _pContIdx,
					replyCode : _pDepth,
					page : _page,
					areaId : _areaId
				},
				function (data){
					document.getElementById(_areaId).innerHTML = data;
				},
				"text");
	}

	function showChildReply(areaID, _pReplyIdx, _pDepth)
	{
		var targetArea = document.getElementById(areaID);

		
		childAreaArr = $(".childReplyArea");

		$(childAreaArr).each(function (i){
			$(this).css("display", "none");
			this.innerHTML = "";
		});


		$.post("/include/inc_reply_Child.asp",
			{
				pReplyIdx : _pReplyIdx,
				areaId : areaID,
				pDepth : _pDepth
			},
			function (data){
				targetArea.innerHTML = data;
				targetArea.style.display = "";
			},
			"text");
	}
	
		
	function writeReply(areaId, _pReplyIdx, _pContIdx, _pDepth, _cmtId)
	{
		cmt = $("#"+_cmtId).val();

		if (cmt == "" || cmt.length == 0){
			alert("´ñ±ÛÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
			return;
		}

		$.post("/include/inc_reply_data.asp",
			{
				pReplyIdx : _pReplyIdx,
				icoType : $("#icoType").val(),
				pContIdx : _pContIdx,
				pDepth : _pDepth,
				comment : cmt,
				mode : "NEW"
			},
			function (data){
				refreshReply(areaId, _pContIdx, _pDepth, 1);
			},
			"text");
	}

	function writeReply2(areaId, _pReplyIdx, _pContIdx, _pDepth, _cmtId)
	{
		cmt = $("#"+_cmtId).val();

		if (cmt == "" || cmt.length == 0){
			alert("´ñ±ÛÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
			return;
		}

		$.post("/include/inc_reply_data_ucc.asp",
			{
				pReplyIdx : _pReplyIdx,
				icoType : $("#icoType").val(),
				pContIdx : _pContIdx,
				pDepth : _pDepth,
				comment : cmt,
				mode : "NEW"
			},
			function (data){
				refreshReply2(areaId, _pContIdx, _pDepth, 1);
			},
			"text");
	}

	function writeChildReply(areaId, _pReplyIdx, _pContIdx, _pDepth, _cmtId)
	{
		cmt = $("#"+_cmtId).val();

		if (cmt == "" || cmt.length == 0){
			alert("´ñ±ÛÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
			return;
		}

		$.post("/include/inc_reply_data.asp",
			{
				pReplyIdx : _pReplyIdx,
				icoType : $("#icoType").val(),
				pContIdx : _pContIdx,
				pDepth : _pDepth,
				comment : cmt,
				mode : "NEW"
			},
			function (data){
				showChildReply(areaId, _pReplyIdx, _pDepth);
			},
			"text");
	}

	function delReply(_idx, areaId, _pContIdx, _pDepth)
	{
		if (confirm("Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?"))
		{
			$.post("/include/inc_reply_data.asp",
			{
				idx : _idx,
				pContIdx : _pContIdx,
				pDepth : _pDepth,
				mode : "DEL"
			},
			function (data){
				refreshReply(areaId, _pContIdx, _pDepth, 1);
			},
			"text");
		}
	}

	function delChildReply(_idx, areaId, _pReplyIdx, _pContIdx, _pDepth)
	{
		if (confirm("Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?"))
		{
			$.post("/include/inc_reply_data.asp",
			{
				idx : _idx,
				pContIdx : _pContIdx,
				pDepth : _pDepth,
				mode : "DEL"
			},
			function (data){
				showChildReply(areaId, _pReplyIdx);
			},
			"text");
		}
	}


	function setReplyIcoType(icoValue, hideLayerId, targetObj)
	{
		$("#icoType").val(icoValue);
		$("#"+hideLayerId).hide();
		targetObj.src = "/images/common/emoticon_smile"+icoValue+".png";
	}

/********************************************************************************************/
