function lo_var(){ alert( "권한이 없습니다." ); return; } function sc_lo_var(){ alert( "해당게시물의 작성자만 볼수있습니다!!" ); return; } function checkid( ){ var rExp2 = /[\W]+/; var arrMatch1 = document.formUserInfo.userid.value.match(rExp2); if( document.formUserInfo.userid.value == "" ) { alert( "사용자 아이디를 입력하여주십시요." ); return; } if( arrMatch1 != null) { alert( "한글 및 특수문자는 사용할 수 없습니다." ); document.formUserInfo.userid.focus(); return; } var x = 0; var y = 0; var opt = "left=" + x + ",top=" + y + ",width=480,height=300,scrollbars=no"; var url = "/member/pop_idcheck.php?u_id="+ document.formUserInfo.userid.value; window.open( url , "checkid", opt ); } function zipcode(){ var x = 0; var y = 0; var opt = "left=" + x + ",top=" + y + ",width=516,height=450,scrollbars=yes"; window.open('/member/pop_post.php', 'zipcode',opt); } function goWriteAction(mode) { var rExp2 = /[\W]+/; var arrMatch1 = document.formUserInfo.userid.value.match(rExp2); var arrMatch2 = document.formUserInfo.passwd.value.match(rExp2); if( arrMatch1 != null) { alert( "한글 및 특수문자는 사용할 수 없습니다." ); document.formUserInfo.userid.focus(); return; } if( arrMatch2 != null) { alert( "한글 및 특수문자는 사용할 수 없습니다." ); document.formUserInfo.passwd.focus(); return; } //-------------------------- validation ------------------------------- if( document.formUserInfo.idCheck.value != "Y" ) { alert( "아이디 중복체크를 반드시 해야 합니다." ); document.formUserInfo.userid.focus(); return; } if( document.formUserInfo.name.value == "" ){ alert( "이름을 입력하여 주십시요." ); document.formUserInfo.name.focus(); return; } if( document.formUserInfo.passwd.value == "" || document.formUserInfo.passwdConfirm.value == "" ){ alert( "비밀번호를 정확히 입력하여 주십시요." ); document.formUserInfo.passwd.focus(); return; } if( document.formUserInfo.passwd.value != document.formUserInfo.passwdConfirm.value ){ alert( "비밀번호가 일치하지 않습니다." ); document.formUserInfo.passwd.focus(); return; } if( document.formUserInfo.zcodeFront.value == "" || document.formUserInfo.zcodeRear.value == "" || document.formUserInfo.addr1.value =="" || document.formUserInfo.addr2.value == ""){ alert( "주소를 모두 입력하여 주십시요." ); return; } if( document.formUserInfo.tel1.value != "" && document.formUserInfo.tel2.value != "" && document.formUserInfo.tel3.value != "" ){ document.formUserInfo.telNum.value= document.formUserInfo.tel1.value+ "-" + document.formUserInfo.tel2.value + "-" + document.formUserInfo.tel3.value ; document.formUserInfo.phonenum.value=document.formUserInfo.telNum.value; }else{ alert( "전화번호를 입력하여 주십시요." ); document.formUserInfo.tel1.focus(); return; } if( document.formUserInfo.emailname.value == "" || document.formUserInfo.emailhost.value == "" ){ alert( "이메일주소를 입력하여 주십시요." ); document.formUserInfo.emailname.focus(); return; } if( document.formUserInfo.emailname.value != "" && document.formUserInfo.emailhost.value != "" ) document.formUserInfo.email.value = document.formUserInfo.emailname.value +"@"+ document.formUserInfo.emailhost.value; if( !isValidEmail( document.formUserInfo.email ) ){ alert("이메일 형식이 맞지 않습니다. 다시 입력하여 주십시요."); document.formUserInfo.emailname.focus(); return; } document.formUserInfo.action = "/member/process.php"; document.formUserInfo.submit(); } function only_num_int(){ if(isNaN(document.formUserInfo.tel2.value)){ alert( "숫자만 가능합니다." ); document.formUserInfo.tel2.value=""; document.formUserInfo.tel2.focus(); return; } if(isNaN(document.formUserInfo.tel3.value)){ alert( "숫자만 가능합니다." ); document.formUserInfo.tel3.value=""; document.formUserInfo.tel3.focus(); return; } } function selectMailHost( val ){ document.formUserInfo.emailhost.value= val; } function isValidEmail( input ) { // var format = /[$\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\`\~\=\|A-Za-z]/; var format = /^((\w|[\-\.])+)@((\w|[\-\.])+)\.([A-Za-z]+)$/; return isValidFormat( input,format ); } function isValidFormat(input,format) { if ( input.value.search(format) != -1) { return true; //file://올바른 포맷 형식 } return false; }