function chkRegPattern(pType, strInput) {//패턴 검증 정규식 var regPattern; var arrResult; if (pType != undefined && strInput != undefined) { switch (pType) { case 'num': regPattern = /^[0-9]+$/; break; //숫자만 입력 case 'han': regPattern = /^[가-힣]+[가-힣]$/; break; case 'eng': regPattern = /^[a-zA-Z]+[a-zA-Z]$/; break; case 'ju1': regPattern = /^([\d]{2})(0[1-9]{1}|1[0-2]{1})(0[1-9]{1}|[1-2][\d]{1}|3[0-1]{1})$/; break; case 'ju2': regPattern = /^([1-8]{1})([\d]{6})$/; break; case 'id': regPattern = /^([a-zA-Z]{1})([\w-]{5,14})/; break; case 'pwd': regPattern = /^[\w]{6,15}/; break; case 'ans': regPattern = /^[가-힣\w\s-]{2,20}/; break; case 'mail1': regPattern = /^[a-z0-9_+.-]+/; break; case 'mail2': regPattern = /^[\w.-]+\.[a-zA-Z]{2,5}/; break; case 'mail': regPattern = /^[\w]+@[\w.-]+.[a-z]{2,5}/; break; case 'con1': regPattern = /^[0]{1}[1-7]{1}[\d]{0,1}/; break; case 'con2': regPattern = /^[1-9]{1}[\d]{2,3}/; break; case 'con3': regPattern = /^[\d]{4}/; break; default: return false; break; } result = regPattern.test(strInput); return result; //result = strInput.match(regPattern); /*result = regPattern.exec(strInput); if ( result.split(",")(0) == strInput){return true; }else{return false;}*/ } else { return false; } } function CheckPass(str){//패스워드 검증 정규식 var reg1=/^([a-zA-Z0-9]){6,15}$/; var reg2 = /[a-z]/g; var reg3 = /[0-9]/g; var reg4 = /[~!@#$%^&*()_+|]/g; return (reg1.test(str)&& reg2.test(str) && (reg3.test(str))); // return (reg1.test(str)&& reg2.test(str) && (reg3.test(str) || reg4.test(str))); } var checkPasswordValidate = function (val) {//연속된 숫자 금지 return validatePassword(val, { length: [6, Infinity], lower: 0, upper: 0, numeric: 0, special: 0, badWords: ["password"], badSequenceLength: 4 }); }; function check_all(f) { var chk = document.getElementsByName("chk[]"); for (i=0; i "; flash_str=flash_str+" "; flash_str=flash_str+" "; flash_str=flash_str+" "; flash_str=flash_str+" "; flash_str=flash_str+" "; document.write(flash_str); } //기본 플레쉬(플래시바스) 열때 function script_flash3(flash_root,w,h,xmlurl){ flash_str=" "; flash_str=flash_str+" "; flash_str=flash_str+" "; flash_str=flash_str+" "; flash_str=flash_str+" "; flash_str=flash_str+" "; flash_str=flash_str+" "; document.write(flash_str); } //플레쉬 위치지정해서 열때 function script_flash(flash_root,w,h,left,top){ flash_str=" "; flash_str=flash_str+" "; flash_str=flash_str+" "; flash_str=flash_str+" "; flash_str=flash_str+" "; flash_str=flash_str+" "; document.write(flash_str); } //입력값 길이 검사 function check_value(on,str,n) { str_value=on.value; str_value=str_value.replace(/ /g,""); str_value=str_value.replace(/\r\n/g,""); if (str_value.length==0) { alert(str + " 입력하세요."); on.value=""; on.focus(); return false; } else if (str_value.length28)) ||((date_month=="04")&&(date_day>30)) || ((date_month=="06")&&(date_day>30)) ||((date_month=="09")&&(date_day>30)) || ((date_month=="11")&&(date_day>30)) ) { alert("잘못된 날짜입니다. 다시 선택하세요."); return false; } } //이메일 검사 function verify_email(on) { var reg = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/; if (reg.test(on)==false) { alert("잘못된 이메일 주소입니다. \n다시 작성하세요."); return false; } } //영문,숫자만 쓰기 경고~! function check() { var form = document.form1; var str = form.m_id.value; for(var i=0; i= 48 && str.charCodeAt(i) <=57) || (str.charCodeAt(i) >=65 && str.charCodeAt(i) <= 90) || (str.charCodeAt(i) >= 97 && str.charCodeAt(i) <= 122))) { } else { alert("영문이나 숫자만 쓸수 있습니다."); form.m_id.value = ""; return false;} // 처리 } } //한글,영문만 쓰기 경고~! function check2() { var form = document.form1; var str = form.m_nick.value; for(var i=0; i122)))&&((str.charCodeAt(i))<48||(str.charCodeAt(i))>57)) { alert("한글이나 영어만 쓸수 있습니다."); form.m_nick.value = ""; return false; } else { } // 처리 } } //이미지 파일 검사 function check_image(on) { extension=on.substr(on.length-3,3); extension=extension.toLowerCase(); if (((extension=="jpg")||(extension=="gif")||(extension=="png")||(extension=="tif")||(extension=="swf"))==false) { alert("JPG / GIF / SWF / PNG / TIF 이미지를 선택하세요."); return false; } } //관리자 메인 메뉴 뷰 function sub_view(on){ if (document.all["sub_menu_"+on].style.display=="none"){ document.all["sub_menu_"+on].style.display=""; }else{ document.all["sub_menu_"+on].style.display="none"; } } //우편번호 검색 function post_pop(on){ window.open("/include/exe/zip.php?chk="+on,"zip","top=20,left=20,width=500,height=300"); } function post_pop_02(on){ window.open('/include/exe/window_address.php?fg=1&chk='+on, 'memRegZip', "width=346, height=228"); } //검색 유효성 검사 function search_sendit(on){ if (check_value(on.s_str,"검색어를",2)==false){ return false; } } //주민등록번호 검사 function verify_ssn(on1,on2) { a=on1.value.charAt(0); b=on1.value.charAt(1); c=on1.value.charAt(2); d=on1.value.charAt(3); e=on1.value.charAt(4); f=on1.value.charAt(5); g=on2.value.charAt(0); h=on2.value.charAt(1); i=on2.value.charAt(2); j=on2.value.charAt(3); k=on2.value.charAt(4); l=on2.value.charAt(5); m=on2.value.charAt(6); q=c+d; r=0; num=0; if ((a+b)<20) { t=4; } else { t=2; } if ((q>12)||(q<1)) { num=1; } else if ((q==4)||(q==6)||(q==9)||(q==11)) { r=30; } else if (q==2) { r=29; } else { r=31; } if (((e+f)>r)||((e+f)<1)) { num=1; } else if (g>t) { num=1; } else { n=a*2 + b*3 + c*4 + d*5 + e*6 + f*7 + g*8 + h*9 + i*2 + j*3 + k*4 + l*5; p=11-(n%11); if (p==10) { p=0; } else if (p==11) { p=1; } if (p!=m) { num=1; } } if (num==1) { alert("잘못된 주민등록번호입니다. \n다시 작성하세요.") on2.value="" on2.focus(); return false; } } function search_duplicate(on) { process_page="/include/exe/id.php?m_id="+on; // alert(process_page); axo=new ActiveXObject("Microsoft.XMLHTTP"); axo.Open("POST", process_page, true); axo.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); axo.onreadystatechange=function() {return_value(axo)}; axo.Send(null); return axo; } function trim(str){ //정규 표현식을 사용하여 화이트스페이스를 빈문자로 전환 str = str.replace(/^s*/,'').replace(/s*$/, ''); return str; //변환한 스트링을 리턴. } //리턴값 중복 확인 function return_value(axo) { if ((axo==null)||(axo.readyState !=4)) { return false; } // alert(axo.responseText); if ((trim(axo.responseText)==1)) { if (confirm("사용가능합니다.사용하시겠습니까?")==true){ document.all.m_id_chk.value="ok"; } } else { alert("이미 등록된 회원아이디입니다."); document.all.m_id_chk.value="no"; } } var showFlashObject=function(objID,objSource,objWidth,objHeight,objQuality,objWmode,objBgcolor,objXML){ if(objXML){var chkMovie=0;if(objSource.match(/=/))objSource=objSource+"&server="+objXML+"&chkMovie="+chkMovie;else objSource=objSource+"?server="+objXML+"&chkMovie="+chkMovie;} var pageUrl=self.window.location.href; if(pageUrl.substring(0,5)=="https") swfUrl="https"; else swfUrl="http"; if(!objID)objID="ShockwaveFlash1"; if(!objWidth)objWidth="0"; if(!objHeight)objHeight="0"; if(!objQuality)objQuality="high"; if(!objWmode)objWmode="transparent"; document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln('');}; function auto_close(){ if (/MSIE/.test(navigator.userAgent)) { //Explorer 7 if(navigator.appVersion.indexOf("MSIE 7.0") == 17) { // window.open('about:blank','_self').close(); window.opener='Self'; window.open('','_parent',''); window.close(); } //Explorer 8 else if(navigator.appVersion.indexOf("MSIE 8.0") == 17) { window.opener='Self'; window.open('','_parent',''); window.close(); } //Explorer 7이하일때 else { window.opener = self; self.close(); } } } //자동칸띄우기 function autoTab(tabno, invalue) { if(invalue.length == tabno.maxLength) { var nextin = tabno.tabIndex; if(nextin < document.forms[0].elements.length) document.forms[0].elements[nextin].focus(); } } //자동칸띄우기 //radio readyonly 효과 function setRadioChk(e){ var srcEl = getSrc(e); var radiochk = srcEl.form[srcEl.name] for(var i=0;i'; html += ''; html += ''; html += ''; html +=''; html += ''; html += ''; html += ''; document.write(html); } function resizeFrame(iframeObj){ var innerBody = iframeObj.contentWindow.document.body; var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight); var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth); iframeObj.style.height = innerHeight; iframeObj.style.width = innerWidth; } function email_chk(email){ if (email == "") { $("#email2").val('') }else{ $("#email2").val(email) } } function email_chk2(email){ if (email == "") { $("#d_email2").val('') }else{ $("#d_email2").val(email) } } function cate_chk(depth,cate){ var cate1 = $("#g_cate1").val(); var cate2 = $("#g_cate2").val(); var cate3 = $("#g_cate3").val(); var cate4 = $("#g_cate4").val(); $.ajax({ type: "POST", url: "p_cate.php", data: "depth="+depth+"&cate1="+cate1+"&cate2="+cate2+"&cate3="+cate3, success: function(data){ $("#pcate"+depth+"").html(data); } }); }