function listSubmit() { document.MEMBER.menu_mode.value='list'; document.MEMBER.menu_mode_sub.value=''; document.MEMBER.submit(); } function viewSubmit(mb_id) { document.MEMBER.menu_mode.value='view'; document.MEMBER.menu_mode_sub.value=''; document.MEMBER.mb_id.value=mb_id; document.MEMBER.submit(); } function modifySubmit() { document.MEMBER.menu_mode.value='modify'; document.MEMBER.menu_mode_sub.value=''; document.MEMBER.submit(); } function searchEnterSubmit() { if (event.keyCode=='13') { searchSubmit(); } } function searchSubmit() { document.MEMBER.menu_mode.value='list'; document.MEMBER.menu_mode_sub.value=''; document.MEMBER.page_count.value=0; document.MEMBER.submit(); } function sortSubmit(intraSort) { document.MEMBER.menu_mode.value='list'; document.MEMBER.menu_mode_sub.value=''; if (document.MEMBER.intra_sort.value==intraSort) { if (document.MEMBER.intra_sort_mode.value=='asc') { document.MEMBER.intra_sort_mode.value='desc'; } else { document.MEMBER.intra_sort_mode.value='asc'; } } else { document.MEMBER.intra_sort.value=intraSort; document.MEMBER.intra_sort_mode.value='asc'; } document.MEMBER.page_count.value=0; document.MEMBER.submit(); } function pageSubmit(pageCount) { document.MEMBER.menu_mode.value='list'; document.MEMBER.menu_mode_sub.value=''; document.MEMBER.page_count.value=pageCount; document.MEMBER.submit(); } function insertSubmit() { var mb_text=/(^[a-zA-Z0-9\-*^#_]+$)/; if (document.MEMBER.mb_company_1.value=='') { alert('주소를 선택하여 주십시오'); document.MEMBER.mb_company_1.focus(); } else if (document.MEMBER.mb_name.value=='') { alert('업체를 선택하여 주십시오'); document.MEMBER.mb_name.focus(); } else if (document.MEMBER.mb_name.value=='') { alert('아이디를 입력하여 주십시오'); document.MEMBER.mb_id.focus(); } else if (document.MEMBER.mb_id.value.indexOf(' ')==0) { alert('아이디에 첫 글자가 공백은 안됩니다.'); document.MEMBER.mb_id.focus(); } else if ((document.MEMBER.mb_id.value.toString().length<4) || (document.MEMBER.mb_id.value.toString().length>13)) { alert('아이디는 4자이상~13자이하로 입력하여 주십시오.'); document.MEMBER.mb_id.focus(); } else if (!mb_text.test(document.MEMBER.mb_id.value)){ alert('아이디는 영어, 숫자, 일부특수문자만을 사용하실 수 있습니다.'); document.MEMBER.mb_id.focus(); return; } else if (document.MEMBER.mb_id_check.value!='ok') { alert('아이디 중복체크를 하셔야 합니다.'); document.MEMBER.mb_id.focus(); } else if (document.MEMBER.mb_passwd.value=='') { alert('비밀번호를 입력하여 주십시오.'); document.MEMBER.mb_passwd.focus(); } else if (document.MEMBER.mb_passwd.value.indexOf(' ')==0) { alert('비밀번호는 첫글자가 공백은 안됩니다.'); document.MEMBER.mb_passwd.value=''; document.MEMBER.mb_passwd.focus(); } else if ((document.MEMBER.mb_passwd.value.toString().length<4) || (document.MEMBER.mb_passwd.value.toString().length>12)) { alert('비밀번호는 4자이상~12자이하로 입력하여 주십시오.'); document.MEMBER.mb_passwd.value=''; document.MEMBER.mb_passwd.focus(); } else if (document.MEMBER.mb_passwd_re.value=='') { alert('비밀번호(확인)을 입력하여 주십시오'); document.MEMBER.mb_passwd_re.focus(); } else if ((document.MEMBER.mb_passwd_re.value.toString().length<4) || (document.MEMBER.mb_passwd_re.value.toString().length>12)) { alert('비밀번호(확인)을 4자이상~12자이하로 입력하여 주십시오.'); document.MEMBER.mb_passwd_re.value=''; document.MEMBER.mb_passwd_re.focus(); } else if (document.MEMBER.mb_passwd_re.value.indexOf(' ')==0) { alert('비밀번호(확인)을 첫글자가 공백은 안됩니다.'); document.MEMBER.mb_passwd.value=''; document.MEMBER.mb_passwd.focus(); } else if (document.MEMBER.mb_passwd.value != document.MEMBER.mb_passwd_re.value) { alert('비밀번호와 비밀번호확인이 맞지 않습니다.'); document.MEMBER.mb_passwd.value='' ; document.MEMBER.mb_passwd_re.value='' ; document.MEMBER.mb_passwd.focus(); } else if (!mb_text.test(document.MEMBER.mb_passwd.value)){ alert('비밀번호는 영어, 숫자, 일부특수문자만을 사용하실 수 있습니다.'); document.MEMBER.mb_passwd.focus(); return; } else if (document.MEMBER.mb_passwd.value==document.MEMBER.mb_id.value) { alert('아이디와 비밀번호는 일치할 수 없습니다.') ; document.MEMBER.mb_passwd.value='' ; document.MEMBER.mb_passwd_re.value='' ; document.MEMBER.mb_passwd.focus() ; } else if (document.MEMBER.mb_ceo.value=='') { alert('대표자를 입력하여 주십시오'); document.MEMBER.mb_ceo.focus(); } else if (document.MEMBER.mb_name.value.indexOf(' ')==0) { alert('대표자에 첫 글자가 공백은 안됩니다.'); document.MEMBER.mb_name.focus(); //} else if (!checkSocialno()) { // 주민등록번호 확인 // return; } else if (document.MEMBER.mb_zipcode_0.value=='') { alert('우편번호를 입력하여 주십시오.'); document.MEMBER.mb_zipcode_0.focus(); } else if (document.MEMBER.mb_zipcode_1.value=='') { alert('우편번호를 입력하여 주십시오.'); document.MEMBER.mb_zipcode_1.focus(); } else if ((isNumber(document.MEMBER.mb_zipcode_0.value)==false || isNumber(document.MEMBER.mb_zipcode_1.value)==false)) { alert ('우편번호는 숫자만 입력하셔야 합니다.'); document.MEMBER.mb_zipcode_0.focus(); } else if (document.MEMBER.mb_address.value=='') { alert('주소를 입력하여 주십시오.'); document.MEMBER.mb_address.focus(); } else if (document.MEMBER.mb_address_sub.value=='') { alert('상세주소를 입력하여주십시오.'); document.MEMBER.mb_address_sub.focus(); } else if (document.MEMBER.mb_tel_0.value=='') { alert('전화번호를 입력하여 주십시오.'); document.MEMBER.mb_tel_0.focus(); } else if (document.MEMBER.mb_tel_0.value.length<2) { alert('전화번호가 올바르지 않습니다.'); document.MEMBER.mb_tel_0.focus(); } else if (document.MEMBER.mb_tel_1.value=='') { alert('전화번호를 입력하여 주십시오.'); document.MEMBER.mb_tel_1.focus(); } else if(document.MEMBER.mb_tel_1.value.length<3) { alert('전화번호가 올바르지 않습니다.'); document.MEMBER.mb_tel_1.focus(); } else if (document.MEMBER.mb_tel_2.value=='') { alert('전화번호를 입력하여 주십시오.'); document.MEMBER.mb_tel_2.focus(); } else if (document.MEMBER.mb_tel_2.value.length<4) { alert('전화번호가 올바르지 않습니다.'); document.MEMBER.mb_tel_2.focus(); /* } else if (document.MEMBER.mb_email.value=='') { alert('이메일주소를 입력하세요'); document.MEMBER.mb_email.focus(); } else if (document.MEMBER.mb_email.value.indexOf(' ')==0) { alert('메일주소에 첫 글자가 공백문자는 안됩니다.'); document.MEMBER.mb_email.focus(); } else if (document.MEMBER.mb_email.value.indexOf('@')=='-1') { alert('메일주소를 정확히 입력하세요'); document.MEMBER.mb_email.focus(); */ } else { document.MEMBER.menu_mode.value='confirm'; document.MEMBER.menu_mode_sub.value=''; document.MEMBER.submit(); } } function updateSubmit() { var mb_text=/(^[a-zA-Z0-9\-*^#_]+$)/; if (document.MEMBER.mb_passwd.value=='') { alert('비밀번호를 입력하여 주십시오.'); document.MEMBER.mb_passwd.focus(); } else if (document.MEMBER.mb_passwd.value.indexOf(' ')==0) { alert('비밀번호는 첫글자가 공백은 안됩니다.'); document.MEMBER.mb_passwd.value=''; document.MEMBER.mb_passwd.focus(); } else if ((document.MEMBER.mb_passwd.value.toString().length<4) || (document.MEMBER.mb_passwd.value.toString().length>12)) { alert('비밀번호는 4자이상~12자이하로 입력하여 주십시오.'); document.MEMBER.mb_passwd.value=''; document.MEMBER.mb_passwd.focus(); } else if (document.MEMBER.mb_passwd_re.value=='') { alert('비밀번호(확인)을 입력하여 주십시오'); document.MEMBER.mb_passwd_re.focus(); } else if ((document.MEMBER.mb_passwd_re.value.toString().length<4) || (document.MEMBER.mb_passwd_re.value.toString().length>12)) { alert('비밀번호(확인)을 4자이상~12자이하로 입력하여 주십시오.'); document.MEMBER.mb_passwd_re.value=''; document.MEMBER.mb_passwd_re.focus(); } else if (document.MEMBER.mb_passwd_re.value.indexOf(' ')==0) { alert('비밀번호(확인)을 첫글자가 공백은 안됩니다.'); document.MEMBER.mb_passwd.value=''; document.MEMBER.mb_passwd.focus(); } else if (document.MEMBER.mb_passwd.value != document.MEMBER.mb_passwd_re.value) { alert('비밀번호와 비밀번호확인이 맞지 않습니다.'); document.MEMBER.mb_passwd.value='' ; document.MEMBER.mb_passwd_re.value='' ; document.MEMBER.mb_passwd.focus(); } else if (!mb_text.test(document.MEMBER.mb_passwd.value)){ alert('비밀번호는 영어, 숫자, 일부특수문자만을 사용하실 수 있습니다.'); document.MEMBER.mb_passwd.focus(); return; } else if (document.MEMBER.mb_passwd.value==document.MEMBER.mb_id.value) { alert('아이디와 비밀번호는 일치할 수 없습니다.') ; document.MEMBER.mb_passwd.value='' ; document.MEMBER.mb_passwd_re.value='' ; document.MEMBER.mb_passwd.focus() ; } else if (document.MEMBER.mb_zipcode_0.value=='') { alert('우편번호를 입력하여 주십시오.'); document.MEMBER.mb_zipcode_0.focus(); } else if (document.MEMBER.mb_zipcode_1.value=='') { alert('우편번호를 입력하여 주십시오.'); document.MEMBER.mb_zipcode_1.focus(); } else if ((isNumber(document.MEMBER.mb_zipcode_0.value)==false || isNumber(document.MEMBER.mb_zipcode_1.value)==false)) { alert ('우편번호는 숫자만 입력 하셔야 합니다.'); document.MEMBER.mb_zipcode_0.focus(); } else if (document.MEMBER.mb_address.value=='') { alert('주소를 입력하여 주십시오.'); document.MEMBER.mb_address.focus(); } else if (document.MEMBER.mb_address_sub.value=='') { alert('상세주소를 입력하여주십시오.'); document.MEMBER.mb_address_sub.focus(); } else if (document.MEMBER.mb_tel_0.value=='') { alert('전화번호를 입력하여 주십시오.'); document.MEMBER.mb_tel_0.focus(); } else if (document.MEMBER.mb_tel_0.value.length<2) { alert('전화번호가 올바르지 않습니다.'); document.MEMBER.mb_tel_0.focus(); } else if (document.MEMBER.mb_tel_1.value=='') { alert('전화번호를 입력하여 주십시오.'); document.MEMBER.mb_tel_1.focus(); } else if(document.MEMBER.mb_tel_1.value.length<3) { alert('전화번호가 올바르지 않습니다.'); document.MEMBER.mb_tel_1.focus(); } else if (document.MEMBER.mb_tel_2.value=='') { alert('전화번호를 입력하여 주십시오.'); document.MEMBER.mb_tel_2.focus(); } else if (document.MEMBER.mb_tel_2.value.length<4) { alert('전화번호가 올바르지 않습니다.'); document.MEMBER.mb_tel_2.focus(); /* } else if (document.MEMBER.mb_email.value=='') { alert('메일주소를 입력하세요'); document.MEMBER.mb_email.focus(); } else if (document.MEMBER.mb_email.value.indexOf(' ')==0) { alert('메일주소에 첫 글자가 공백문자는 안됩니다.'); document.MEMBER.mb_email.focus(); } else if (document.MEMBER.mb_email.value.indexOf('@')=='-1') { alert('메일주소를 정확히 입력하세요'); document.MEMBER.mb_email.focus(); */ } else { document.MEMBER.menu_mode.value='update'; document.MEMBER.menu_mode_sub.value=''; document.MEMBER.submit(); } } function deleteSubSubmit() { if (!confirm('정말 탈퇴하시겠습니까?')) { return; } document.MEMBER.menu_mode.value='delete'; document.MEMBER.menu_mode_sub.value=''; document.MEMBER.submit(); } // 주민등록번호 확인 function checkSocialno() { var mbSocialno_0=document.MEMBER.mb_socialno_0.value; var mbSocialno_1=document.MEMBER.mb_socialno_1.value; var codeSum=0; var codeRet=0; // 666666-7777777는 모조건 허용 if (mbSocialno_0=='666666' && mbSocialno_1=='7777777') { return true; } else if (mbSocialno_0.length!=6) { alert ('주민등록번호 앞자리가 올바르지 않습니다.'); document.MEMBER.mb_socialno_check.value=''; document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_socialno_0.focus(); return false; } else if (mbSocialno_1.length!=7) { alert ('주민등록번호 뒷자리가 올바르지 않습니다.'); document.MEMBER.mb_socialno_check.value=''; document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_socialno_1.focus(); return false; } else if (!isNumber(mbSocialno_0)) { alert ('주민등록번호 앞자리를 숫자로 입력하여 주십시오.'); document.MEMBER.mb_socialno_check.value=''; document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_socialno_0.focus(); return false; } else if (!isNumber(mbSocialno_1)) { alert ('주민등록번호 앞자리를 숫자로 입력하여 주십시오.'); document.MEMBER.mb_socialno_check.value=''; document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_socialno_1.focus(); return false; } else { codeSum=(eval(mbSocialno_0.substring(0,1))*2) + (eval(mbSocialno_0.substring(1,2))*3) + (eval(mbSocialno_0.substring(2,3))*4) + (eval(mbSocialno_0.substring(3,4))*5) + (eval(mbSocialno_0.substring(4,5))*6) + (eval(mbSocialno_0.substring(5,6))*7) + (eval(mbSocialno_1.substring(0,1))*8) + (eval(mbSocialno_1.substring(1,2))*9) + (eval(mbSocialno_1.substring(2,3))*2) + (eval(mbSocialno_1.substring(3,4))*3) + (eval(mbSocialno_1.substring(4,5))*4) + (eval(mbSocialno_1.substring(5,6))*5); codeRet=11-(eval(codeSum%11)); if (codeRet>=10) { codeRet=codeRet-10; } if (codeRet>=10) { codeRet=codeRet-10; } if (eval( mbSocialno_1.substring(6,7))!=codeRet) { alert ('주민등록번호가 올바르지 않습니다.'); document.MEMBER.mb_socialno_check.value=''; document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_socialno_0.focus(); return false; } else { return true; } } } // 사업자등록번호 확인 function checkRegisterno() { var mbRegisterno_0=document.MEMBER.mb_registerno_0.value; var mbRegisterno_1=document.MEMBER.mb_registerno_1.value; var mbRegisterno_2=document.MEMBER.mb_registerno_2.value; var registerNo=mbRegisterno_0+mbRegisterno_1+mbRegisterno_2; var codeSum=0; var getlist =new Array(10); var chkvalue =new Array("1","3","7","1","3","7","1","3","5"); if (mbRegisterno_0=='333' && mbRegisterno_1=='22' && mbRegisterno_2=='55555') { return true; } else if (mbRegisterno_0.length!=3) { alert ('사업자등록번호가 올바르지 않습니다.'); document.MEMBER.mb_socialno_check.value=''; document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_registerno_0.focus(); return false; } else if (mbRegisterno_1.length!=2) { alert ('사업자등록번호가 올바르지 않습니다.'); document.MEMBER.mb_socialno_check.value=''; document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_registerno_1.focus(); return false; } else if (mbRegisterno_2.length!=5) { alert ('사업자등록번호가 올바르지 않습니다.'); document.MEMBER.mb_socialno_check.value=''; document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_registerno_2.focus(); return false; } else if (!isNumber(mbRegisterno_0)) { alert ('사업자등록번호를 숫자로 입력하여 주십시오.'); document.MEMBER.mb_socialno_check.value=''; document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_registerno_0.focus(); return false; } else if (!isNumber(mbRegisterno_1)) { alert ('사업자등록번호를 숫자로 입력하여 주십시오.'); document.MEMBER.mb_socialno_check.value=''; document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_registerno_1.focus(); return false; } else if (!isNumber(mbRegisterno_2)) { alert ('사업자등록번호를 숫자로 입력하여 주십시오.'); document.MEMBER.mb_socialno_check.value=''; document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_registerno_2.focus(); return false; } else { for(var i=0; i<10; i++) { getlist[i]=registerNo.substring(i, i+1); } for(var i=0; i<9; i++) { codeSum += getlist[i]*chkvalue[i]; } codeSum=codeSum + parseInt((getlist[8]*5)/10); sidliy=codeSum % 10; sidCheck=0; if(sidliy != 0) { sidCheck=10 - sidliy; } else { sidCheck=0; } if(sidCheck != getlist[9]) { alert ('사업자등록번호가 올바르지 않습니다.'); document.MEMBER.mb_socialno_check.value=''; document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_registerno_0.focus(); return false; } else { return true; } } } function checkIdEnterSubmit(formName) { if (event.keyCode=='13') { checkIdSubmit(formName); } } function checkIdSubmit(formName) { var mb_text=/(^[a-zA-Z0-9\-*^#_]+$)/; if (document.MEMBER.mb_id.value=='' || document.MEMBER.mb_id.value.length<4 || document.MEMBER.mb_id.value.toString().length>13) { alert('아이디는 4-13자 사이로 입력해 주시기 바랍니다.'); //document.MEMBER.mb_socialno_check.value=''; //document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_id.focus(); return; } else if (!mb_text.test(document.MEMBER.mb_id.value)){ alert('아이디는 영어, 숫자, 일부특수문자만을 사용하실 수 있습니다.'); //document.MEMBER.mb_socialno_check.value=''; //document.MEMBER.mb_registerno_check.value=''; document.MEMBER.mb_id.focus(); return; } else { linkUrl='../member/member_search_id.php'+'?form_name='+formName+'&mb_id=' + document.MEMBER.mb_id.value; winMemberId=window.open(linkUrl, 'memberId', 'top=50, left=50, width=363, height=240, scrollbars=no'); winMemberId.focus(); } } function findZipcodeSubmit(formName, zipcod0Name, zipcod1Name, addrName, addrNameSub) { linkUrl='../member/member_search_zipcode.php'+'?form_name='+formName + '&zipcode1='+zipcod0Name + '&zipcode2='+zipcod1Name + '&address='+addrName + '&address_sub='+addrNameSub; winMemberZipcode=window.open(linkUrl, 'memberZipcode', 'top=50, left=50, width=380, height=264, scrollbars=yes'); winMemberZipcode.focus(); } function checkSocialnoLen(formSocialno, nameSocialno) { setTimeout("checkSocialnoLenSub('"+formSocialno+"', '"+nameSocialno+"')", 200); } function checkSocialnoLenSub(formSocialno, nameSocialno) { var nameSocialnoLength=eval('document.'+formSocialno+'.'+nameSocialno+'_0.value.length'); if (nameSocialnoLength>='6') { eval('document.'+formSocialno+'.'+nameSocialno+'_1.focus()'); } } function checkRegisternoLen(formRegisterno, nameRegisterno, nameRegisternoNum) { setTimeout("checkRegisternoLenSub('"+formRegisterno+"', '"+nameRegisterno+"', '"+nameRegisternoNum+"')", 200); } function checkRegisternoLenSub(formRegisterno, nameRegisterno, nameRegisternoNum) { var nameRegisternoLength=eval('document.'+formRegisterno+'.'+nameRegisterno+'_'+nameRegisternoNum+'.value.length'); if (nameRegisternoNum=='0' && nameRegisternoLength>='3') { eval('document.'+formRegisterno+'.'+nameRegisterno+'_1.focus()'); } else if (nameRegisternoNum=='1' && nameRegisternoLength>='2') { eval('document.'+formRegisterno+'.'+nameRegisterno+'_2.focus()'); } } /* // 관심종목 20개 제한 function checkItemSubmit(commonItemNum) { var commonItemCheck=0; for (i=1; i<=; i++) { if (eval('document.MEMBER.common_item_check_'+i+'.checked')==true) { commonItemCheck+=1; } } if (commonItemCheck>'20') { alert('관심종목은 최대 20개까지 선택하실 수 있습니다.'); eval('document.MEMBER.common_item_check_'+commonItemNum+'.checked=false'); } } */