/**
/*
 * Title		:	°øÅëÀ¸·Î»ç¿ëµÇ´Â script
 * Description	:	
 * Filename		:	/image/cssjs/pkc_basic.js
 * Cre_date		:	2003.07.18
 * Mod_date		:	2003.
 * @author		:	¼Û ¿ø ¸¸ (nitto182@kornet.net)
 * @version		:	V 3.1.1
 */


<!--


/*	¿ÞÆí ¸Þ´ººÎºÐ ÀÌ¹ÌÁöº¯°æÀ» À§ÇÑ js	*/
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}




/*	select option ÀÇ jump ¸Þ´º	*/

// select option ÀÇ jump ¸Þ´º¿ë - ¼±ÅÃ½Ã »õÃ¢À¸·Î ¶ç¿ò - main ¿¡¼­ °ü·Ã»çÀÌÆ® »õÃ¢À¸·Î ¶ç¿ï¶§ µî¿¡ »ç¿ë (À­¸Þ´ºÀÖ°Ô)
function MM_jumpMenu(targ,selObj,restore){ //v3.0
	if(selObj.options[selObj.selectedIndex].value!=null && selObj.options[selObj.selectedIndex].value!=""){
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		if(restore) selObj.selectedIndex=0;
	}
}

// select option ÀÇ jump ¸Þ´º¿ë2 - ¼±ÅÃ½Ã »õÃ¢À¸·Î ¶ç¿ò - main ¿¡¼­ °ü·Ã»çÀÌÆ® »õÃ¢À¸·Î ¶ç¿ï¶§ µî¿¡ »ç¿ë (À­¸Þ´º¾ø°Ô)
function MM_OpenJumpMenu(targ,selObj,restore){
	if(selObj.options[selObj.selectedIndex].value!=null && selObj.options[selObj.selectedIndex].value!=""){
		window.open(selObj.options[selObj.selectedIndex].value,'rsite','top=10px,left=10px,toolbar=yes,location=yes,menubar=yes,status=yes,resizable=yes,scrollbars=yes');
	}
}

// select option ÀÇ jump ¸Þ´º¿ë3 - ¼±ÅÃ½Ã »õÃ¢À¸·Î ¶ç¿ò - main ¿¡¼­ °ü·Ã»çÀÌÆ® »õÃ¢À¸·Î ¶ç¿ï¶§ µî¿¡ »ç¿ë (À­ ¸Þ´º´Â »õÃ¢À¸·Î ÇÏÁö ¾Ê±â)
function MM_MainJumpMenu(targ,selObj,restore){
	if(selObj.selectedIndex==0){
		location.href = "/commu/link/pku_link_site.jsp";
	}else{
		window.open(selObj.options[selObj.selectedIndex].value,'rsite','top=10px,left=10px,toolbar=yes,location=yes,menubar=yes,status=yes,resizable=yes,scrollbars=yes');
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
  


/*	¸ÞÀÎ¼º ÆäÀÌÁöµé¿¡ ¸µÅ©µÈ °Ô½Ã¹°À» ¹Ì¸®º¸±â ÇÏ°ÔÇÏ°í »õÃ¢À¸·Î °Ô½ÃÆÇÁ¤º¸¸¦ º¸°ÔÇÏ´Â script */


//	¸ÞÀÎ¼º ÆäÀÌÁöµé¿¡ ¸µÅ©µÈ °Ô½Ã¹°µîµéÀ» ¹Ì¸®º¸±â ÇÏ´Â script
//	ÂüÁ¶	 script from http://www.kimho.pe.kr ÀÇ TTBoard [ http://ttboard.com ] java script
function js_Msgposit(v_left){ 
	message.style.posLeft = v_left //event.x + 40 + document.body.scrollLeft
	message.style.posTop = event.y + 10 + document.body.scrollTop 
}
function js_Msgset(str,str2){ 
	var text 
	text ='<table border="0" width="400" cellpadding="6" cellspacing="0" bgcolor="#F0F0F0" style="border-width:1; border-color:#CCCCFF; border-style:solid;">' 
	text += '<tr><td><p><b>' + str + '<br><br></b>' + str2 + '</td></tr></table>' 
	message.innerHTML=text 
}
function js_Msghide(){ 
	message.innerHTML='' 
	//message.style.visibility='hidden' 
}
// »õÃ¢À¸·Î °Ô½Ã¹° º¸±âÃ¢ ¶ç¿ì±â
function js_OpenBoardView(s_ct,s_bd_seq){
	var url = "/board/pku_boardview_s.jsp?ct="+s_ct+"&seq="+s_bd_seq;
	bbs_win = window.open(url, "win2","top=100px,left=100px,status=no,resizable=no,menubar=no,scrollbars=yes,width=620,height=500");
	bbs_win.focus();
}




/*	auto logout¿ë js	 	*/
//	logoutÀ» ÇÏÁö ¾Ê°í ºê¶ó¿ìÁ®¸¦ ´Ý¾ÒÀ»°æ¿ì ÀÚµ¿À¸·Î myLogin.logout()È£ÃâÇÏ±â
//	bodyÅÂ±×¿¡ ´ÙÀ½°ú °°ÀÌ µÇ¾î ÀÖ½¿(ÀÚµ¿ÀÓ....¤»¤»)!!! ...<body onbeforeunload="javascript:js_AutoLogOut()">

function js_AutoLogOutConf(){
			var url = "/login/pkc_autologoutconf.jsp";
			zip_win = window.open(url, "_close","top=1px,left=1px,status=no,resizable=no,menubar=no,scrollbars=no,width=1,height=1");
}

function js_AutoLogOut(){
//	if(confirm("·Î±×¾Æ¿ôÇÏ½Ã°Ú½À´Ï±î?")){
		return js_AutoLogOutConf();
//	}else{
//		location.href = "cancel.html";
//	}
}



/*	CRUDÇÒ¶§	 */
function js_IsRealOk(msg){
	ans = confirm(msg)
	if(ans == true){
		return true;
	}else{
		return false;
	}
}




/*	ÅëÇÕ°Ë»ö¿ë js		*/

function mainSearch(object) {
	if (object.key1.value=="") {
		alert("°Ë»ö´Ü¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		object.key1.focus();
		return false;
	}//else if(object.key.value == "%"){
	if(CheckType(object.key1.value)){
		alert("Æ¯¼ö¹®ÀÚ´Â ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		object.key1.focus();
		object.key1.select();
		return false;
	} 
	return true;
}




/*	ÀÏ¹Ý Application¿¡¼­ÀÇ °Ë»ö¿ë js		*/

function searchChk(object){
	if (object.key.value=="") {
		alert("°Ë»ö´Ü¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		object.key.focus();
		return false;
	}//else if(object.key.value == "%"){
	if(CheckType(object.key.value)){
		alert("Æ¯¼ö¹®ÀÚ´Â ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		object.key.value="";
		object.key.focus();
		object.key.select();
		return false;
	} 
	return true;
}

function searchChk2(object){
	if (object.key2.value=="") {
		alert("°Ë»ö´Ü¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		object.key2.focus();
		return false;
	}//else if(object.key2.value == "%"){
	if(CheckType(object.key2.value)){
		alert("Æ¯¼ö¹®ÀÚ´Â ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		object.key2.value="";
		object.key2.focus();
		object.key2.select();
		return false;
	} 
	return true;
}

function searchNoKeywordChk(object){
	if(CheckType(object.key.value)){
		alert("Æ¯¼ö¹®ÀÚ´Â ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		object.key.value="";
		object.key.focus();
		object.key.select();
		return false;
	} 
	return true;
}

/*	µ¿È£È¸¿¡¼­ÀÇ °Ë»ö¿ë js		*/

function searchForumChk(object){
	if (object.st_key.value=="") {
		alert("°Ë»ö´Ü¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		object.st_key.focus();
		return false;
	}//else if(object.st_key.value == "%"){
	if(CheckType(object.st_key.value)){
		alert("Æ¯¼ö¹®ÀÚ´Â ÀÌ¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		object.st_key.value="";
		object.st_key.focus();
		object.st_key.select();
		return false;
	} 
	return true;
}


/*	µÚ·Î°¡±â ¹öÆ°¿¡ ¾²ÀÌ´Â js	*/
function js_Back(){
		history.back();
}


/*	È®ÀÎ¹öÆ° Å¬¸¯½Ã form°ªÀ» ³Ñ°Ü¼­ submitÃ³¸®	*/
function js_Submit(object){
		object.submit();
}









/*	µÚ·Î°¡±â ¹öÆ°¿¡ ¾²ÀÌ´Â js	*/
function js_ComBack(){
		history.back();
}
// ÀÌ°Í ´ë½Å »ç¿ë¹ý onClick="javascript:history.back();"

/*	È®ÀÎ¹öÆ° Å¬¸¯½Ã submitÃ³¸® - 03.02.07	*/
function js_ComSubmit(){
	document.form.submit();
}
// ÀÌ°Í ´ë½Å »ç¿ë¹ý onClick="javascript:submit();"


/*	¹öÆ° Å¬¸¯½Ã form°ªÀ» Æ¯Á¤url·Î ³Ñ±â¸é¼­ submitÃ³¸®	- 03.02.07*/
function js_ComSubmit(action_url){		
	document.form.action = action_url;
	document.form.submit();
}

/*	Æ¯Á¤ ¸Þ¼¼Áö¸¸ »Ñ·ÁÁÖ´Â js(ÀÌµ¿¾øÀÌ ¸Þ¼¼Áö¸¸ »Ñ¸².)	*/
function js_PopupMsg(theMsg){
		alert(theMsg);
}
// »ç¿ë : <a href="#" onClick="js_PopupMsg('¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù....')"><img ...></a>







/*
*	·Î±×ÀÎ ÇÊ¿äÇÑ ÆäÀÌÁö Å¬¸¯½Ã confirmÀ» ÀÌ¿ëÇØ ¸Þ¼¼Áö »Ñ·ÁÁÖ°í 
*	»ç¿ëÀÚ¿¡°Ô ·Î±×ÀÎÆäÀÌÁö·Î ÀÌµ¿ÇÒ ¼ö ÀÖ°Ô²û ÇØÁÖ´Â script
*	(sectionÀÌ 'new'ÀÌ¸é È¸¿øÀü¿ë ÆäÀÌÁö°¡ »õÃ¢À¸·Î ¶ç¿öÁú¶§¸¦ ÀÇ¹ÌÇÏ´Â °ÍÀ¸·Î Ãë±Þ) 
*	- 02.10.08 Ãß°¡
*
*	@param	user_id		È¸¿øid
*	@param	fw_url		encoding µÈ ÀÌµ¿ÇÒ È¸¿øÀü¿ë ÆäÀÌÁö °æ·Î (url parameterÆ÷ÇÔ)
*	@param	next_url	ÀÌµ¿ÇÒ È¸¿øÀü¿ë ÆäÀÌÁö °æ·Î (url parameterÆ÷ÇÔ)
*	@param	features	È¸¿øÀü¿ë ÆäÀÌÁö°¡ »õÃ¢À¸·Î ¶ç¿öÁ®¾ßÇÏ´Â °ÍÀÏ¶§ ¾²ÀÏ »õÃ¢ÀÇ È¯°æ¼³Á¤°ª 
*						ex) top=10px,left=10px,width=500,height=400,status=no,resizable=no,menubar=no,scrollbars=yes
*/
/*
function js_ComLoginChk(user_id, fw_url, next_url, features){
	if(fw_url=="" || next_url=""){
		window.alert("Á¤º¸°¡ Á¤È®ÇÏÁö ¾Ê¾Æ ½ÇÇà ÇÒ ¼ö ¾ø½À´Ï´Ù.\nÈ®ÀÎÇÏ½Å ÈÄ ½ÃµµÇØ ÁÖ¼¼¿ä.");
		return;
	}else if(user_id==""){
		if(js_ComIsRealOk("º» ¼­ºñ½º¸¦ ÀÌ¿ëÇÏ½Ã·Á¸é ·Î±×ÀÎÇÏ¼Å¾ß ÇÕ´Ï´Ù.\n·Î±×ÀÎ ÇÏ½Ã°Ú½À´Ï±î?")){
			location.href = "/login/pkc_login.jsp?jp_url="+fw_url;
		}else{
			return;
		}
	}else{
		// »õÃ¢ÀÇ È¯°æ¼³Á¤°ª ÀÖ´Ù¸é »õÃ¢À¸·Î È¸¿øÀü¿ë Ã¢À» ¶ç¿ò
		if(features!=""){
			newWinOpen = window.open(next_url, 'win', features);
			newWinOpen.focus();
		// ¾ø´Ù¸é ¹Ù·Î ÀÌµ¿
		}else{
			location.href = next_url;
		}
	}
}
*/






/* »õÃ¢¶ç¿ì±â	 - ÀÛ¾÷Áß	*/

function js_NewWinOpen(url,top,left,width,height,status,resizable,menubar,scrollbars){

	var v_setting;

	// urlÀÌ Á¦´ë·Î ³Ñ¾î¿Ã¶§¸¸ »õÃ¢¿­°Ô²û Ã¼Å©ÇÑÈÄ »õÃ¢¶ç¿ò (urlÀÌ ~.html µîÀÇ È®ÀåÀÚ¸¦ °¡Áø ½ºÅ¸ÀÏÀÌ´Ù¸é À¯È¿ÇÏ°Ô ÆÇ´Ü)
	if(url.search(/(\S+)\.(\S+)/) != -1){

		//°ªµéÀÌ À¯È¿¼º¿¡ ¾î±ß³ª°Å³ª ¼³Á¤ÇÏÁö ¾Ê¾Ò´Ù¸é(³Î°ªÀ¸·Î ³Ñ¿À¸é) default°ªÀ¸·Î ¼³Á¤
		if(top == null || top == "" || !js_ChkNum(top) || left == null || left == "" || !js_ChkNum(left)){
			top = 100;
			left = 100;
		}
		if(width == null || width == "" || !js_ChkNum(width) || height == null || height == "" || !js_ChkNum(height)){
			width = 500;
			height = 400;
		}
		if(status == null || status == "" || status != "no" || status != "NO" || status != "yes" || status != "YES")							status = "no";
		if(resizable == null || resizable == "" || resizable != "no" || resizable != "NO" || resizable != "yes" || resizable != "YES")			resizable = "no";
		if(menubar == null || menubar == "" || menubar != "no" || menubar != "NO" || menubar != "yes" || menubar != "YES")						menubar = "no";
		if(scrollbars == null || scrollbars == "" || scrollbars != "no" || scrollbars != "NO" || scrollbars != "yes" || scrollbars != "YES")	scrollbars = "no";
		v_setting = "top="+top+"px,left="+left+"px,width="+width+",height="+height+",status="+status+",resizable="+resizable+",menubar="+menubar+",scrollbars="+scrollbars;
//		alert(url);
		newWinOpen = window.open(url, "win1", v_setting);
		newWinOpen.focus();
	}
}

function js_OpenBrWindow(theURL,winName,features) {
	newWinOpen = window.open(theURL,winName,features);
	newWinOpen.focus();
}




	/*
	*	ÄíÅ°°ª setting
	*	- expiredays°¡ 1ÀÌ¸é ÄíÅ°¸¸·á½Ã°£ÀÌ ÇÏ·ç¶ó´Â ÀÇ¹Ì
	*/
	function setCookie(name, value, expiredays){ 
		var todayDate = new Date();
		todayDate.setDate( todayDate.getDate() + expiredays );
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
	}





/**************************************************************************
*
*	¿©±â¼­ºÎÅÏ °øÅëÀûÀ¸·Î »ç¿ëµÇ´Â ½ºÅ©¸³Æ®
*
*/


// select option ÀÇ jump ¸Þ´º¿ë2 - ¼±ÅÃ½Ã »õÃ¢À¸·Î ¶ç¿ò - main ¿¡¼­ °ü·Ã»çÀÌÆ® »õÃ¢À¸·Î ¶ç¿ï¶§ µî¿¡ »ç¿ë
function js_ComNewOpenWindow(theURL,winName,features){
  newWinOpen = window.open(theURL,winName,features);
  newWinOpen.focus();
}



/*	°¢Á¾°ª Ã¼Å©¿ë	- Ãß°¡ ÀÛ¾÷Áß	 */




//	¸®½ºÆ®¼º ÆäÀÌÁöµé¿¡¼­ °Ë»öÃ¼Å© - 02.10.07 Ãß°¡
function js_ComChkSearch(object){
	if(object.org_key.value==""){
		alert("°Ë»ö´Ü¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		object.org_key.focus();
		return false;
	}else if(object.org_key.value=="%"){
		alert("Æ¯¼ö¹®ÀÚ %´Â °Ë»öÇÒ¼ö ¾ø½À´Ï´Ù.");
		object.org_key.value="";
		object.org_key.focus();
		object.org_key.select();
		return false;
	}
	return true;
}




// °ªÀÌ emailÀÎÁö Ã¼Å© 
function js_ComChkMail(obj_filed){
	aIndex = obj_filed.value.indexOf("@");
	dotIndex = obj_filed.value.indexOf(".");

	if(aIndex == -1 || dotIndex == -1){
		alert( "E-mailÁÖ¼Ò¸¦ Á¤È®È÷ ÀÔ·ÂÇØÁÖ¼¼¿ä.\n\n ¿¹)cpu7moon@hotmail.com" );
		obj_filed.focus();
		return false;
	}

	var e1 = obj_filed;
	var xc = e1.value.length;
	var num ="@.-_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
	var stt = "@.";
	if((-1 != stt.indexOf(e1.value.charAt(0))) || (-1 != stt.indexOf(e1.value.charAt(xc-1)))){
		alert( "E-mailÁÖ¼Ò¸¦ Á¤È®È÷ ÀÔ·ÂÇØÁÖ¼¼¿ä.\n\n ¿¹)cpu8moon@hotmail.com" );
		obj_filed.focus();
		return false;
	}

	for(var i=0;i<e1.value.length;i++){
		if(-1 == num.indexOf(e1.value.charAt(i))){
			alert( "E-mailÁÖ¼Ò¸¦ Á¤È®È÷ ÀÔ·ÂÇØÁÖ¼¼¿ä.\n\n ¿¹)cpu9moon@hotmail.com" );
			obj_filed.focus();
			return false;
		}
	}
	return true;
}

// ¹®ÀÚ,¼ýÀÚÀÎÁö Ã¼Å© (Æ¯¼ö¹®ÀÚ,ÇÑ±Û Á¦¿Ü) - ºñ¹Ð¹øÈ£, id Ã¼Å©¿¡ »ç¿ë
function js_ComChkChatNumValue(word){
	var str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
	
	for(i=0; i< word.length; i++){
		idcheck = word.charAt(i);
		for(j = 0; j<str.length; j++){
			if(idcheck == str.charAt(j)) break;
     			if (j+1 == str.length)	return false;
     	}
     	return true;
	}
}



// ¼ýÀÚÀÎÁö Ã¼Å© - °ªÀÌ ¼ýÀÚÀÌ¸é true°ª return
function js_ComChkNum(parm){
	var str = "1234567890";
	for(i=0; i< parm.length; i++){
		idcheck = parm.charAt(i);
		for(j = 0; j < str.length ;j++){
			if(idcheck == str.charAt(j))	break;
			if(j+1 == str.length)			return false;
		}
	}
	return true;
}

// ºñ¹Ð¹øÈ£ Ã¼Å©
function js_ComChkPwd(obj_filed) {
	var pwd = obj_filed.value;
	if(pwd=="") {
		alert("ºñ¹Ð¹øÈ£¸¦ ±âÀÔÇÏ¼¼¾ßÇÕ´Ï´Ù.");
		obj_filed.focus();
		return false;
	}
	if(pwd.length<5 || js_ComChkChatNumValue(pwd) != true){
		alert("ºñ¹Ð¹øÈ£´Â 5ÀÚÀÌ»ó ¼ýÀÚ¿Í ¿µ¹®À¸·Î ÀÌ·ç¾îÁý´Ï´Ù.");
		obj_filed.value = "";
		obj_filed.focus();
		return false;
	}
	return true;
}


////////////////////Ã¢ °ü·Ã////////////////////

// select option ÀÇ jump ¸Þ´º¿ë2 - ¼±ÅÃ½Ã »õÃ¢À¸·Î ¶ç¿ò - main ¿¡¼­ °ü·Ã»çÀÌÆ® »õÃ¢À¸·Î ¶ç¿ï¶§ µî¿¡ »ç¿ë (À­¸Þ´º¾ø°Ô)
function js_WinOpen(url){
	window.open(url, "new3", "top=10px,left=10px,toolbar=yes,location=yes,menubar=yes,status=yes,resizable=yes,scrollbars=yes");
	window.close();
}

function js_PageReload(){
	location.reload();
}

// »õÃ¢À¸·Î ¶°ÀÖ´Â Ã¢Àº ´ÝÀ¸¸é¼­ ±âÁ¸Ã¢Àº reload½ÃÅ°±â
function js_SelfClosePageReload(){
	self.close();
	opener.location.reload();
}

// »õÃ¢À¸·Î ¶°ÀÖ´Â Ã¢Àº ´ÝÀ¸¸é¼­ ±âÁ¸Ã¢Àº ÇØ´ç URL·Î loction½ÃÅ°±â  - 030722 Ãß°¡(¼Û¿ø¸¸)
function js_SelfCloseOpenerLocation(url){
	opener.location.href = url;
	window.close();
}

/*
*	Æ¯Á¤ ¸Þ¼¼Áö¸¦ confirmÀ» ÀÌ¿ëÇØ ¸Þ¼¼Áö¸¦ Ãâ·ÂÇØÁÖ°í »ç¿ëÀÚ ¼±ÅÃ¿¡ ÀÇÇØ ÁøÇàÇÏ°Ô²û ÇÏ´Â ÀÚ¹Ù½ºÅ©¸³Æ®
*	- CRUDµîÀ» ÇÒ¶§ »ç¿ëÀÚ¿¡°Ô È®ÀÎÀ» À§ÇØ ¹°¾îº¸°í ´ÙÀ½ÆäÀÌÁö·Î Ã³¸® ÁøÇà ÇÏ±â À§ÇØ »ç¿ëµÊ.
*	- 02.10.02 Ãß°¡
*/

function js_ComIsRealOk(msg){
	if(msg!=""){
		ans = confirm(msg)
		if(ans == true){
			return true;
		}else{
			return false;
		}
	}else{
		return false;
	}
}




/*
*	ÇØ´ç ¸Þ¼¼Áö¸¦ confirmÀ» ÀÌ¿ëÇÏ´Â js_ComIsRealOk()¸¦ È£ÃâÇØ ¸Þ¼¼Áö¸¦ Ãâ·ÂÇØÁÖ°í »ç¿ëÀÚ ¼±ÅÃ¿¡ ÀÇÇØ ÁøÇàÇÏ°Ô²û ÇÏ´Â ÀÚ¹Ù½ºÅ©¸³Æ®
*	- confirm¿¡ ÀÇÇØ yesÅ¬¸¯½Ã Æ¯Á¤ url·Î ÁøÇàÇÏ°í, noÅ¬¸¯½Ã´Â º¯È­¾ø°Ô µÊ.
*	- 02.10.06 Ãß°¡
*
*	@param	msg			confirmÀ» ÀÌ¿ëÇØ¼­ »ç¿ëÀÚ¿¡°Ô º¸¿©ÁÙ ¸Þ¼¼Áö	ex) µ¿È£È¸¸¦ »èÁ¦ÇÏ¸é ¸ðµçÁ¤º¸°¡ »èÁ¦µË´Ï´Ù.\n»èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?
*	@param	locateUrl	confirmÀ¸·Î ¸Þ¼¼Áö ¶ç¿üÀ»¶§ yes¸¦ Å¬¸¯ÇÑ°æ¿ì location.href·Î ÀÌµ¿ÇÒ ÆäÀÌÁö °æ·Î
*/
function js_ComConfirmLocate(msg, locateUrl){
	if(msg!=""){
		if(js_ComIsRealOk(msg)){
			location.href = locateUrl;
		}else{
			return;
		}
	}else{
		return;
	}
}

function js_ComConfirmNewWin(msg, url){
	if(msg!=""){
		if(js_ComIsRealOk(msg)){
			window.open(url, 'win','');
		}else{
			return;
		}
	}else{
		return;
	}
}



/*	Ã¢´Ý±â - 02.10.02 Ãß°¡  */

function js_ComWinClose(){
	window.close();
}



/*	»õÃ¢¶ç¿ì±â js - 03.03.11 Ãß°¡	*/

function js_ComOpenWindow(newWinUrl, winName, features) {
	newWinOpen = window.open(newWinUrl, winName, features);
	newWinOpen.focus();
}



/*	Á¦¾îÈÄ ¸Þ¼¼Áö Ãâ·Â°ü·Ã	 */

/*
*	È¸¿øÀü¿ë ¼­ºñ½º¿¡ ´ëÇØ ·Î±×ÀÎ ¿©ºÎ¿¡ µû¶ó ÀÌµ¿ Á¦¾î
*	- Å¬¸¯½Ã ·Î±×ÀÎ ÇÒ°ÍÀÎÁö Ãë¼ÒÇÒ°ÍÀÎÁö ¹¯´Â script
*/
function js_ServiceLink(cseq, user_id, Encd_programId){
	if(cseq==""){
		window.alert("µ¿È£È¸Á¤º¸°¡ Á¤È®ÇÏÁö ¾Ê½À´Ï´Ù.\nÈ®ÀÎÇÏ½ÅÈÄ °¡ÀÔÇØ ÁÖ¼¼¿ä.");
		return;
	}else if(user_id=="" & Encd_programId!=""){
		if(js_ComIsRealOk("·Î±×ÀÎÇÏ¼Å¾ß ¼­ºñ½º ÀÌ¿ëÀÌ °¡´ÉÇÕ´Ï´Ù.\n\n·Î±×ÀÎ ÇÏ½Ã°Ú½À´Ï±î?\n")){
			location.href = "/memb/login/pku_login.jsp?jp_encurl="+Encd_programId;
		}else{
			return;
		}

	}else{
		window.open('/club/pku_myclubreg.jsp?cseq='+cseq+'&user_id='+user_id, 'myclubreg','width=620,height=650,noresize,scrollbars=1');
	}

}



/*	±âÅ¸ ÂüÁ¶¿ë js 	*/

function change_menu(image, name){
        name.src='/img/'+image;
}

function js_MoveFocus() {
	document.loginForm.user_id.focus();
	return;
}
//»ç¿ë : <BODY ... onload="js_MoveFocus();>



/*	Å¸ÀÔÃ¼Å©	 */
var NonPermit = "~!@#$%^&*()_+|`-=\[{]};:',./<>?";
/*
*	2004.01.07 ½Å¿ÕÁ¤Ãß°¡
*/

function CheckType(s) {
	var i;
	for(i=0; i<s.length; i++) {
		if (NonPermit.indexOf( s.substring(i, i+1)) > 0) {
			return true;
		}
	}
		
	return false;
}


function alertCheckType(s) {
	if (CheckType(s.value)) {
		alert("Æ¯¼ö ¹®ÀÚ¸¦ »ç¿ëÇÏ½Ç¼ö ¾ø½À´Ï´Ù!");
		s.value="";
	}
}

/*
*	2004.01.07 ½Å¿ÕÁ¤Ãß°¡
*/
// HTML¼º ÀÎ¼â¿ëÆäÀÌÁö È£Ãâ
function js_OpenPrint(arg){
	var url = "/common/pkc_print.jsp?target_file="+arg;
	bbs_win = window.open(url, "win2","top=10px,left=10px,status=no,resizable=no,menubar=yes,scrollbars=yes,width=680,height=500");
	bbs_win.focus();
}

function js_SendEmail(arg){
	var url = "/common/pkc_email.jsp?target_file="+arg;
	bbs_win = window.open(url, "win2","top=10px,left=10px,status=no,resizable=no,menubar=no,scrollbars=yes,width=668,height=570");
	bbs_win.focus();
}

function js_BdOpenPrint(arg1, arg2){
	var url = "/common/pkc_bdprint.jsp?snc_seq="+arg1+"&sn_seq="+arg2;
	bbs_win = window.open(url, "win2","top=10px,left=10px,status=no,resizable=no,menubar=yes,scrollbars=yes,width=680,height=500");
	bbs_win.focus();
}

function js_BdSendEmail(arg1, arg2){
	var url = "/common/pkc_bdemail.jsp?snc_seq="+arg1+"&sn_seq="+arg2;
	bbs_win = window.open(url, "win2","top=10px,left=10px,status=no,resizable=no,menubar=no,scrollbars=yes,width=668,height=570");
	bbs_win.focus();
}

function js_BoardOpenPrint(arg1, arg2){
	var url = "/common/pkc_board_print.jsp?ct="+arg1+"&seq="+arg2+"&ref="+arg2;
	bbs_win = window.open(url, "win2","top=10px,left=10px,status=no,resizable=no,menubar=yes,scrollbars=yes,width=680,height=500");
	bbs_win.focus();
}

function js_BoardSendEmail(arg1, arg2){
	var url = "/common/pkc_board_email.jsp?ct="+arg1+"&seq="+arg2+"&ref="+arg2;
	bbs_win = window.open(url, "win2","top=10px,left=10px,status=no,resizable=no,menubar=no,scrollbars=yes,width=668,height=570");
	bbs_win.focus();
}


/*
 *	½ÇÁ¦ ¿î¿µ½Ã ¿À¸¥ÂÊ ¹öÆ° Å¬¸¯ ¸·±â
 *	(document.onmousedown = click ÀÌ°ÍÀÌ ¼±¾ðµÇ¾î ÀÖÀ¸¸é ÀÛµ¿ÇÏ´Â °ÍÀÓ.)
 */
//document.onmousedown = click

function rightClick() {
	if (event.button==2) {
		alert('¸¶¿ì½º ¿À¸¥ÂÊ ¹öÆ°Àº »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.');
	}
}



	/* ±ÛÀÚ¼ö Ã¼Å©	*/
 	function js_ChkWord(obj_filed, len) {
		var word = obj_filed.value;
//		alert("±ÛÀÚ¼ö:"+word.bytes());
		if(word.bytes()>len){
			alert(" ÇÑ±Û "+len/2+" ±ÛÀÚ (¿µ¹®À¸·Ð "+len+" bytes) ÀÌ»óÀ» ÃÊ°úÇÒ ¼ö ¾ø½À´Ï´Ù. \n\n [ÃÊ°úµÈ ¹®ÀÚ¼ö] ÇÑ±Û "+((word.bytes()-len)/2)+"±ÛÀÚ (¿µ¹®,¼ýÀÚ·Î´Â "+(word.bytes()-len)+" ±ÛÀÚ)¸¦ ÃÊ°úÇÏ¼Ì½À´Ï´Ù. \n");
			obj_filed.focus();
			return false;
		}
		return true;
	}


	/** 
	* bool String::bytes(void)
	* ÇØ´ç½ºÆ®¸µÀÇ ¹ÙÀÌÆ®´ÜÀ§ ±æÀÌ¸¦ ¸®ÅÏÇÕ´Ï´Ù. (±âÁ¸ÀÇ length ¼Ó¼ºÀº 2¹ÙÀÌÆ® ¹®ÀÚ¸¦ ÇÑ±ÛÀÚ·Î °£ÁÖÇÕ´Ï´Ù)
	*/
	String.prototype.bytes = function() {
			var str = this;
			var l = 0;
			for (var i=0; i<str.length; i++) l += (str.charCodeAt(i) > 128) ? 2 : 1;
			return l;
	}


/*	e-mailÃßÃâ¹æÁö - 2005.11.01Ãß°¡	*/
function mask(end,middle,start,subject){
	var one ='mai';
	var two='lto:';
	var three='?Subject=';
	//start,middle,end,subject;
	var putogether= one+two+start+middle+end+three+subject;
	document.location.href=eval('"'+putogether+'"');
	window.status=putogether;
}




/*
*	HtmlÀß¶ó¼­ È­¸é¿¡ »Ñ¸±¶§ ¹®ÀÚ¼ö Á¶Á¤ÇÏ¿© ÀÚ¸£±â - 060121 Ãß°¡
*	¿¹)  <td><script>document.write(js_stripHTMLtag('<%=PKC_PageUtil.convertForStripHTMLtag(list.entpDetailRec.main_prod_name)%>',58))</script></td>
*/
//	HtmlÀÚ¸£±â
function js_stripHTMLtag(str, len) {
	str = stripHTMLtag(str);
//	alert("±ÛÀÚ¼ö:"+string.bytes());
	if(str.bytes()>len){
		str = str.substring(0, len)+"...";
	}
	return str;
}

function stripHTMLtag(string) {
   var objStrip = new RegExp();
   objStrip = /[<][^>]*[>]/gi;
   return string.replace(objStrip, "");
}


/*
*	¹®ÀÚ¼ö ÀÚ¸£±â - 060121 Ãß°¡ - ¾ÈµÊ....
*	¿¹)  <td><script>document.write(js_stripWord('<%=list.rec.name%>',20))</script></td>

function js_stripWord(str, len) {
//	alert("±ÛÀÚ¼ö:"+string.bytes());
	if(str.bytes()>len){
		str = str.substring(0, len)+"...";
	}
	return str;
}
*/




/*
 *	[¼öÁ¤»çÇ× history]
 *	V 3.0.0		2003.07.08 14:12	[AUP] ±¤Á¤º¸Áö¿ø¼¾ÅÍ °³¹ßÀÌ 3Â÷³âµµ·Î ÀüÃ¼ ¹öÁ¯ ¾÷
 *	V 3.1.1		2003.07.18 13:32	[ÀÛ¼º] ½Å±Ô ÀÛ¼º
 *	V 5.1.0		2005.07.26 17:30	[Ãß°¡] js_ChkWord(obj_filed, len) ±ÛÀÚ¼ö Ã¼Å©ÇÏ´Â ÇÔ¼ö Ãß°¡
 *	V 5.2.0		2006.01.21 00:50	[Ãß°¡] js_stripHTMLtag(str, len) HtmlÀß¶ó¼­ È­¸é¿¡ »Ñ¸±¶§ ¹®ÀÚ¼ö Á¶Á¤ÇÏ¿© ÀÚ¸£±â ±â´ÉÃß°¡
 */
// -->