
//ºó°ø°£Ã¼Å©
function nullCheck(strOriginal, strFind, strChange) {
	var position, strOri_Length;
	position = strOriginal.indexOf(strFind);
	while(position != -1) {
		strOriginal = strOriginal.replace(strFind, strChange);
		position = strOriginal.indexOf(strFind);
	}
	strOri_Length = strOriginal.length;
	return strOri_Length;
}

//ÆÐ¼Ç ÄÚµð³×ÀÌ¼Ç Å«»çÁø ¿ÀÇÂÃ¢ º¸±â
function codi_enlarge(t_name, t_filename, t_startimg) {
	var url = "02f_codi_enlarge.asp?t_name=" + t_name + "&t_filename=" + t_filename + "&t_startimg=" + t_startimg;
	window.open(url, "codi_enlarge", "width=500,height=748");
}

//ÆÐ¼Ç ½ºÆ®¸®Æ®ÆÐ¼Ç Áö³­°Å¸®ÆÐ¼Ç º¸±â
function goArchive(gourl) {
	if (gourl.value != "") {
		window.location.href = gourl.value;
		return true;
	}
}

//ÄÁÅÙÃ÷ »ó¼¼º¸±â ·Î±×ÀÎÀ¯¹«ÆÄ¾Ç
function goURL(chk_type, chk_url) {
	var go_url = "";
	if (chk_type == "login") {
		go_url = '/00h/doc/login.asp?go_url=' + chk_url;
		window.open(go_url,'login','width=404,height=342,top=100,left=50');
	} else if (chk_type == "content") {
		window.location.href = chk_url;
	} else {
		window.location.reload();
	}
}

//ÄÁÅÙÃ÷ ÃÊ±âÆäÀÌÁö ÀÌµ¿
function goDURL(chk_url) {
	window.location.href = chk_url;
}

//ÄÁÅÙÃ÷ ÃÊ±âÆäÀÌÁö ºÐ·ùº° ÀÌµ¿
function goSURL(chk_type, chk_url) {
	var go_url = "";
	if (chk_type == "login") {
		go_url = '/00h/doc/login.asp?go_url=' + chk_url;
		window.open(go_url,'login','width=404,height=342,top=100,left=50');
	} else if (chk_type == "content") {
		var ment = confirm('¾çÆ÷ÀÎÆ®¸¦ »ç¿ëÇÏ½Ã°Ú½À´Ï±î?     ');
		if (ment) {
			window.location.href = chk_url;
		} else {
		}
	} else if (chk_type == "payment") {
		var ment = confirm('¾çÆ÷ÀÎÆ®°¡ ¸ðÀÚ¶ø´Ï´Ù. ÃæÀüÇÏ½Ã°Ú½À´Ï±î?     ');
		if (ment) {
			goContentPay("sheep");
		} else {
		}
	} else if (chk_type == "free") {
		window.location.href = chk_url;
	} else if (chk_type == "user") {
		window.location.href = chk_url;
	} else if (chk_type == "term") {
		window.location.href = chk_url;
	} else {
		alert('È¸¿ø´ÔÀÇ Á¤º¸¿¡ ¹®Á¦°¡ ÀÖ½À´Ï´Ù. ¿¡·¯¹øÈ£ [02152]. °ü¸®ÀÚ¿¡ ¹®ÀÇÇÏ¼¼¿ä.        ');
		window.location.reload();
	}
}

//ÄÁÅÙÃ÷ µ¿¿µ»óº¸±â
function goMovie(mv_type, mv_idx) {
	var url = "/_inc/include_openmovie.asp?mv_type=" + mv_type + "&mv_idx=" + mv_idx;
	window.open(url, 'movie', 'width=360,height=350');
}

//ÄÁÅÙÃ÷ ¿ÀÇÂÃ¢º¸±â
function goOpen(op_url, op_name, op_width, op_height) {
	var url = "../" + op_url + "/" + op_name;
	var style = "width=" + op_width + ", height=" + op_height;
	window.open(url, 'open', style);
}

//ÄÁÅÙÃ÷ ÆäÀÌÁöÀÌµ¿
function goPage(strPage) {
	var url = document.goPage_frm.gotype.value + "_detail.asp?idx=" + document.goPage_frm.idx.value + "&strPage=" + strPage;
	window.location.href = url;
}

//»èÁ¦¿©ºÎ
function delete_chk(gourl){
	var ment = confirm('Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?    ');
	if (ment) {
		window.location.href = gourl;
	} else {
	}
}

function group_chk(frm, gotype, goaction) {
	if (gotype == "delete") {
		var ment = confirm('Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n\nÇÏÀ§ ´äº¯±ÛÀÌ ÀÖÀ»°æ¿ì ¸ðµÎ ¼±ÅÃÇØ¾ß ÇÕ´Ï´Ù.    ');
		if (ment) {
			frm.strAction.value = gotype;
			frm.action = goaction;
			frm.submit();
		}
	} else {
		frm.strAction.value = gotype;
		frm.action = goaction;
		frm.submit();
	}
}

function move_chk(frm, goaction) {
	var ment = confirm('Á¤¸» ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?    ');
	if (ment) {
		frm.action = goaction;
		frm.submit();
	} else {
	}
}

//°Ë»ö ¿©ºÎ
function search_chk(frm){
	if (nullCheck(frm.strSearchText.value, " ", "") == 0) {
		alert("°Ë»öÇÒ ´Ü¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.    ");
		frm.strSearchText.focus();
		return false;
	}
	if (frm.strSearchText.value.length < 2) {
		alert("°Ë»öÇÒ ´Ü¾î¸¦ µÎÀÚÀÌ»ó ÀÔ·ÂÇÏ¼¼¿ä.    ");
		frm.strSearchText.focus();
		return false;
	} else {
		return true;
	}
}

//´º½º µî·Ï °Ë»ç
function news_chk(frm, actionUrl){
	if (nullCheck(frm.t_type.value, " ", "") == 0) {
		alert("Å¸ÀÔÀ» ¼±ÅÃÇÏ¼¼¿ä.    ");
		frm.t_type.focus();
		return false;
	}
	if (nullCheck(frm.t_title.value, " ", "") == 0) {
		alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.    ");
		frm.t_title.focus();
		return false;
	}
	if (nullCheck(frm.t_content.value, " ", "") == 0) {
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.    ");
		frm.t_content.focus();
		return false;
	} else {
		frm.action = actionUrl;
		frm.submit();
	}
}

//ÅØ½ºÆ®¿¡¾î¸®¾î ¿µ¿ª ´Ã¸®±â
function textArea(frm, frm_field) {
	frm.t_content.rows = frm.t_content.rows + 5;
}

//°¶·¯¸® µî·Ï °Ë»ç
function gallery_chk(frm, actionUrl){
	if (nullCheck(frm.t_title.value, " ", "") == 0) {
		alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.    ");
		frm.t_title.focus();
		return false;
	}
	if (nullCheck(frm.t_content.value, " ", "") == 0) {
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.    ");
		frm.t_content.focus();
		return false;
	}
	if ((nullCheck(frm.t_filename1.value, " ", "") == 0) && (nullCheck(frm.t_oldfilename1.value, " ", "") == 0)) {
		alert("ÀÌ¹ÌÁö¸¦ ¼±ÅÃÇÏ¼¼¿ä.    ");
		return false;
	} else {
		frm.action = actionUrl;
		frm.submit();
	}
}

//°Ô½ÃÆÇ µî·Ï °Ë»ç
function board_chk(frm, actionUrl){
	if (nullCheck(frm.t_title.value, " ", "") == 0) {
		alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.    ");
		frm.t_title.focus();
		return false;
	} else {
		for (i = 0; i < frm.t_title.value.length; i++) {
			if (frm.t_title.value.charAt(i) == "<" || frm.t_title.value.charAt(i) == ">") {
				alert("Á¦¸ñ¿¡¼­´Â ÅÂ±× ¹× ÀÏºÎ Æ¯¼ö¹®ÀÚ¸¦ »ç¿ëÇÏ½Ç¼ö ¾ø½À´Ï´Ù.   ");
				frm.t_title.value = "";
				frm.t_title.focus();
				return false;
			}
		}
	}
	if (nullCheck(frm.t_content.value, " ", "") == 0) {
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.    ");
		frm.t_content.focus();
		return false;
	} else {
		frm.action = actionUrl;
		frm.submit();
	}
}

//°øÁö»çÇ× µî·Ï °Ë»ç
function notice_chk(frm, actionUrl){
	if (nullCheck(frm.t_title.value, " ", "") == 0) {
		alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.    ");
		frm.t_title.focus();
		return false;
	}
	if (nullCheck(frm.t_content.value, " ", "") == 0) {
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.    ");
		frm.t_content.focus();
		return false;
	} else {
		frm.action = actionUrl;
		frm.submit();
	}
}

//¾çÃæÀü ÆäÀÌÁö ¿ÀÇÂ
function goContentPay(contentPayType){
	var go_url = "../../00h/doc/payment.asp?contentPayType=" + contentPayType;
	window.open(go_url, 'contentPay', 'width=404, height=311');
}

//¾çÃæÀü °Ë»ç
function contentPay_chk(frm){
	if (nullCheck(frm.t_contentpay.value, " ", "") == 0) {
		alert("°áÁ¦Å©±â¸¦ ¼±ÅÃÇÏ¼¼¿ä.    ");
		frm.t_contentpay.focus();
		return false;
	}
	if (nullCheck(frm.t_paymenttype.value, " ", "") == 0) {
		alert("°áÁ¦¹æ¹ýÀ» ¼±ÅÃÇÏ¼¼¿ä.    ");
		frm.t_paymenttype.focus();
		return false;
	} else {
		return true;
	}
}




















