var userReg_no = 'N'; var userName = 'N'; var userIcon = 'N'; var userPhoto = 'N'; var userZip_cd = 'N'; var userAddress = 'N'; var userBirth_dt = 'N'; var userWedding_dt = 'N'; var userTel = 'N'; var userHp = 'N'; var userComment = 'N'; var userHomepage = 'N'; var userHObby = 'N'; var loginFlag = false; var htmlImage = ''; function member_init() { userReg_no = document.cashcow.userReg_no.value; userName = document.cashcow.userName.value; userIcon = document.cashcow.userIcon.value; userPhoto = document.cashcow.userPhoto.value; userZip_cd = document.cashcow.userZip_cd.value; userAddress = document.cashcow.userAddress.value; userBirth_dt = document.cashcow.userBirth_dt.value; userWedding_dt = document.cashcow.userWedding_dt.value; userTel = document.cashcow.userTel.value; userHp = document.cashcow.userHp.value; userComment = document.cashcow.userComment.value; userHomepage = document.cashcow.userHomepage.value; userHobby = document.cashcow.userHobby.value; loginFlag = document.cashcow.login.value; htmlImage = document.cashcow.htmlImage.value; if (userReg_no == 'Y') document.getElementById('iUserReg_no').style.display = 'inline'; if (userName == 'Y') document.getElementById('iUserName').style.display = 'inline'; if (userIcon == 'Y') document.getElementById('iUserIcon').style.display = 'inline'; if (userPhoto == 'Y') document.getElementById('iUserPhoto').style.display = 'inline'; if (userZip_cd == 'Y') document.getElementById('iUserZip_cd').style.display = 'inline'; if (userAddress == 'Y') document.getElementById('iUserAddress').style.display = 'inline'; if (userBirth_dt == 'Y') document.getElementById('iUserBirth_dt').style.display = 'inline'; if (userWedding_dt == 'Y') document.getElementById('iUserWedding_dt').style.display = 'inline'; if (userTel == 'Y') document.getElementById('iUserTel').style.display = 'inline'; if (userHp == 'Y') document.getElementById('iUserHp').style.display = 'inline'; if (userComment == 'Y') document.getElementById('iUserComment').style.display = 'inline'; if (userHomepage == 'Y') document.getElementById('iUserHomepage').style.display = 'inline'; if (userHobby == 'Y') document.getElementById('iUserHobby').style.display = 'inline'; if (document.cashcow.userEmail_yn.value == 'Y') document.unit.userEmail_yn[0].checked = true; else if (document.cashcow.userEmail_yn.value == 'N') document.unit.userEmail_yn[1].checked = true; if (document.cashcow.userPublic_cd.value == 'A') document.unit.userPublic_cd[0].checked = true; else if (document.cashcow.userPublic_cd.value == 'B') document.unit.userPublic_cd[1].checked = true; else if (document.cashcow.userPublic_cd.value == 'C') document.unit.userPublic_cd[2].checked = true; else if (document.cashcow.userPublic_cd.value == 'D') document.unit.userPublic_cd[3].checked = true; if (userHobby != 'N') { var val = document.cashcow.serialUserHobby.value.split(","); var obj = document.getElementsByName('hobby'); for (var i = 0; i < obj.length; i++) { for (var k = 0; k < val.length; k++) { if (obj[i].value == val[k]) obj[i].checked = true; } } } var command = document.cashcow.command.value; comment_init(command); } function userLogin() { document.forms.unit.submit(); } function login_focus() { document.forms.unit.userId.focus(); } function step(fg) { if (fg == 'step1') { if (!chkValue('unit.userId', '¾ÆÀ̵ð¸¦', true)) return; if (!chkValue('unit.userEmail', 'À̸ÞÀÏÀ»', true)) return; } else if (fg == 'step2') { if (!chkValue('unit.userPw_answer', 'ºñ¹Ð¹øÈ£ ÈùÆ® ´äº¯À»', true)) return; } else if (fg == 'step3') { if (!chkValue('unit.userNick', '´Ð³×ÀÓÀ»', true)) return; if (!chkValue('unit.userEmail', 'À̸ÞÀÏÀ»', true)) return; } else if (fg == 'back') { window.history.back(); return; } document.unit.submit(); } function popup_window(addr,w,h) { window.open(addr, '_blank', 'width='+w+', height='+h); } function pasteImage(icon) { document.unit.userIcon.value = icon; document.getElementById('iconView').style.display = 'inline'; document.getElementById('myIcon').src = './'+htmlImage+'/icon/'+icon.substring(0,8)+'/'+icon; } function pastePhoto(photo) { document.unit.userPhoto.value = photo; document.getElementById('photoView').style.display = 'block'; document.getElementById('myPhoto').src = './'+htmlImage+'/photo/'+photo.substring(0,8)+'/'+photo; } function member_save() { if (!eval(loginFlag)) { if (!chkValue('unit.userId', '¾ÆÀ̵ð¸¦', true)) return; if (!chkCharNum('unit.userId', '¾ÆÀ̵ð¿¡', true)) return; if (!chkLength('unit.userId', '¾ÆÀ̵ð', 16, true)) return; if (!chkLengthShorter('unit.userId', '¾ÆÀ̵ð', 4, true)) return; document.unit.command.value = 'NEW'; if (document.unit.userPw.value != document.unit.userPw_confirm.value) { alert('ºñ¹Ð¹øÈ£¿Í ºñ¹Ð¹øÈ£È®ÀÎ °ªÀÌ Æ²¸³´Ï´Ù'); document.unit.userPw.focus(); return; } } else document.unit.command.value = 'UPDATE'; if (!chkValue('unit.userPw', 'ºñ¹Ð¹øÈ£¸¦', true)) return; if (!chkCharNum('unit.userPw', 'ºñ¹Ð¹øÈ£¿¡', true)) return; if (!chkLength('unit.userPw', 'ºñ¹Ð¹øÈ£', 16, true)) return; if (!chkLengthShorter('unit.userPw', 'ºñ¹Ð¹øÈ£', 4, true)) return; if (!chkValue('unit.userNick', 'À̸§À»', true)) return; if (!chkValue('unit.userPw_question', 'ºñ¹Ð¹øÈ£Áú¹®À»', true)) return; if (!chkValue('unit.userPw_answer', 'ºñ¹Ð¹øÈ£´äº¯À»', true)) return; if (!chkValue('unit.userEmail', 'À̸ÞÀÏÀ»', true)) return; if (!chkEmail('unit.userEmail', 127, true)) return; if (userReg_no == 'Y' && !chkValue('unit.userReg1_no', 'ÁֹιøÈ£¸¦', true)) return; if (userReg_no == 'Y' && !chkValue('unit.userReg2_no', 'ÁֹιøÈ£¸¦', true)) return; if (userName == 'Y' && !chkValue('unit.userName', 'À̸§À»', true)) return; if (userIcon == 'Y' && !chkValue('unit.userIcon', '¾ÆÀÌÄÜÀ»', false)) return; if (userPhoto == 'Y' && !chkValue('unit.userPhoto', '»çÁøÀ»', false)) return; if (userZip_cd == 'Y' && !chkValue('unit.userZip1_cd', '¿ìÆí¹øÈ£¸¦', true)) return; if (userZip_cd == 'Y' && !chkValue('unit.userZip2_cd', '¿ìÆí¹øÈ£¸¦', true)) return; if (userAddress == 'Y' && !chkValue('unit.userAddress', 'ÁÖ¼Ò¸¦', true)) return; if (userTel == 'Y' && !chkValue('unit.userTel1', 'ÀüÈ­¹øÈ£¸¦', true)) return; if (userTel == 'Y' && !chkValue('unit.userTel2', 'ÀüÈ­¹øÈ£¸¦', true)) return; if (userTel == 'Y' && !chkValue('unit.userTel3', 'ÀüÈ­¹øÈ£¸¦', true)) return; if (userHp == 'Y' && !chkValue('unit.userHp1', 'ÇØµåÆù¹øÈ£¸¦', true)) return; if (userHp == 'Y' && !chkValue('unit.userHp2', 'ÇØµåÆù¹øÈ£¸¦', true)) return; if (userHp == 'Y' && !chkValue('unit.userHp3', 'ÇØµåÆù¹øÈ£¸¦', true)) return; if (userBirth_dt == 'Y' && !chkValue('unit.userBirth1_dt', '»ýÀÏÀ»', true)) return; if (userBirth_dt == 'Y' && !chkValue('unit.userBirth2_dt', '»ýÀÏÀ»', true)) return; if (userBirth_dt == 'Y' && !chkValue('unit.userBirth3_dt', '»ýÀÏÀ»', true)) return; if (userWedding_dt == 'Y' && !chkValue('unit.userWedding1_dt', '°áÈ¥±â³äÀÏÀ»', true)) return; if (userWedding_dt == 'Y' && !chkValue('unit.userWedding2_dt', '°áÈ¥±â³äÀÏÀ»', true)) return; if (userWedding_dt == 'Y' && !chkValue('unit.userWedding3_dt', '°áÈ¥±â³äÀÏÀ»', true)) return; if (userComment == 'Y' && !isMIE() && !chkValue('unit.userComment', 'Àâ´ãÀ»', true)) return; if (userComment == 'Y' && isMIE()) { document.unit.userComment.value = (document.unit.whatmode[0].checked)? textEditor.document.body.innerHTML : unit.textView.value; if (!chkValue('unit.userComment', 'Àâ´ãÀ»', false)) return; } if (userReg_no != 'N' && exists('unit.userReg1_no') && !chkJumin('unit.userReg1_no', 'unit.userReg2_no')) return; if (userReg_no != 'N' && exists('unit.userReg2_no') && !chkJumin('unit.userReg1_no', 'unit.userReg2_no')) return; if (userReg_no != 'N' && exists('unit.userReg1_no') && !chkNum('unit.userReg1_no', 'ÁֹιøÈ£¿¡', true)) return; if (userReg_no != 'N' && exists('unit.userReg2_no') && !chkNum('unit.userReg2_no', 'ÁֹιøÈ£¿¡', true)) return; if (userWedding_dt != 'N' && exists('unit.userWedding1_dt') && !chkNum('unit.userWedding1_dt', '°áÈ¥±â³äÀÏ¿¡', true)) return; if (userWedding_dt != 'N' && exists('unit.userWedding2_dt') && !chkNum('unit.userWedding2_dt', '°áÈ¥±â³äÀÏ¿¡', true)) return; if (userWedding_dt != 'N' && exists('unit.userWedding3_dt') && !chkNum('unit.userWedding3_dt', '°áÈ¥±â³äÀÏ¿¡', true)) return; if (userBirth_dt != 'N' && exists('unit.userBirth1_dt') && !chkNum('unit.userBirth1_dt', '»ýÀÏ¿¡', true)) return; if (userBirth_dt != 'N' && exists('unit.userBirth2_dt') && !chkNum('unit.userBirth2_dt', '»ýÀÏ¿¡', true)) return; if (userBirth_dt != 'N' && exists('unit.userBirth3_dt') && !chkNum('unit.userBirth3_dt', '»ýÀÏ¿¡', true)) return; if (userHp != 'N' && exists('unit.userHp1') && !chkNum('unit.userHp1', 'ÇØµåÆù¹øÈ£¿¡', true)) return; if (userHp != 'N' && exists('unit.userHp2') && !chkNum('unit.userHp2', 'ÇØµåÆù¹øÈ£¿¡', true)) return; if (userHp != 'N' && exists('unit.userHp3') && !chkNum('unit.userHp3', 'ÇØµåÆù¹øÈ£¿¡', true)) return; if (userTel != 'N' && exists('unit.userTel1') && !chkNum('unit.userTel1', 'ÀüÈ­¹øÈ£¿¡', true)) return; if (userTel != 'N' && exists('unit.userTel2') && !chkNum('unit.userTel2', 'ÀüÈ­¹øÈ£¿¡', true)) return; if (userTel != 'N' && exists('unit.userTel3') && !chkNum('unit.userTel3', 'ÀüÈ­¹øÈ£¿¡', true)) return; if (userZip_cd != 'N' && exists('unit.userZip1_cd') && !chkNum('unit.userZip1_cd', '¿ìÆí¹øÈ£¿¡', true)) return; if (userZip_cd != 'N' && exists('unit.userZip2_cd') && !chkNum('unit.userZip2_cd', '¿ìÆí¹øÈ£¿¡', true)) return; if (userComment != 'N') { document.unit.userComment.value = (document.unit.whatmode[0].checked)? textEditor.document.body.innerHTML : unit.textView.value; } if (userReg_no != 'N' && exists('unit.userReg1_no') && exists('unit.userReg2_no')) document.unit.userReg_no.value = document.unit.userReg1_no.value +''+document.unit.userReg2_no.value; if (userZip_cd != 'N' && exists('unit.userZip1_cd') && exists('unit.userZip2_cd')) document.unit.userZip_cd.value = document.unit.userZip1_cd.value +''+ document.unit.userZip2_cd.value; if (userBirth_dt != 'N' && exists('unit.userBirth1_dt') && exists('unit.userBirth2_dt') && exists('unit.userBirth3_dt')) document.unit.userBirth_dt.value = document.unit.userBirth1_dt.value +''+ document.unit.userBirth2_dt.value +''+ document.unit.userBirth3_dt.value;; if (userWedding_dt != 'N' && exists('unit.userWedding1_dt') && exists('unit.userWedding2_dt') && exists('unit.userWedding3_dt')) document.unit.userWedding_dt.value = document.unit.userWedding1_dt.value +''+ document.unit.userWedding2_dt.value +''+ document.unit.userWedding3_dt.value; var hobbySelected = ''; if (userHobby != 'N') { for (var i = 0; i < document.unit.elements.length; i++) { if (document.unit.elements[i].name == 'hobby' && document.unit.elements[i].checked) hobbySelected += document.unit.elements[i].value+','; } if (userHobby == 'Y' && hobbySelected == '') { alert('Ãë¹Ì¸¦ ÃÖ¼Ò ÇϳªÀÌ»ó ¼±ÅÃÇØ ÁÖ¼¼¿ä'); return; } } if (userHobby != 'N') document.unit.userHobby.value = hobbySelected; document.unit.action = 'member-join-process.do' document.unit.target = '_self'; document.unit.submit(); } function ableToId() { if (!chkValue('unit.userId', '¾ÆÀ̵ð¸¦', true)) return; if (!chkCharNum('unit.userId', '¾ÆÀ̵ð¿¡', true)) return; if (!chkLength('unit.userId', '¾ÆÀ̵ð', 16, true)) return; document.unit.action = 'member-id.do' document.unit.command.value = "ABLETOID"; document.unit.target = 'hidden_'; document.unit.submit(); } function ableToNick() { if (!chkValue('unit.userNick', 'À̸§À»', true)) return; document.unit.action = 'member-nick.do' document.unit.command.value = "ABLETONICK"; document.unit.target = 'hidden_'; document.unit.submit(); } function ableToEmail() { if (!chkValue('unit.userEmail', 'À̸ÞÀÏÀ»', true)) return; document.unit.action = 'member-email.do' document.unit.command.value = "ABLETOEMAIL"; document.unit.target = 'hidden_'; document.unit.submit(); } function showLayout(item) { document.getElementById('mem').style.display = 'none'; document.getElementById('psw').style.display = 'none'; document.getElementById('bye').style.display = 'none'; document.getElementById(item).style.display = 'inline'; } function password() { if (!chkValue('unit.currentPw', 'ÇöÀçºñ¹Ð¹øÈ£¸¦', true)) return; if (!chkValue('unit.newPw', 'ºñ¹Ð¹øÈ£¸¦', true)) return; if (!chkCharNum('unit.newPw', 'ºñ¹Ð¹øÈ£¿¡', true)) return; if (!chkLength('unit.newPw', 'ºñ¹Ð¹øÈ£', 16, true)) return; if (!chkLengthShorter('unit.newPw', 'ºñ¹Ð¹øÈ£', 4, true)) return; if (document.unit.newPw.value != document.unit.newPw_confirm.value) { alert('ºñ¹Ð¹øÈ£¿Í ºñ¹Ð¹øÈ£È®ÀÎ °ªÀÌ Æ²¸³´Ï´Ù'); document.unit.userPw.focus(); return; } document.unit.command.value = "PASSWORD"; if (confirm('ºñ¹Ð¹øÈ£¸¦ º¯°æ ÇϽðڽÀ´Ï±î?')) document.unit.submit(); } function bye() { if (!chkValue('unit.yourPw', 'ºñ¹Ð¹øÈ£¸¦', true)) return; document.unit.command.value = "DELETE"; if (confirm('ȸ¿ø Å»Åð ÇÕ´Ï´Ù')) document.unit.submit(); } function search() { if (!chkValue('unit.searchKey', '°Ë»ö¾î¸¦', true)) return; document.unit.submit(); }