function error(loc,str){ var val_temp = wrestTrim(loc); loc.value=val_temp; if(!loc.value){ alert(str); loc.focus(); return false; } return true; } function wrestTrim(fld){ if (fld == null) return ""; var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자 fld.value = fld.value.replace(pattern, ""); return fld.value; } function num_chk(loc,str){ if(isNaN(loc.value)){ alert(str); loc.value=""; loc.focus(); return false; } return true; } function openWin(url,id,opt) { var winOpt = "width=1,height=1"+","+opt; window.open(url,id,winOpt); } function NewWindow(mypage, myname, w, h, scroll) { //팝업창 뛰우구 var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable' win = window.open(mypage, myname, winprops) if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } function setCookie( name, value, expiredays ) { var todayDate = new Date(); todayDate.setDate( todayDate.getDate() + expiredays ); document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" } function getCookie( name ) { var nameOfCookie = name + "="; var x = 0; while ( x <= document.cookie.length ) { var y = (x+nameOfCookie.length); if ( document.cookie.substring( x, y ) == nameOfCookie ) { if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) endOfCookie = document.cookie.length; return unescape( document.cookie.substring( y, endOfCookie ) ); } x = document.cookie.indexOf( " ", x ) + 1; if ( x == 0 ) break; } return ""; } function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); }