function checkSpace( str )
{
     if(str.search(/\s/) != -1){
     	return 1;
     }

     else {
         return "";
     }
}

function validID( str )
{
     /* check whether input value is included space or not  */
     if( str == ""){
     	alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
     	return 0;
     }
     
     var retVal = checkSpace( str ); 
             
     if( retVal != "" ) {
         alert("¾ÆÀÌµð´Â °ø¹éÀ» Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù.");
         return 0; 
     } 
     if( str.charAt(0) == '_') {
	 alert("¾ÆÀÌµð´Â  '_' ·Î ½ÃÀÛÇÒ ¼ö ¾ø½À´Ï´Ù. ");
	 return 0;
     }

     /* checkFormat  */
     var isID = /^[a-z0-9_]{6,12}$/;
     if( !isID.test(str) ) {
         alert("¾ÆÀÌµð´Â ¾ËÆÄºª ¼Ò¹®ÀÚ¿Í ¼ýÀÚ, _ ¸¸ Çã¿ëÇÏ¸ç 6 ~ 12ÀÚ ³»¿¡¼­ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À."); 
         return 0; 
     }
     return 1;
}

function validPWD( str )
{
     var cnt=0;
     if( str == ""){
     	alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À. ");
     	return 0;
     }     

    /* check whether input value is included space or not  */
     var retVal = checkSpace( str );
     if( retVal != "") {
         alert("ºñ¹Ð¹øÈ£´Â °ø¹éÀ» Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù. ");
         return 0;
     }
     for( var i=0; i < str.length; ++i)
     {
         if( str.charAt(0) == str.substring( i, i+1 ) ) ++cnt;
     }  
     if( cnt == str.length ) {
         alert("º¸¾È»óÀÇ ÀÌÀ¯·Î, Áßº¹µÈ ¼ýÀÚ´Â ºñ¹Ð¹øÈ£·Î »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù. ");
         return 0; 
     }

     /* limitLength */

     //var isPW = /^[a-z0-9_~`!@\\#\$%\^&\*()-\+=\|\[\]\{\};:'"<,>.?/]{6,12}$/;
     var isPW = /^[a-z0-9]{6,12}$/;
     if( !isPW.test(str) ) {
         alert("ºñ¹Ð¹øÈ£´Â ¾ËÆÄºª ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ Çã¿ëÇÏ¸ç 6 ~ 12ÀÚ ³»¿¡¼­ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À."); 
         return 0; 
     }
     return 1;
}

function validEMAIL( str )
{
     /* check whether input value is included space or not  */
     if(str == ""){
     	alert("ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À. ");
     	return 0;
     }
     var retVal = checkSpace( str );
     if( retVal != "") {
         alert("ÀÌ¸ÞÀÏÁÖ¼Ò¿¡´Â °ø¹éÀÌ µé¾î°¥ ¼ö ¾ø½À´Ï´Ù. ");
         return 0;
     }
          
     /* checkFormat */
     var isEmail = /[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+(\.[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+)*@[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+(\.[-!#$%&'*+\/^_~{}|0-9a-zA-Z]+)*/;
     if( !isEmail.test(str) ) {
         alert("ÀÌ¸ÞÀÏÁÖ¼Ò°¡ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù. ");
         return 0;
     }
     if( str.length > 60 ) {
         alert("ÀÌ¸ÞÀÏÁÖ¼Ò´Â 60ÀÚ¸¦ ³ÑÀ» ¼ö ¾ø½À´Ï´Ù. ");
         return 0;
     }

     return 1;
}
         
function validENAME_F( str )
{
              /* check format */  
     var isENAME = /^\w/gi;

     if( !isENAME.test( str ) )
     {
         alert("Please enter your name using the Latin(Western) Alphabet. "); 
         document.form.Member_FNM.select();
         return 0;
     }
     return 1; 
              
}

function validENAME_L( str )
{
              /* check format */  
     var isENAME = /^\w/gi;

     if( !isENAME.test( str ) )
     {
         alert("Please enter your name using the Latin(Western) Alphabet. "); 
         document.form.Member_LNM.select();
         return 0;
     }
     return 1; 
              
}

function isEmpty()
{
     var thisFrm = document.form;
     var retVal;


     if( thisFrm.USER_ID.value == "" ) {
         alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
         thisFrm.USER_ID.focus();
         return 0;
     }
     else {
     	 retVal = validID(thisFrm.USER_ID.value);
         if( !retVal ) {
             thisFrm.USER_ID.select(); 
             thisFrm.USER_ID.focus(); 
             return 0;
         } 
         if( thisFrm.UniqueChk.value == "0" ) {
             alert("ID Áßº¹È®ÀÎÀ» ÇØÁÖ½Ê½Ã¿À. ");
             return 0;
         } 
     }
	 
     if( thisFrm.USER_PW.value == "" ) {
         alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
         thisFrm.USER_PW.focus();
         return 0;
     }
     else {
         retVal = validPWD(thisFrm.USER_PW.value);
         if( !retVal ) {
             thisFrm.USER_PW.select();
             thisFrm.USER_PW.focus();
             return 0;
         }
     } 
     if( thisFrm.USER_PW2.value == "" ) {
         alert("ºñ¹Ð¹øÈ£ È®ÀÎÀ» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À. ");
         thisFrm.USER_PW2.focus();
         return 0;
     }
     else {
         retVal = validPWD(thisFrm.USER_PW2.value);
         if( !retVal ) return 0;
     } 
     if( thisFrm.USER_PW.value != thisFrm.USER_PW2.value ) {
         alert("ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù. ");
         thisFrm.USER_PW.select();
         return 0;
     }
     if( thisFrm.USER_ID.value == thisFrm.USER_PW.value ) {
         alert("¾ÆÀÌµð¿Í ºñ¹Ð¹øÈ£°¡ µ¿ÀÏÇÕ´Ï´Ù. º¸¾È»óÀÇ ÀÌÀ¯·Î ¾ÆÀÌµð¿Í ºñ¹Ð¹øÈ£´Â µ¿ÀÏÇÒ ¼ö ¾ø½À´Ï´Ù. ");
         thisFrm.USER_PW.select();
         thisFrm.USER_PW.focus();
         return 0; 
     }
     if( thisFrm.USER_EMIAL.value == "" ) {
         alert("ÀÌ¸ÞÀÏÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À. ");
         thisFrm.USER_EMIAL.focus();
         return 0;
     }
     else {
         retVal = validEMAIL( thisFrm.USER_EMIAL.value );
         if( !retVal ) {
             thisFrm.USER_EMIAL.select();
             thisFrm.USER_EMIAL.focus();
             return 0;
         }
     }
     if( thisFrm.USER_POST_NO1.value == "" ) {
         alert("ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À");
         thisFrm.USER_POST_NO1.focus();
         return 0;
     }
     if( thisFrm.USER_POST_NO2.value == "" ) {
         alert("ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À");
         thisFrm.USER_POST_NO2.focus();
         return 0;
     }
     if( thisFrm.USER_ADDR.value == "" ) {
         alert("ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À");
         thisFrm.USER_ADDR.focus();
         return 0;
     }
     if( thisFrm.USER_DETL_ADDR.value == "" ) {
         alert("ÁÖ¼Ò¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À");
         thisFrm.USER_DETL_ADDR.focus();
         return 0;
     }
     if(thisFrm.USER_DIVIDE.value != "3"){
	     if( thisFrm.USER_MOBILE1.value == "" ) {
	         alert("ÈÞ´ëÆù ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À");
	         thisFrm.USER_MOBILE1.focus();
	         return 0;
	     }
	     if( thisFrm.USER_MOBILE2.value == "" ) {
	         alert("ÈÞ´ëÆù ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À");
	         thisFrm.USER_MOBILE2.focus();
	         return 0;
	     }
	     if( thisFrm.USER_MOBILE3.value == "" ) {
	         alert("ÈÞ´ëÆù ¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À");
	         thisFrm.USER_MOBILE3.focus();
	         return 0;
	     }
	  }

     return 1; 
}

function isChkIdEmpty()
{
     var thisFrm = document.form;
     var retVal;
     var UserDivide = "";
     var msg = "";
     var msg2 = "";
     
     for(i = 0; i < thisFrm.ID_USER_DIVIDE.length; i++){
     	if(thisFrm.ID_USER_DIVIDE[i].checked){
     		UserDivide = thisFrm.ID_USER_DIVIDE[i].value;
     	}
    }
     	
     switch(UserDivide){
     	case "1":
     		msg = "ÀÌ¸§";
     		msg2 = "ÁÖ¹Î¹øÈ£";
     		thisFrm.USER_RES_NO.value = thisFrm.ID_USER_RES_NO1[0].value + "-" + thisFrm.ID_USER_RES_NO2[0].value;
     		break;
     	case "2":
     		msg = "ÀÌ¸§";
      		msg2 = "¿Ü±¹ÀÎµî·Ï¹øÈ£";
     		thisFrm.USER_RES_NO.value = thisFrm.ID_USER_RES_NO1[1].value + "-" + thisFrm.ID_USER_RES_NO2[1].value;
    		break;
     	case "3":
     		msg = "»óÈ£¸í";
     		msg2 = "»ç¾÷ÀÚµî·Ï¹øÈ£";
     		thisFrm.USER_RES_NO.value = thisFrm.ID_USER_RES_NO1[2].value + "-" + thisFrm.ID_USER_RES_NO2[2].value + "-" + thisFrm.ID_USER_RES_NO3.value;
     		break;
     	}
	
     if( thisFrm.ID_USER_NAME.value == "" ) {
         alert(msg + "À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
         thisFrm.ID_USER_NAME.focus();
         return 0;
     }
     if( thisFrm.ID_USER_RES_NO1.value == "" ) {
         alert(msg2 + "À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
         thisFrm.ID_USER_RES_NO1.focus();
         return 0;
     }
     if( thisFrm.ID_USER_RES_NO2.value == "" ) {
         alert(msg2 + "À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
         thisFrm.ID_USER_RES_NO2.focus();
         return 0;
     }
     if( thisFrm.ID_USER_DIVIDE.value == "3" ) {
	     if( thisFrm.ID_USER_RES_NO3.value == "" ) {
         		alert(msg2 + "À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
	         thisFrm.ID_USER_RES_NO3.focus();
	         return 0;
	     }
	  }
	  
     	thisFrm.USER_DIVIDE.value = UserDivide;
    	
     return 1; 
}

function isChkPwdEmpty()
{
     var thisFrm = document.form;
     var retVal;
     var UserDivide = "";
     var msg = "";
     var msg2 = "";
     
     if( thisFrm.PW_USER_ID.value == "" ) {
         alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
         thisFrm.PW_USER_ID.focus();
         return 0;
     }
     else {
     	 retVal = validID(thisFrm.PW_USER_ID.value);
         if( !retVal ) {
             thisFrm.PW_USER_ID.select(); 
             thisFrm.PW_USER_ID.focus(); 
             return 0;
         } 
     }
     
     for(i = 0; i < thisFrm.PW_USER_DIVIDE.length; i++){
     	if(thisFrm.PW_USER_DIVIDE[i].checked){
     		UserDivide = thisFrm.PW_USER_DIVIDE[i].value;
     	}
    }
     	
     switch(UserDivide){
     	case "1":
     		msg = "ÀÌ¸§";
     		msg2 = "ÁÖ¹Î¹øÈ£";
     		thisFrm.USER_RES_NO.value = thisFrm.PW_USER_RES_NO1[0].value + "-" + thisFrm.PW_USER_RES_NO2[0].value;
     		break;
     	case "2":
     		msg = "ÀÌ¸§";
      		msg2 = "¿Ü±¹ÀÎµî·Ï¹øÈ£";
     		thisFrm.USER_RES_NO.value = thisFrm.PW_USER_RES_NO1[1].value + "-" + thisFrm.PW_USER_RES_NO2[1].value;
    		break;
     	case "3":
     		msg = "»óÈ£¸í";
     		msg2 = "»ç¾÷ÀÚµî·Ï¹øÈ£";
     		thisFrm.USER_RES_NO.value = thisFrm.PW_USER_RES_NO1[2].value + "-" + thisFrm.PW_USER_RES_NO2[2].value + "-" + thisFrm.PW_USER_RES_NO3.value;
     		break;
     	}
	
     if( thisFrm.PW_USER_NAME.value == "" ) {
         alert(msg + "À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
         thisFrm.PW_USER_NAME.focus();
         return 0;
     }
     if( thisFrm.PW_USER_RES_NO1.value == "" ) {
         alert(msg2 + "À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
         thisFrm.PW_USER_RES_NO1.focus();
         return 0;
     }
     if( thisFrm.PW_USER_RES_NO2.value == "" ) {
         alert(msg2 + "À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
         thisFrm.PW_USER_RES_NO2.focus();
         return 0;
     }
     if( thisFrm.PW_USER_DIVIDE.value == "3" ) {
	     if( thisFrm.PW_USER_RES_NO3.value == "" ) {
         		alert(msg2 + "À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
	         thisFrm.PW_USER_RES_NO3.focus();
	         return 0;
	     }
	  }
	 
     	thisFrm.USER_DIVIDE.value = UserDivide;

     return 1; 
}

function memRegist()
{
     var thisFrm = document.form;
     var UserDivide = thisFrm.UserDivide.value;
     var actionUrl = "";
     
     switch(UserDivide){
     	case "1":
     		actionUrl = "mem_register.jsp";
     		break;
     	case "2":
     		actionUrl = "mem_foreigner_register.jsp";
    		break;
     	case "3":
     		actionUrl = "mem_company_register.jsp";
     		break;
     	}

		thisFrm.action = actionUrl;
		thisFrm.target = "_self";
		thisFrm.submit();
}	

function DuplChk(){
	var form = document.form;
	if(form.USER_ID.value.length >= 6){
		window.open('DuplChk.jsp?USER_ID='+form.USER_ID.value,'DuplChk','resizable=no width=390 height=230');
	}else{
		alert("¾ÆÀÌµð´Â 6~12ÀÚ ³»¿Ü¿¡¼­ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À");
		form.USER_ID.focus();
		return;
	}
}

function fnPopZip(obj1,obj2,obj3,obj4){
    var width   = 450;
    var height  = 300;
    var left  = (screen.width/2) - (width/2);
    var top   = (screen.height/2) - (height/2);
    var zip1 = "opener.document.form."+obj1+".value";
    var zip2 = "opener.document.form."+obj2+".value";
    var addr1 = "opener.document.form."+obj3+".value";
    var addr2 = "opener.document.form."+obj4+".focus()";

    var features = "resizable=no, scrollbars=no, status=no, top="+top+", left="+left+",width="+width+",height="+height;
    var winName  = "fnSearchPost";

    window.open('', winName, features).focus();

   	form.action = "/common/modules/ComSearchZipCode.jsp?zip1="+zip1+"&zip2="+zip2+"&addr1="+addr1+"&addr2="+addr2;
   	form.target = winName;
   	form.submit();
}

function isChkRegistEmpty()
{
     var thisFrm = document.form;
     var retVal;
     var UserDivide = thisFrm.UserDivide.value;
     var msg = "";
     var msg2 = "";
     
     switch(UserDivide){
     	case "1":
     		msg = "ÀÌ¸§";
     		msg2 = "ÁÖ¹Î¹øÈ£";
     		break;
     	case "2":
     		msg = "ÀÌ¸§";
      		msg2 = "¿Ü±¹ÀÎµî·Ï¹øÈ£";
    		break;
     	case "3":
     		msg = "»óÈ£¸í";
     		msg2 = "»ç¾÷ÀÚµî·Ï¹øÈ£";
     		break;
     	}
		
     if( thisFrm.UserName.value == "" ) {
         alert(msg + "À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
         thisFrm.UserName.focus();
         return 0;
     }
	 
     if( thisFrm.ResNo1.value == "" ) {
         alert(msg2 + "À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
         thisFrm.ResNo1.focus();
         return 0;
     }
	 
     if( thisFrm.ResNo2.value == "" ) {
         alert(msg2 + "À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
         thisFrm.ResNo2.focus();
         return 0;
     }
	 
     if( UserDivide == "3" ) {
	     if( thisFrm.ResNo3.value == "" ) {
	         alert(msg2 + "À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
	         thisFrm.ResNo3.focus();
	         return 0;
	     }
     }
	 
     return 1; 
}

function join()  
{
     var theFrm = document.form;
     
     retVal = isEmpty();
     
     theFrm.USER_POST_NO.value = theFrm.USER_POST_NO1.value + "-" + theFrm.USER_POST_NO2.value;
     theFrm.USER_TEL.value = theFrm.USER_TEL1.value + "-" + theFrm.USER_TEL2.value + "-" + theFrm.USER_TEL3.value;
     
     if(theFrm.USER_DIVIDE.value != "3"){
     	theFrm.USER_MOBILE.value = theFrm.USER_MOBILE1.value + "-" + theFrm.USER_MOBILE2.value + "-" + theFrm.USER_MOBILE3.value;
     	if(theFrm.USER_JOB_NO[0].checked){
     		for(i = 0; i < theFrm.CHK_USER_JOB_CODE1[0].length; i++){
     			if(theFrm.CHK_USER_JOB_CODE1[0].options[i].selected){
     				theFrm.USER_JOB_CODE1.value = theFrm.CHK_USER_JOB_CODE1[0].options[i].value;
     			}
     		}
     		for(i = 0; i < theFrm.CHK_USER_JOB_CODE2.length; i++){
     			if(theFrm.CHK_USER_JOB_CODE2.options[i].selected){
     				theFrm.USER_JOB_CODE2.value = theFrm.CHK_USER_JOB_CODE2.options[i].value;
     			}
     		}
     	}else{
     		for(i = 0; i < theFrm.CHK_USER_JOB_CODE1[1].length; i++){
     			if(theFrm.CHK_USER_JOB_CODE1[1].options[i].selected){
     				theFrm.USER_JOB_CODE1.value = theFrm.CHK_USER_JOB_CODE1[1].options[i].value;
     			}
     		}
     		theFrm.USER_JOB_CODE2.value = "";
     	}
     		
    }
     if(theFrm.USER_DIVIDE.value == "1"){
     	theFrm.COM_POST_NO.value = theFrm.COM_POST_NO1.value + "-" + theFrm.COM_POST_NO2.value;
     	theFrm.COM_TEL.value = theFrm.COM_TEL1.value + "-" + theFrm.COM_TEL2.value + "-" + theFrm.COM_TEL3.value;
    }
     if(theFrm.USER_DIVIDE.value == "3"){
     	theFrm.USER_FAX.value = theFrm.USER_FAX1.value + "-" + theFrm.USER_FAX2.value + "-" + theFrm.USER_FAX3.value;
     	theFrm.COM_PERSON_TEL.value = theFrm.COM_PERSON_TEL1.value + "-" + theFrm.COM_PERSON_TEL2.value + "-" + theFrm.COM_PERSON_TEL3.value;
     	theFrm.COM_PERSON_MOBILE.value = theFrm.COM_PERSON_MOBILE1.value + "-" + theFrm.COM_PERSON_MOBILE2.value + "-" + theFrm.COM_PERSON_MOBILE3.value;
    }
     
     if(theFrm.CHK_SMS_KOFIC.checked){
     	theFrm.SMS_KOFIC.value = "Y";
    }else{
    	theFrm.SMS_KOFIC.value = "N";
    }
     if(theFrm.CHK_MAIL_KOFIC.checked){
     	theFrm.MAIL_KOFIC.value = "Y";
    }else{
    	theFrm.MAIL_KOFIC.value = "N";
    }
     if(theFrm.CHK_SMS_MEDIA.checked){
     	theFrm.SMS_MEDIA.value = "Y";
    }else{
    	theFrm.SMS_MEDIA.value = "N";
    }
     if(theFrm.CHK_MAIL_MEDIA.checked){
     	theFrm.MAIL_MEDIA.value = "Y";
    }else{
    	theFrm.MAIL_MEDIA.value = "N";
    }
     if(theFrm.CHK_SMS_NSC.checked){
     	theFrm.SMS_NSC.value = "Y";
    }else{
    	theFrm.SMS_NSC.value = "N";
    }
     if(theFrm.CHK_MAIL_NSC.checked){
     	theFrm.MAIL_NSC.value = "Y";
    }else{
    	theFrm.MAIL_NSC.value = "N";
    }
     if(theFrm.CHK_SMS_ACADEMY.checked){
     	theFrm.SMS_ACADEMY.value = "Y";
    }else{
    	theFrm.SMS_ACADEMY.value = "N";
    }
     if(theFrm.CHK_MAIL_ACADEMY.checked){
     	theFrm.MAIL_ACADEMY.value = "Y";
    }else{
    	theFrm.MAIL_ACADEMY.value = "N";
    }
     if(theFrm.CHK_ACADEMY_PUB.checked){
     	theFrm.ACADEMY_PUB.value = "Y";
    }else{
    	theFrm.ACADEMY_PUB.value = "N";
    }
     if(theFrm.CHK_ACADEMY_ADM.checked){
     	theFrm.ACADEMY_ADM.value = "Y";
    }else{
    	theFrm.ACADEMY_ADM.value = "N";
    }
     if(theFrm.CHK_SMS_PEOPLE.checked){
     	theFrm.SMS_PEOPLE.value = "Y";
    }else{
    	theFrm.SMS_PEOPLE.value = "N";
    }
     if(theFrm.CHK_MAIL_PEOPLE.checked){
     	theFrm.MAIL_PEOPLE.value = "Y";
    }else{
    	theFrm.MAIL_PEOPLE.value = "N";
    }
     if(theFrm.CHK_SMS_DCINEMA.checked){
     	theFrm.SMS_DCINEMA.value = "Y";
    }else{
    	theFrm.SMS_DCINEMA.value = "N";
    }
     if(theFrm.CHK_MAIL_DCINEMA.checked){
     	theFrm.MAIL_DCINEMA.value = "Y";
    }else{
    	theFrm.MAIL_DCINEMA.value = "N";
    }

     if( retVal ) {
     	  theFrm.action = "/KOFIC/Channel/";
     	  theFrm.target = "_self";
        theFrm.submit();
        return;
     }           
     return;
}

function modify() {
     var theFrm = document.form;
     if(confirm("È¸¿øÁ¤º¸¸¦ ¼öÁ¤ÇÏ½Ã°Ú½À´Ï±î?")){
	     retVal = isEmpty();
	     
	     theFrm.USER_POST_NO.value = theFrm.USER_POST_NO1.value + "-" + theFrm.USER_POST_NO2.value;
	     theFrm.USER_TEL.value = theFrm.USER_TEL1.value + "-" + theFrm.USER_TEL2.value + "-" + theFrm.USER_TEL3.value;
	     
	     if(theFrm.USER_DIVIDE.value != "3"){
	     	theFrm.USER_MOBILE.value = theFrm.USER_MOBILE1.value + "-" + theFrm.USER_MOBILE2.value + "-" + theFrm.USER_MOBILE3.value;
	     	if(theFrm.USER_JOB_NO[0].checked){
	     		for(i = 0; i < theFrm.CHK_USER_JOB_CODE1[0].length; i++){
	     			if(theFrm.CHK_USER_JOB_CODE1[0].options[i].selected){
	     				theFrm.USER_JOB_CODE1.value = theFrm.CHK_USER_JOB_CODE1[0].options[i].value;
	     			}
	     		}
	     		for(i = 0; i < theFrm.CHK_USER_JOB_CODE2.length; i++){
	     			if(theFrm.CHK_USER_JOB_CODE2.options[i].selected){
	     				theFrm.USER_JOB_CODE2.value = theFrm.CHK_USER_JOB_CODE2.options[i].value;
	     			}
	     		}
	     	}else{
	     		for(i = 0; i < theFrm.CHK_USER_JOB_CODE1[1].length; i++){
	     			if(theFrm.CHK_USER_JOB_CODE1[1].options[i].selected){
	     				theFrm.USER_JOB_CODE1.value = theFrm.CHK_USER_JOB_CODE1[1].options[i].value;
	     			}
	     		}
	     		theFrm.USER_JOB_CODE2.value = "";
	     	}
	     		
	    }
	     if(theFrm.USER_DIVIDE.value == "1"){
	     	theFrm.COM_POST_NO.value = theFrm.COM_POST_NO1.value + "-" + theFrm.COM_POST_NO2.value;
	     	theFrm.COM_TEL.value = theFrm.COM_TEL1.value + "-" + theFrm.COM_TEL2.value + "-" + theFrm.COM_TEL3.value;
	    }
	     if(theFrm.USER_DIVIDE.value == "3"){
	     	theFrm.USER_FAX.value = theFrm.USER_FAX1.value + "-" + theFrm.USER_FAX2.value + "-" + theFrm.USER_FAX3.value;
	     	theFrm.COM_PERSON_TEL.value = theFrm.COM_PERSON_TEL1.value + "-" + theFrm.COM_PERSON_TEL2.value + "-" + theFrm.COM_PERSON_TEL3.value;
	     	theFrm.COM_PERSON_MOBILE.value = theFrm.COM_PERSON_MOBILE1.value + "-" + theFrm.COM_PERSON_MOBILE2.value + "-" + theFrm.COM_PERSON_MOBILE3.value;
	    }
	     
	     if(theFrm.CHK_SMS_KOFIC.checked){
	     	theFrm.SMS_KOFIC.value = "Y";
	    }else{
	    	theFrm.SMS_KOFIC.value = "N";
	    }
	     if(theFrm.CHK_MAIL_KOFIC.checked){
	     	theFrm.MAIL_KOFIC.value = "Y";
	    }else{
	    	theFrm.MAIL_KOFIC.value = "N";
	    }
	     if(theFrm.CHK_SMS_MEDIA.checked){
	     	theFrm.SMS_MEDIA.value = "Y";
	    }else{
	    	theFrm.SMS_MEDIA.value = "N";
	    }
	     if(theFrm.CHK_MAIL_MEDIA.checked){
	     	theFrm.MAIL_MEDIA.value = "Y";
	    }else{
	    	theFrm.MAIL_MEDIA.value = "N";
	    }
	     if(theFrm.CHK_SMS_NSC.checked){
	     	theFrm.SMS_NSC.value = "Y";
	    }else{
	    	theFrm.SMS_NSC.value = "N";
	    }
	     if(theFrm.CHK_MAIL_NSC.checked){
	     	theFrm.MAIL_NSC.value = "Y";
	    }else{
	    	theFrm.MAIL_NSC.value = "N";
	    }
	     if(theFrm.CHK_SMS_ACADEMY.checked){
	     	theFrm.SMS_ACADEMY.value = "Y";
	    }else{
	    	theFrm.SMS_ACADEMY.value = "N";
	    }
	     if(theFrm.CHK_MAIL_ACADEMY.checked){
	     	theFrm.MAIL_ACADEMY.value = "Y";
	    }else{
	    	theFrm.MAIL_ACADEMY.value = "N";
	    }
	     if(theFrm.CHK_ACADEMY_PUB.checked){
	     	theFrm.ACADEMY_PUB.value = "Y";
	    }else{
	    	theFrm.ACADEMY_PUB.value = "N";
	    }
	     if(theFrm.CHK_ACADEMY_ADM.checked){
	     	theFrm.ACADEMY_ADM.value = "Y";
	    }else{
	    	theFrm.ACADEMY_ADM.value = "N";
	    }
	     if(theFrm.CHK_SMS_PEOPLE.checked){
	     	theFrm.SMS_PEOPLE.value = "Y";
	    }else{
	    	theFrm.SMS_PEOPLE.value = "N";
	    }
	     if(theFrm.CHK_MAIL_PEOPLE.checked){
	     	theFrm.MAIL_PEOPLE.value = "Y";
	    }else{
	    	theFrm.MAIL_PEOPLE.value = "N";
	    }
	     if(theFrm.CHK_SMS_DCINEMA.checked){
	     	theFrm.SMS_DCINEMA.value = "Y";
	    }else{
	    	theFrm.SMS_DCINEMA.value = "N";
	    }
	     if(theFrm.CHK_MAIL_DCINEMA.checked){
	     	theFrm.MAIL_DCINEMA.value = "Y";
	    }else{
	    	theFrm.MAIL_DCINEMA.value = "N";
	    }
	
	     if( retVal ) {
	     	  theFrm.action = "/KOFIC/Channel/";
	     	  theFrm.target = "_self";
	        theFrm.submit();
	        return;
	     }           
	     return;
	}
}	

function ChkId()  
{
     var theFrm = document.form;
     
     retVal = isChkIdEmpty();
     
     if( retVal ) {
     	
		theFrm.action = "/i_memberi/ChkId.jsp";
		theFrm.target = "_self";
		theFrm.submit();
        
        return;
     }           
     return;
}

function ChkPwd()  
{
     var theFrm = document.form;
     
     retVal = isChkPwdEmpty();
     
     if( retVal ) {

		theFrm.action = "/i_memberi/ChkPw.jsp";
		theFrm.target = "_self";
		theFrm.submit();
        
        return;
     }           
     return;
}

function chkRegist()
{
	var form = document.form;
	
	retVal = isChkRegistEmpty();

     if( retVal ) {
		form.action = "chkRegist.jsp";
		form.target = "memFrm";
		form.submit();
		return;
     }           

     return;
}

function chkRegist2()
{
	var form = document.form;
	
	retVal = isChkRegistEmpty();

     if( retVal ) {
     	
     	//isNotValidBID(form.ResNo1,form.ResNo2,form.ResNo3);
     	
		form.action = "chkRegist.jsp";
		form.target = "memFrm";
		form.submit();
		return;
     }           

     return;
}

function secede(){
	var form = document.form;
	
	if(form.compareId.value != form.USER_ID.value){
		alert("ID°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.");
		form.USER_ID.focus();
		return;
	}
	if(form.comparePw.value != form.USER_PW.value){
		alert("ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.");
		form.USER_PW.focus();
		return;
	}
	if(confirm("¿µÈ­ÁøÈïÀ§¿øÈ¸ È¸¿ø°¡ÀÔÀ» ÇØÁö ÇÏ½Ã°Ú½À´Ï±î?")){
		form.action = "/KOFIC/Channel";
		form.submit();
	}
}
