/* ************************************************************** Wiz Javascript - AJAX Utility Library Modal Window Version : 1.0 Developer : wiz (wizys@yahoo.co.kr / http://wiz.pe.kr/) Last Updated : 2007.04.11 - First Version By wiz * 소스의 무단 사용을 금지 합니다. ************************************************************** */ /** START:BROWSER DETECTION ********************/ _nv_common=navigator.appVersion.toLowerCase(); ie4_common = false; ie5_common = false; ie55_common = false; ie6_common = false; ie7_common =(_nv_common.indexOf('msie 7.0')!=-1)?true:false; if(!ie7_common){ ie4_common =(!document.getElementById&&document.all)?true:false; ie5_common =(_nv_common.indexOf('msie 5.0')!=-1)?true:false; ie55_common=(_nv_common.indexOf('msie 5.5')!=-1)?true:false; ie6_common =(_nv_common.indexOf('msie 6.0')!=-1)?true:false; } isIE_common=(ie5_common || ie55_common || ie6_common || ie7_common) ?true:false; /** END:BROWSER DETECTION ********************/ var StringUtils = { /**************************************************************** * 주어진 길이보다 길이가 작은 문자열을 앞에 0을 붙여 패딩한다
* param str 문자열 # param len 길이 * return 뒤에 '0'으로 패딩된 문자열을 리턴한다. 단, 주어진 길이보다 크거나 같으면 원본문자열을 그대로 리턴한다 ****************************************************************/ paddingTailZero : function (str, len) { var strLen = str.length; var cab = 0; var tmp = ""; if (strLen >= len) return str; else cab = len - strLen; for (var ii = 0; ii < cab; ii++) { tmp = tmp + "0"; } return str + tmp; }, paddingBeforeZero : function (str, len) { var strLen = str.length; var cab = 0; var tmp = ""; if (strLen >= len) return str; else cab = len - strLen; for (var ii = 0; ii < cab; ii++) { tmp = tmp + "0"; } //return str + tmp; return tmp + str; }, // 한/영 포함해서 Byte 단위로 자를때 한글이 깨지지 않는 범위에서 최소로 잘려진 글자를 리턴한다. // return : 자른 문자열 getLimitChar : function ( value, limitBtye) { var strValue = ""; for( var i=0; i limitBtye ) { break; } else { strValue += value.charAt(i); } } return strValue; }, getByteLength : function (src) { var byteLength = 0; for (var inx = 0; inx < src.length; inx++) { var oneChar = escape(src.charAt(inx)); if ( oneChar.length == 1 ) { byteLength ++; } else if (oneChar.indexOf("%u") != -1) { byteLength += 2; } else if (oneChar.indexOf("%") != -1) { byteLength += oneChar.length/3; } } return byteLength; }, /** * 숫자나 문자열을 통화(Money) 형식으로 만든다.( 쉼표(,) 찍는다는 소리.. ) * @param amount "1234567" * @return currencyString "1,234,567" */ formatCurrency : function (amount) { amount = new String(amount); var amountLength = amount.length; var modulus = amountLength % 3; var currencyString = amount.substr(0,modulus); for(i=modulus; i limitCnt) { alert("최대글자수를 초과했습니다. 초과된 글자는 자동으로 삭제됩니다."); event.srcElement.value = StringUtils.getLimitChar(beforeValue, limitCnt); return false; } return true; } } var checkValidator = { fromYyyy : 1000, toYyyy : 2200, zero : function (val) { var iVal = Number(val); if(isNaN(iVal)) return false; if(iVal != 0) return false; return true; }, minus : function (val) { var iVal = Number(val); if(isNaN(iVal)) return false; if(iVal >= 0) return false; return true; }, zeroPlus : function (val) { var iVal = Number(val); if(isNaN(iVal)) return false; if(iVal < 0) return false; return true; }, plus : function (val) { var iVal = Number(val); if(isNaN(iVal)) return false; if(iVal <= 0) return false; return true; }, number : function (val) { var iVal = Number(val); if(isNaN(iVal)) return false; return true; }, numberRange : function (val, min, max) { if(this.zeroPlus(val) == false) return false; if(this.zeroPlus(min) == false) return false; if(this.zeroPlus(max) == false) return false; var iVal = Number(val); var iMin = Number(min); var iMax = Number(max); if(iMin <= iVal && iVal <= iMax){ return true; } else{ return false; } }, year : function (val) { var re = new RegExp('^[1-9][0-9][0-9][0-9]$'); if(re.test(val) == false) return false; else return this.numberRange(val, this.fromYyyy, this.toYyyy); }, month : function (val) { var re = new RegExp('^[0-9]$|^[0-9][0-9]$'); if(re.test(val) == false) { return false; } else { return this.numberRange(val, 1, 12); } }, day : function (valYear, valMonth, varDay) { if(this.year(valYear) == false){ event.returnValue = false; alert("올바른 년도(입력예:2007)를 입력한 후에 일자를 입력하시기 바랍니다."); return false; } if(this.month(valMonth) == false){ event.returnValue = false; alert("올바른 월(입력예:09)를 입력한 후에 일자를 입력하시기 바랍니다."); return false; } var re = new RegExp('^[0-9]$|^[0-9][0-9]$'); if(re.test(varDay) == false) return false; var validLastDay = DateUtils.getYoundal(valYear, valMonth); if(this.numberRange(varDay, 1, validLastDay) == false){ return false; } return true; }, // 년, 월 에 대한 Validation 을 체크한 후에 수행해야한다. day2 : function (valYear, valMonth, varDay) { var re = new RegExp('^[0-9]$|^[0-9][0-9]$'); if(re.test(varDay) == false) return false; var validLastDay = DateUtils.getYoundal(valYear, valMonth); if(this.numberRange(varDay, 1, validLastDay) == false){ return false; } return true; }, hour : function (val) { var re = new RegExp('^[0-9][0-9]$'); if(re.test(val) == false) return false; else return this.numberRange(val, 0, 23); }, minute : function (val) { var re = new RegExp('^[0-9][0-9]$'); if(re.test(val) == false) return false; else return this.numberRange(val, 0, 59); }, seconds : function (val) { var re = new RegExp('^[0-9][0-9]$'); if(re.test(val) == false) return false; else return this.numberRange(val, 0, 59); }, find : function (val, filter) { var re = new RegExp(filter); if(re.test(val) == true) return false; return true; }, illegal : function (val, filter) { if(this.find(val, filter) == false) return false; return true; }, limit : function (val, limitCnt) { if(StringUtils.getByteLength(val) > limitCnt) return false; return true; } } /*************************************************** 함수 checkData() -폼데이터를 서브밋하기 전에 데이터 적합성 체크 -입력 패러미터 ObjName :컨트롤 이름(txtTitle...) DataType :문자열/숫자 구분.문자열이면 "S",숫자면 "N"(String/Number) 문자열이면 최대길이체크,숫자면 숫자여부체크 IsEssential :필수여부.필수입력사항이면 "Y",아니면 "N" "Y"면서 값을 입력하지 않으면 return false MaxLen :문자열일경우 최대길이(100을 지정하면 한글50자,영문100자) 입력값이 최대길이를 초과하면 return false msg :사용자에게 보여주는 메시지에서 사용할 항목 이름 -사용예 ***************************************************/ function setFocusObjValue(pObjName){ var focusObj = document.getElementsByName("focusObj")[0]; if(focusObj != null) focusObj.value = pObjName; } function checkData(FormName,ObjName,DataType,IsEssential,MaxLen,msg){ var obj; if(FormName){ obj=document.forms[FormName].elements[ObjName]; }else{ obj=eval("document.all."+ObjName); } //var obj=document.getElementsByName(ObjName); //alert(obj.length); if(!obj){ alert(ObjName + " 잘못된 객체입니다"); return false; } var sVal=""; if(obj.length==null){ sVal=obj.value; }else{ for(var i=0;i-1){sVal=sVal.substring(0,sVal.indexOf("|"));} DataType=DataType.toUpperCase(); IsEssential=IsEssential.toUpperCase(); //setFocusObjValue(ObjName); if(IsEssential=="Y"){ if(!checkEssential(sVal,msg)){ //alertMessageAction("dv_modal","알림",msg+"은(는) 필수입력사항입니다!",300,110,setFocusObject); setFocus(obj); return false; } } if(DataType=="S"){ if(!checkMaxLen(sVal,MaxLen,msg)){ //alertMessageAction("dv_modal","알림","["+msg+"] 한글은 "+(MaxLen/2)+"자, 영문.숫자.공백은 "+MaxLen+"자를 초과할수 없습니다.",300,110,setFocusObject); setFocus(obj); return false; } } if(DataType=="N"){ if(!checkNumeric(sVal,msg)){ //alertMessageAction("dv_modal","알림",msg+"에는 숫자만 입력할 수 있습니다!",300,110,setFocusObject); setFocus(obj); return false; } } //setFocusObjValue(""); return true; } //값입력여부 체크 //입력값있으면 true,없으면 false function checkEssential(str,msg){ if(!str){ alert(msg+'은(는) 필수입력사항입니다!'); //alertMessage("dv_modal","알림",msg+"은(는) 필수입력사항입니다!",300,105); return false; }else{ return true; } } //숫자여부 체크 //숫자이면 true,아니면 false function checkNumeric(str,msg){ if(isNaN(str)){ alert(msg+'에는 숫자만 입력할 수 있습니다!'); return false; }else{ return true; } } //최대길이 체크 //입력값이 최대길이를 초과하면 false function checkMaxLen(str,MaxLen,msg){ if(parseInt(getLength(str))>parseInt(MaxLen)){ alert("["+msg+"] 한글은 "+(MaxLen/2)+"자, 영문.숫자.공백은 "+MaxLen+"자를 초과할수 없습니다."); return false; }else{ return true; } } //문자열길이 구하기(한글은 2자리로 계산) function getLength(str){ if(str==""){return 0;} var len=0; for(var i=0;i0 && chr<255){ len=len+1; }else{ len=len+2; } } return len; } //컨트롤에 포커스주기 function setFocus(obj){ if(!obj){return;} if(obj.disabled==true){return;} if(obj.type=="hidden"){return;} if(obj.length!=null){ obj[0].focus(); }else{ obj.focus(); } } //컨트롤에 포커스주기 function setFocusObject(){ var focusObjID = document.getElementsByName("focusObj")[0]; var focusObj = null; if(focusObjID != null){ focusObj = document.getElementsByName(focusObjID.value)[0]; if(focusObj != null){ focusObj.focus(); } } alerMessageActionDetach("dv_modal",setFocusObject); WizModalClose(); } /*************************************************** 함수명 : ltrim 기능 : 왼쪽 공백 제거 ***************************************************/ String.prototype.ltrim = function() { var re = /\s*((\S+\s*)*)/; return this.replace(re, "$1"); } /*************************************************** 함수명 : rtrim 기능 : 오른쪽 공백 제거 ***************************************************/ String.prototype.rtrim = function() { var re = /((\s*\S+)*)\s*/; return this.replace(re, "$1"); } /*************************************************** 함수명 : trim 기능 : 공백 제거 ***************************************************/ String.prototype.trim = function() { return this.ltrim().rtrim(); } /*************************************************** 함수명 : selectInit(obj,value) 기능 : 콤보 박스를 해당 값으로 선택되도록 하는 기능 파라미터 : obj - select Object , value - 선택되어질 값 ***************************************************/ function selectInit(pObj, pValue){ var obj = document.getElementById(pObj); var objCol = obj.options for (idx = 0 ; idx < objCol.length ; idx++){ if(objCol[idx].value == pValue){ objCol[idx].selected = true; return true; } } return false; } /*************************************************** 함수명 : radionInit(obj,value) 기능 : 라디오 버튼을 해당 값으로 선택되도록 하는 기능 파라미터 : obj - select Object , value - 선택되어질 값 ***************************************************/ function radioInit(pObj, pValue){ var objCol = document.getElementsByName(pObj); for (idx = 0 ; idx < objCol.length ; idx++){ if(objCol[idx].value==pValue) objCol[idx].checked=true; } } /*************************************************** 함수명 : radionInit(obj,value) 기능 : 라디오 버튼을 해당 값으로 선택되도록 하는 기능 파라미터 : obj - select Object , value - 선택되어질 값 ***************************************************/ function radioValue(pObj){ var objCol = document.getElementsByName(pObj); for (idx = 0 ; idx < objCol.length ; idx++){ if(objCol[idx].checked){ return objCol[idx].value; } } return ""; } /*************************************************** 함수명 : fileUpload() 기능 : 파일 업로드 ***************************************************/ function getLocale(){ var v_cookie = getCookieName("clientlanguage"); if(v_cookie == null) v_cookie = "kr"; return v_cookie; } /*************************************************** 함수명 : fileUpload() 기능 : 파일 업로드 ***************************************************/ /*function fileUpload(module,callback,limitsize, w, h){ //var winsize = "width=300,height=200,status=yes,scrollbars=no"; var reqUrl = "/bas/fileupload.do?_method=uploadForm"; reqUrl +="&module="+module; reqUrl +="&limitSize="+limitsize; reqUrl +="&callback="+callback; popupWindow(reqUrl, w, h); } */ /*************************************************** 함수명 : fileUpload() 기능 : 파일 업로드 (이미지 업로드) params : module => 모듈명 (해당 폴더가 생김) callback => 업로드 후 호출되는 함수 limitsize => 파일 용량 제한 (kb단위) ***************************************************/ function fileUpload(module,callback,limitsize){ //var winsize = "width=300,height=200,status=yes,scrollbars=no"; var reqUrl = "/"+ getLocale() + "/bas/fileupload.do?_method=uploadForm"; reqUrl +="&module="+module; reqUrl +="&limitSize="+limitsize; reqUrl +="&callback="+callback; var w = 360; var h = 260; popupWindow("upload",reqUrl, w, h); } /*************************************************** 함수명 : fileUpload() 기능 : 파일 업로드 (확장자 제한) params : module => 모듈명 (해당 폴더가 생김) callback => 업로드 후 호출되는 함수 limitsize => 파일 용량 제한 (kb단위) exts => 파일 확장자 제한 ***************************************************/ function fileUpload_Ext(module,callback,limitsize,exts){ //var winsize = "width=300,height=200,status=yes,scrollbars=no"; var reqUrl = "/"+ getLocale() +"/bas/fileupload.do?_method=uploadForm"; reqUrl +="&module="+module; reqUrl +="&limitSize="+limitsize; reqUrl +="&callback="+callback; reqUrl +="&exts="+exts; var w = 360; var h = 260; popupWindow("upload",reqUrl, w, h); } /*************************************************** 함수명 : fileUpload_FullExt() 기능 : 파일 업로드 (게시판 용 : 파일 업로드 가능 파일 확장자 지정 ) ***************************************************/ function fileUpload_FullExt(module,callback,limitsize){ //var winsize = "width=300,height=200,status=yes,scrollbars=no"; var reqUrl = "/"+ getLocale() +"/bas/fileupload.do?_method=uploadForm"; var exts = "txt,doc,xls,ppt,docx,pptx,xlsx,hwp,gul,hpt,hst,pdf,jpg,gif,bmp,png,zip,alz"; reqUrl +="&module="+module; reqUrl +="&limitSize="+limitsize; reqUrl +="&callback="+callback; reqUrl +="&exts="+exts; var w = 360; var h = 260; popupWindow("upload",reqUrl, w, h); } /*************************************************** 기능 : Div 위치 설정 및 숨김 ****************************************************/ //Div 숨김 function closeDivShow(objID){ var iframeObj = document.getElementById("ifPopup"); document.getElementById(objID).style.display = "none"; if(iframeObj != null && ie6_common){ document.body.removeChild(iframeObj); } } //스크롤 설정과 DIV설정 function setDivShow(iframe_name, div_name, popup_url, ctl_pos){ if(iframe_name != '' && popup_url != '') document.getElementById(iframe_name).src = popup_url; //주소이동 var topMenuTerm = 150; //탑메뉴 높이는 빼야함 var setScrollPos = 0 ; if(iframe_name != '') setScrollPos = ctl_pos.y - parseInt(document.getElementById(iframe_name).height); else setScrollPos = ctl_pos.y if(setScrollPos < 0) setScrollPos = ctl_pos.y - topMenuTerm; //alert(document.body.scrollTop + ":" + setScrollPos); document.body.scrollTop = setScrollPos; //스크롤위치 document.getElementById(div_name).style.top = ctl_pos.y +"px"; //위치설정 document.getElementById(div_name).style.left = ctl_pos.x +"px"; //위치설정 document.getElementById(div_name).style.display = "block"; //DIV 활성화 //document.getElementById(div_name).style.visibility = "visible"; } //위치설정함수 function Point(iX, iY){ this.x = iX; this.y = iY; } //콘트롤위치 찾기 function findCtlPos(ctl_obj){ var pos = null; var curleft = 0; var curtop = 0; var ctl_height = parseInt(ctl_obj.offsetHeight); if(ctl_obj.offsetParent){ while(ctl_obj.offsetParent){ //부모노드가 있을때까지 돕니다(없다면 루트죠) curleft += ctl_obj.offsetLeft; //부모노드로 부터 X좌표를 구합니다. curtop += ctl_obj.offsetTop; //부모노드로 부터 X좌표를 구합니다. ctl_obj = ctl_obj.offsetParent; //현재노드값에 부모노드를 대입합니다. } } else if(ctl_obj.x && ctl_obj.x){ curleft += ctl_obj.x; curtop += ctl_obj.y; } curtop = parseInt(curtop)+ctl_height+1 pos = new Point(curleft, curtop); return pos; } //콘트롤위치 찾기 function findNormalPos(w,h){ var pos = null; var SH = screen.availHeight ; var SW = screen.availWidth ; var curLeft = 0; var curTop = 0; var BT = (document.documentElement.scrollTop == 0 ? document.body.scrollTop : document.documentElement.scrollTop); var BL = (document.documentElement.scrollLeft == 0 ? document.body.scrollLeft : document.documentElement.scrollLeft); curLeft = ((document.documentElement.clientWidth - w) / 2) + BL; curTop = ((document.documentElement.clientHeight - h) / 2) + BT; pos = new Point(curLeft, curTop); return pos; } function center(){ var x,y; if (self.innerHeight) { // IE 외 모든 브라우저 x = (screen.availWidth - self.innerWidth) / 2; y = (screen.availHeight - self.innerHeight) / 2; }else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict 모드 x = (screen.availWidth - document.documentElement.clientWidth) / 2; y = (screen.availHeight - document.documentElement.clientHeight) / 2; }else if (document.body) { // 다른 IE 브라우저( IE < 6) x = (screen.availWidth - document.body.clientWidth) / 2; y = (screen.availHeight - document.body.clientHeight) / 2; } pos = new Point(x, y); return pos; } /*************************************************** 함수명 : is_valid_email() 기능 : 이메일 유효성 체크 ***************************************************/ function is_valid_email(email) { var pattern = /^[_a-zA-Z0-9-\.]+@[\.a-zA-Z0-9-]+\.[a-zA-Z]+$/; return (pattern.test(email)) ? true : false; } /*************************************************** 함수명 : popupWindow 기능 : 팝업 ***************************************************/ function popupWindow(winname, reqUrl, w, h){ var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; var winsize = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no,resizable'; var newWin = window.open(reqUrl,winname,winsize); newWin.focus(); } /*************************************************** 함수명 : popupWindowS 기능 : 팝업 (스크롤 포함) ***************************************************/ function popupWindowS(winname, reqUrl, w, h, s){ var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; var winsize = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+s+',resizable'; var newWin = window.open(reqUrl,winname,winsize); newWin.focus(); } /*************************************************** 함수명 : delCookie 기능 : 쿠키 ***************************************************/ function delCookie(name,value,expires,path,domain,secure) { document.cookie = name + "=" + escape (value) + ((expires) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } /*************************************************** 함수명 : setCookie 기능 : 쿠키 설정 ***************************************************/ function setCookie (name,value,expires,path,domain,secure) { document.cookie = name + "=" + escape (value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } /*************************************************** 함수명 : getCookieVal 기능 : 쿠키 값 순서에 의해 가져오기 ***************************************************/ function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } /*************************************************** 함수명 : getCookieName 기능 : 쿠키 값 이름으로 가져오기 ***************************************************/ function getCookieName (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } /*************************************************** 함수명 : inputNumber() 기능 : input box에 숫자만 입력할 수 있도록 하는 기능 ***************************************************/ function inputNumber(){ if((event.keyCode<48) || (event.keyCode>57)) { if(event.keyCode == 13) event.returnValue=true; else event.returnValue=false; } } /*************************************************** 함수명 : gotoFileLink() 기능 : Upload 파일 링크 (한글 파일명일 경우 필수 사용) ***************************************************/ function gotoFileLink(pObj, pLink){ var v_filePath= pLink; var v_idx = 0 ; var v_fileName = null; if(pLink != null && pLink !=""){ v_idx = v_filePath.lastIndexOf("/"); v_fileName = pLink.substring(v_idx+1); //파일명 v_filePath = pLink.substring(0,v_idx+1); //파일경로 } pObj.target = "_blank"; pObj.href = v_filePath + encodeURIComponent(v_fileName); } /*************************************************** 함수명 : showForm 기능 : form 띄우기 ***************************************************/ function showForm(objID, w, h){ var obj = document.getElementById(objID); var pos = findNormalPos(w,h); setDivShow('', objID, '', pos); } /*************************************************** 함수명 : createIframe 기능 : select element 에 div 띄우기 위하여 iframe 생성 파라미터 : pos - point 객체 w - 너비 h - 높이 ***************************************************/ function createIframe(pos, w, h){ if(ie6_common){ var iframeObj = document.getElementById("ifPopup"); if(iframeObj != null && ie6_common){ document.body.removeChild(iframeObj); } iframeObj = document.createElement("iframe"); iframeObj.src = "/blank.html"; //ssl 보안 경고 문구 없애기 위해 iframeObj.id = "ifPopup"; iframeObj.style.top = pos.y + 8; iframeObj.style.left = pos.x + 8; iframeObj.style.width = w; iframeObj.style.height = h; iframeObj.style.position = "absolute"; iframeObj.frameBorder = 0; iframeObj.style.zIndex = 2; document.body.appendChild(iframeObj); } } /*************************************************** 함수명 : resizeIframe 기능 : select element 에 div 띄우기 위하여 iframe 생성한 iframe 크기 재조정 파라미터 : w - 너비 h - 높이 ***************************************************/ function resizeIframe(w,h){ if(ie6_common){ var iframeObj = document.getElementById("ifPopup"); iframeObj.style.height = h; iframeObj.style.width = w; } } 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 open_main_popup(url,window_name,param){ if ( getCookie(window_name) != "done" ) { noticeWindow = window.open(url,window_name,param); } } /*************************************************** 함수명 : checkByteInput 기능 : 입력 내용 바이트 수 체크 param : objID - input object 아이디 displayID - byte 표기 할 object ID maxByte - 최대 바이트 수 ***************************************************/ function checkByte(objID,displayID, maxByte){ var inputObj = document.getElementsByName(objID)[0]; var byteObj = document.getElementById(displayID); var v_byte = maxByte; if(inputObj !=null){ v_byte = StringUtils.getByteLength(inputObj.value); if(v_byte > maxByte){ alert(maxByte+"byte를 초과하였습니다."); inputObj.value = StringUtils.getLimitChar(inputObj.value, maxByte); v_byte = StringUtils.getByteLength(inputObj.value); } byteObj.innerHTML = v_byte; } } function imageClear(pObj){ pObj.onerrorr = pObj.style.display = "none"; } /*************************************************** 함수명 : closePopup 기능 : 팝업 창 닫기 ***************************************************/ function closePopup(pID){ var endDate = new Date(); var v_domain = document.domain; v_domain = v_domain.substring(v_domain.indexOf(".")+1); endDate.setDate(endDate.getDate()+1); endDate.setHours(0); endDate.setMinutes(0); endDate.setMilliseconds(0); setCookie(pID,"done",endDate,"/",v_domain,""); window.close(); } /*************************************************** 함수명 : popupWindowLeft 기능 : left 정렬 ***************************************************/ function popupWindowLeft(winname, reqUrl,height,width, top, left, scroll){ var winsize = 'height='+height+',width='+width+',top='+top+',left='+left+',scrollbars='+scroll+',resizable'; window.open(reqUrl,winname,winsize); }