function CheckKeys() { if( event.keyCode < 48 || event.keyCode > 57) { event.keyCode=0; } } // 숫자만입력 function check_num( no ) { no = trim( no ); // 숫자 if ( no.search( /[^0-9]/ ) != -1 ) { alert( "숫자만 사용할수 있습니다" ); return false; } return true; } //숫자만 function number_filter(str_value){ return str_value.replace(/[^0-9]/gi, ""); } // 일반입력문자에 특수문자 입력못하게 function check_sp( str ) { str = trim(str); var valid_reg = /[^#&\\!%'\(\)\+,\-\.\/\=\?~;\:\[\]_`\sa-zA-Z0-9가-힣ㄱ-ㅎㅏ-ㅣ]/; alert(str.search( valid_reg )); if ( str.search( valid_reg ) == -1 ) { return true; } return false; } // 비밀번호 체크 로직 function check_passwd( pwd ) { pwd = trim( pwd ); // 길이 if ( pwd.length < 6 || pwd.length > 20 ) { alert( "비밀번호는 6~20자이어야 합니다" ); return false; } // 영문소문자, 숫자 if ( pwd.search( /[^a-z0-9@]/) != -1 ) { alert( "비밀번호는 영문 소문자, 숫자만 사용할수 있습니다" ); return false; } return true; } // 이메일주소 체크로직 // 어차피 인증할꺼라 기냥 @만 체크하자 function check_email( email ) { email = trim( email ); if ( email.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1) { alert( '올바른 이메일 주소가 아닙니다' ); return false; } return true; } function trim( str ) { return str.replace(/(^\s*)|(\s*$)/g, ""); } function clearText(field) { if (field.defaultValue == field.value) field.value = ''; else if (field.value == '') field.value = field.defaultValue; } function CenterWin(url,winname,features) { features = features.toLowerCase(); len = features.length; sumchar= ""; for (i=1; i <= len; i++) { onechar = features.substr(i-1, 1); if (onechar != " ") sumchar += onechar; } features = sumchar; sp = new Array(); sp = features.split(',', 10); splen = sp.length; for (i=0; i < splen; i++) { if (sp[i].indexOf("width=") == 0) { width = Number(sp[i].substring(6)); } else if (sp[i].indexOf("height=") == 0) { height = Number(sp[i].substring(7)); } } sleft = (screen.width - width) / 2; stop = (screen.height - height) / 2; features = features + ",left=" + sleft + ",top=" + stop; popwin = window.open(url,winname,features); } function CenterWin2(url,winname,features) { features = features.toLowerCase(); len = features.length; sumchar= ""; for (i=1; i <= len; i++) { onechar = features.substr(i-1, 1); if (onechar != " ") sumchar += onechar; } features = sumchar; sp = new Array(); sp = features.split(',', 10); splen = sp.length; for (i=0; i < splen; i++) { if (sp[i].indexOf("width=") == 0) { width = Number(sp[i].substring(6)); } else if (sp[i].indexOf("height=") == 0) { height = Number(sp[i].substring(7)); } } sleft = (screen.width - width) / 2; stop = (screen.height - height) / 2; features = features + ",left=" + sleft + ",top=" + stop + ",scrollbars=yes"; popwin = window.open(url,winname,features); } function openwindow(name, url, width, height, scrollbar) { scrollbar_str = scrollbar ? 'yes' : 'no'; window.open(url, name, 'width='+width+',height='+height+',scrollbars='+scrollbar_str); } function openwindow2(name, url, width, height, scrollbar, resizable) { scrollbar_str = scrollbar ? 'yes' : 'no'; resizable_str = resizable ? 'yes' : 'no'; window.open(url, name, 'width='+width+',height='+height+',scrollbars='+scrollbar_str+',resizable='+resizable_str); } function BzlSvcView(_bzlurl,_bzlsX,_bzlmenu) { var sX = _bzlsX; var sY = screen.availHeight; managerWin = self.open(_bzlurl, "YBZ_Manager", "width="+sX+",height="+sY+",resizable=1,toolbar=0,scrollbars=1,locationbar=0,status=0,menubar="+_bzlmenu+",personalbar=0,top=0,left=0"); managerWin.focus(); if( document.all ) { managerWin.resizeTo( sX, sY ); } else if( document.layers || document.getElementById ) { if( managerWin.outerHeight < sY || managerWin.outerWidth < sY ){ managerWin.outerHeight = sY; managerWin.outerWidth = sX; } } } function imgBlock(v) { document.getElementById( "pimgView"+v ).style.display='block'; } function imgNone(v) { document.getElementById( "pimgView"+v ).style.display='none'; } //---------------------------------------------------------------------------------------------------------------------- // ajax관련 //---------------------------------------------------------------------------------------------------------------------- var Try = { these: function() { var returnValue; for (var i = 0; i < arguments.length; i++) { var lambda = arguments[i]; try { returnValue = lambda(); break; } catch (e) {} } return returnValue; } } var Ajax = { getTransport: function() { return Try.these( function() {return new ActiveXObject('Msxml2.XMLHTTP.4.0')}, function() {return new ActiveXObject('Msxml2.XMLHTTP.3.0')}, function() {return new ActiveXObject('Msxml2.XMLHTTP')}, function() {return new ActiveXObject('Microsoft.XMLHTTP')}, function() {return new XMLHttpRequest()} ) || false; } } function createXHR() { if(window.ActiveXObject) { var versionList = ['MSXML2.XMLHTTP.4.0','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','MSXML2.XMLHTTP','Microsoft.XMLHTTP']; //'MSXML2.XMLHTTP.5.0',는 사용경고 for (i=0; i