PageSourceSearch

https://www.stagesafety.or.kr/public/common/js/common.js

js stagesafety.or.kr collected 2026-10-08 02:11:49 UTC 142,902 bytes, 5,203 lines download raw bytes

1/**
2* 객체 데이터의 값을 escape 처리한다.
3*
4* @Description : 객체 데이터의 값을 escape 처리한다.
5* @param data escape 처리할 객체
6* @return 값이 escape 처리된 객체
7*
8*/
9function escapeData(data){ // 데이터를 escape 처리함.
10    return JSON.parse($('<div/>').text(JSON.stringify(data)).html());
11}
12
13function XSSCheck(str, level) {
14	if (level == undefined || level == 0) {
15		str = str.replace(/\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-/g,"");
16	} else if (level != undefined && level == 1) {
17		str = str.replace(/\</g, "&lt;");
18		str = str.replace(/\>/g, "&gt;");
19    }
20    return str;
21}
22
23
24/**
25	 * 문자열을 파라메터로 받아서 UTF-8형식으로 변화하여 리턴시켜준다
26	 * @since 10.01.27
27	 * @param str
28	 * @return 변환된 UTF-8형식 데이터
29	 */
30	function toUTF8(str){
31	    var s0, i, s, u;
32	    s0 = "";                // encoded str
33	    for (i = 0; i < str.length; i++){   // scan the source
34	        s = str.charAt(i);
35	        u = str.charCodeAt(i);          // get unicode of the char
36	        if (s == " "){s0 += "+";}       // SP should be converted to "+"
37	        else {
38	            if ( u == 0x2a || u == 0x2d || u == 0x2e || u == 0x5f || ((u >= 0x30) && (u <= 0x39)) || ((u >= 0x41) && (u <= 0x5a)) || ((u >= 0x61) && (u <= 0x7a))){       // check for escape
39	                s0 = s0 + s;            // don't escape
40	            }
41	            else {                  // escape
42	                if ((u >= 0x0) && (u <= 0x7f)){     // single byte format
43	                    s = "0"+u.toString(16);
44	                    s0 += "%"+ s.substr(s.length-2);
45	                }
46	                else if (u > 0x1fffff){     // quaternary byte format (extended)
47	                    s0 += "%" + (0xf0 + ((u & 0x1c0000) >> 18)).toString(16);
48	                    s0 += "%" + (0x80 + ((u & 0x3f000) >> 12)).toString(16);
49	                    s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);
50	                    s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
51	                }
52	                else if (u > 0x7ff){        // triple byte format
53	                    s0 += "%" + (0xe0 + ((u & 0xf000) >> 12)).toString(16);
54	                    s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);
55	                    s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
56	                }
57	                else {                      // double byte format
58	                    s0 += "%" + (0xc0 + ((u & 0x7c0) >> 6)).toString(16);
59	                    s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
60	                }
61	            }
62	        }
63	    }
64	    return s0;
65	}
66
67    /**
68     * 문자열의 byte length를 얻는다.
69     *
70     * @param   str 문자열
71     * @return  byte length
72     * @author  marie
73     */
74    function jsByteLength(str) {
75        if (str == "") {
76            return  0;
77        }
78
79        var bytes = 0;
80
81        for (var i = 0; i < str.length; i++) {
82        	code=str.charCodeAt(i);
83			if (code < 128) {
84				bytes += 1;
85			}else if (code < 2048){
86				bytes += 2;
87			}else if (code < 65536){
88				bytes += 2;
89			}else{
90				bytes += 2;
91			}
92        }
93
94        return  bytes;
95    }
96
97    /**
98     * Object에 값을 세팅한다.
99     *
100     * @param   obj
101     * @param   value
102     */
103    function jsSetValue(obj, value) {
104        if (obj) {
105            if (obj.type == "text") {
106                obj.value = value;
107            } else if (obj.tagName == "SELECT") {
108                for (var i = 0; i < obj.length; i++) {
109                    if (obj.options[i].value == value) {
110                        obj.options[i].selected = true;
111                        break;
112                    }
113                }
114            }
115        }
116    }
117
118    /**
119     * 주민등록번호를 체크한다.
120     *
121     * @param   obj 주민등록번호 필드
122     * @return  true - 올바른 번호
123     *          false - 틀린 번호
124     */
125    function jsCheckJumin1(obj) {
126        var str = deleteHyphen(obj.value);  // 필드에 있는 주민번호에서 '-'제거
127
128        if( !jsCheckJumin(str) ) {
129            alert("잘못된 주민등록번호입니다.");
130            obj.value="";
131            //obj.focus();
132            if (window.event) {
133                window.event.returnValue = false;
134            }
135            return  false;
136        }
137
138        obj.value = str;
139        return  true;
140    }
141
142    /**
143     * 주민등록번호를 체크한다.
144     *
145     * @param   str 주민등록번호
146     * @return  true - 올바른 번호
147     *          false - 틀린 번호
148     */
149    function jsCheckJumin(str) {
150        var tmp = 0;
151        var sex = str.substring(6, 7);
152        var birthday;
153
154        if (str.length != 13) {
155            return  false;
156        }
157
158        if (sex == 1 || sex == 2 || sex == 5 || sex == 6) {
159            birthday = "19" + str.substring(0, 6);
160        } else if (sex == 3  || sex == 4 || sex == 7 || sex == 8) {
161            birthday = "20" + str.substring(0, 6);
162        } else {
163            return  false;
164        }
165
166        if (!isDate(birthday)) {
167            return  false;
168        }
169
170        for (var i = 0; i < 12 ; i++) {
171            tmp = tmp + ((i%8+2) * parseInt(str.substring(i,i+1)));
172        }
173
174        tmp = 11 - (tmp %11);
175        tmp = tmp % 10;
176
177        if (tmp != str.substring(12, 13)) {
178            return  false;
179        }
180
181        return  true;
182    }
183
184    // 사업자등록번호 검사
185    function checkBizNo(bizno)
186    {
187  	   bizno = deleteHyphenStr(bizno);
188       var pattern = /(^[0-9]{10}$)/;
189       if (!pattern.test(bizno))
190       {
191       		message = "사업자등록번호를 10자리 숫자로 입력해 주십시오.";
192			return false;
193       }
194       else
195       {
196            var sum = 0;
197            var at = 0;
198            var att = 0;
199            var saupjano= bizno;
200            sum = (saupjano.charAt(0)*1)+
201                  (saupjano.charAt(1)*3)+
202                  (saupjano.charAt(2)*7)+
203                  (saupjano.charAt(3)*1)+
204                  (saupjano.charAt(4)*3)+
205                  (saupjano.charAt(5)*7)+
206                  (saupjano.charAt(6)*1)+
207                  (saupjano.charAt(7)*3)+
208                  (saupjano.charAt(8)*5);
209            sum += parseInt((saupjano.charAt(8)*5)/10);
210            at = sum % 10;
211            if (at != 0)
212                att = 10 - at;
213
214            if (saupjano.charAt(9) != att)
215            {
216               return false;
217
218            }
219
220        }
221        return true;
222    }
223
224    /**
225     * 주민등록번호 유효성 검사
226     * 2014-07-18 :주민번호 뒷자리 1,2,3,4 대응 가능
227     * @param v_juminNumber : 검사대상 주민등록번호
228     */
229    function jsCheckJuminNumber(v_juminNumber){
230    	var flag = true;
231    	var checkType; //내,외국인 구분
232    	var regExp = /^[0-9]{13}$/;
233
234    	if (!regExp.test(v_juminNumber)) { //길이체크
235    	   alert("주민등록번호는 13자리 숫자만 입력가능합니다.");
236    	   flag = false;
237    	} else {
238    		checkType = v_juminNumber.substring(6,7);
239
240    		if(checkType == '5' || checkType == '6' || checkType == '7' || checkType == '8') { //외국인 인경우
241    			var sum = 0;
242    		    var odd = 0;
243
244    		    buf = new Array(13);
245    		    for (var i = 0; i < 13; i++) buf[i] = parseInt(v_juminNumber.charAt(i));
246
247    		    odd = buf[7]*10 + buf[8];
248
249    		    if (odd%2 != 0) {
250    		    	flag =  false;
251    		    }
252
253    		    if ((buf[11] != 6)&&(buf[11] != 7)&&(buf[11] != 8)&&(buf[11] != 9)) {
254    		    	flag =  false;
255    		    }
256
257    		    multipliers = [2,3,4,5,6,7,8,9,2,3,4,5];
258    		    for (i = 0, sum = 0; i < 12; i++) sum += (buf[i] *= multipliers[i]);
259
260    		    sum=11-(sum%11);
261
262    		    if (sum>=10) sum-=10;
263
264    		    sum += 2;
265
266    		    if (sum>=10) sum-=10;
267
268    		    if ( sum != buf[12]) {
269    		    	flag =  false;
270    		    }
271
272    		} else { //내국인
273    			var sum = 0;
274    	    	var array = [2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5]; // 주민등록번호 유효성 검사 값
275    	    	var perNumber;
276    	    	var checkNum;
277
278    			for (var i=0;i<12;i++) { //1~12 번째자리까지만 체크, 마지막 자리는 버림
279    				sum += v_juminNumber.charAt(i) * array[i];
280    			}
281
282    			perNumber =  sum % 11;
283    			checkNum = 11 - perNumber;
284
285    			if (checkNum > 9) {
286    				checkNum = checkNum -10;
287    			}
288
289    			if (checkNum != v_juminNumber.charAt(12)) {
290    				flag = false;
291    			}
292    		}
293
294    		if(!flag) alert("주민등록번호를 다시 확인해 주십시오.");
295    	}
296
297    	return flag;
298    }
299
300    /**
301     * 사용자(USR ID, 사용자명) 검색 팝업창을 띄운다.
302     *
303     * @param   column 컬럼명
304     *          USR_IDNO USR ID
305     *          USR_NAME 사용자명
306     * @param   keyWord 검색어
307     * @param   fn 펑션명
308     * @use     function setSmuser(userId, userName) { }
309     */
310    function jsSmuser(column, keyWord, fn) {
311        var url = "/SystemServlet?cmd=LssmuserPopup&column=" + column + "&keyWord=" + keyWord + "&fn=" + fn;
312        var name = "";
313        var features = "width=600,height=550,scrollbars=yes,top=100,left=100";
314        var popupWin = window.open(url, name, features);
315        centerSubWindow(popupWin, 600, 550);
316        popupWin.focus();
317    }
318
319
320
321    /**
322     * 팝업창을 띄운다.
323     *
324     * @param   theURL
325     *          theName
326     *          features
327     */
328    function openWindow(theURL,theName,features) { //v2.0
329      window.open(theURL,theName,features);
330    }
331
332
333
334    /**
335     * 오직 숫자로만 이루어져 있는지 체크 한다.
336     *
337     * @param   num
338     * @return  boolean
339     */
340    function isNumber(num) {
341        var reg = RegExp(/^(\d|-)?(\d|,)*\.?\d*$/);
342
343        if (reg.test(num)) {
344            return  true;
345        }
346
347        return  false;
348    }
349
350    /**
351     * 정수 체크
352     *
353     * 1. +, - 부호를 생략하거나 넣을 수 있다 : ^[\+-]?
354     * 2. 0에서 9까지 숫자가 0번 이상 올 수 있다 : [0-9]*
355     * 3. 마지막은 숫자로 끝나야 한다 : [0-9]$
356     *
357     * @param   num
358     * @return  boolean
359     */
360    function isInteger(num) {
361        re = /^[\+-]?[0-9]*[0-9]$/;
362
363        if (re.test(num)) {
364            return  true;
365        }
366
367        return  false;
368    }
369
370    /**
371     * 유리수 체크
372     *
373     * 1. +, - 부호를 생략하거나 넣을 수 있다 : ^[\+-]?
374     * 2. 0에서 9까지 숫자가 0번 이상 올 수 있다 : [0-9]*
375     * 3. 소수점을 넣을 수 있다 : [.]?
376     * 4. 소수점 이하 자리에 0에서 9까지 숫자가 올 수 있다 : [0-9]*
377     * 5. 마지막은 숫자로 끝나야 한다 : [0-9]$
378     *
379     * @param   num
380     * @return  boolean
381     */
382    function isFloat(num) {
383        re = /^[\+-]?[0-9]*[.]?[0-9]*[0-9]$/;
384
385        if (re.test(num)) {
386            return  true;
387        }
388
389        return  false;
390    }
391
392    /**
393     * 유리수 체크2
394     *
395     * 1. 0에서 9까지 숫자가 0번 이상 올 수 있다 : [0-9]*
396     * 2. 소수점을 넣을 수 있다 : [.]?
397     * 3. 소수점 이하 자리에 0에서 9까지 숫자가 올 수 있다 : [0-9]*
398     * 4. 마지막은 숫자로 끝나야 한다 : [0-9]$
399     *
400     * @param   num
401     * @return  boolean
402     */
403    function isFloat2(num) {
404        re = /^[0-9]*[.]?[0-9]*[0-9]$/;
405
406        if (re.test(num)) {
407            return  true;
408        }
409
410        return  false;
411    }
412
413    /**
414     * 이메일 체크
415     *
416     * @param   email
417     * @return  boolean
418     */
419    function isEmail(email) {
420        re = /^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$/i;
421
422        if (re.test(email)) {
423        	if(isEmailChceck(email)){
424        		return true;
425            }
426        }
427
428        return  false;
429    }
430
431    /**
432     * 이메일 주소 체크 - 정밀하게
433     */
434    function isEmailChceck(emailStr) {
435        var checkTLD=1;
436        var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum|kr|co.kr|com|net|org|pro|so|biz|asia|cn|jp|me|in|eu|info|xxx|sx|or.kr|pe.kr|ne.kr|re.kr|cc|tv|name|mobi|tw|pw|co|ac|ru|co.in|net.in|com.cn|net.cn|co.jp|or.jp|co.id|id|)$/;
437        var emailPat=/^(.+)@(.+)$/;
438        var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
439        var validChars="\[^\\s" + specialChars + "\]";
440        var quotedUser="(\"[^\"]*\")";
441        var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
442        var atom=validChars + '+';
443        var word="(" + atom + "|" + quotedUser + ")";
444        var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
445        var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
446        var matchArray=emailStr.match(emailPat);
447		var blank_filter = /[\s]/g;
448
449        if (matchArray==null) {
450            return false;
451        }
452
453        var user=matchArray[1];
454        var domain=matchArray[2];
455
456        for (i=0; i<user.length; i++) {
457            if (user.charCodeAt(i)>127) {
458                return false;
459            }
460        }
461        for (i=0; i<domain.length; i++) {
462            if (domain.charCodeAt(i)>127) {
463                return false;
464            }
465        }
466
467        if (user.match(userPat)==null) {
468            return false;
469        }
470
471        var IPArray=(domain).match(ipDomainPat);
472
473        if (IPArray!=null) {
474            for (var i=1;i<=4;i++) {
475                if (IPArray[i]>255) {
476                    return false;
477                }
478            }
479            return true;
480        }
481
482        var atomPat=new RegExp("^" + atom + "$");
483        var domArr=domain.split(".");
484        var len=domArr.length;
485
486        for (i=0;i<len;i++) {
487            if (domArr[i].search(atomPat) == -1) {
488                return false;
489            }
490        }
491
492        if ((domArr[domArr.length-1]).toLowerCase().search(knownDomsPat) == -1) {
493            return false;
494        }
495
496        if (len < 2) {
497        	return false;
498        }
499
500        return true;
501    }
502
503    /**
504     * 이메일 주소 체크 - 정밀하게
505     */
506    function emailCheck(emailStr) {
507        var checkTLD=1;
508        var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum|kr|co.kr|com|net|org|pro|so|biz|asia|cn|jp|me|in|eu|info|xxx|sx|or.kr|pe.kr|ne.kr|re.kr|cc|tv|name|mobi|tw|pw|co|ac|ru|co.in|net.in|com.cn|net.cn|co.jp|or.jp|co.id|id|)$/;
509        var emailPat=/^(.+)@(.+)$/;
510        var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
511        var validChars="\[^\\s" + specialChars + "\]";
512        var quotedUser="(\"[^\"]*\")";
513        var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
514        var atom=validChars + '+';
515        var word="(" + atom + "|" + quotedUser + ")";
516        var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
517        var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
518        var matchArray=emailStr.match(emailPat);
519
520        //var sp_filter =  /[~!`\#$,?%<>{|/}^&*\()\=+_\']/gi;
521		var blank_filter = /[\s]/g;
522
523	    //var chk_sp  =  sp_filter.test(emailStr);
524
525	    //if(chk_sp ){
526	  	  	  //alert("이메일 주소에 특수문자를 사용하실 수 없습니다.");
527			  //return false;
528		//}
529
530        if (matchArray==null) {
531            alert("이메일 주소가 정확하지 않습니다.");
532            return false;
533        }
534        var user=matchArray[1];
535        var domain=matchArray[2];
536        for (i=0; i<user.length; i++) {
537            if (user.charCodeAt(i)>127) {
538                alert("잘못된 이메일 주소를 입력 하셨습니다.");
539                return false;
540            }
541        }
542        for (i=0; i<domain.length; i++) {
543            if (domain.charCodeAt(i)>127) {
544                alert("도메인 이름이 잘못 기재 되었습니다.");
545                return false;
546            }
547        }
548        if (user.match(userPat)==null) {
549            alert("이메일 주소가 아닙니다.");
550            return false;
551        }
552        var IPArray=domain.match(ipDomainPat);
553        if (IPArray!=null) {
554            for (var i=1;i<=4;i++) {
555                if (IPArray[i]>255) {
556                    alert("IP주소가 틀립니다!");
557                    return false;
558                }
559            }
560            return true;
561        }
562        var atomPat=new RegExp("^" + atom + "$");
563        var domArr=domain.split(".");
564        var len=domArr.length;
565        for (i=0;i<len;i++) {
566            if (domArr[i].search(atomPat)==-1) {
567                alert("도메인이 존재 하지 않습니다.");
568                return false;
569            }
570        }
571//        if (checkTLD && domArr[domArr.length-1].length!=2 &&
572//            domArr[domArr.length-1].search(knownDomsPat)==-1) {
573        if (domArr[domArr.length-1].search(knownDomsPat)==-1) {
574            alert("이메일 형식에 맞지 않습니다.");
575            return false;
576        }
577        if (len<2) {
578        alert("이메일의 Hostname이 틀립니다.");
579        return false;
580        }
581
582        return true;
583    }
584
585    /**
586     * 날짜 체크
587     *
588     * @param   date
589     * @return  boolean
590     */
591    function isDate(date) {
592        if (date == null || date.length != 8) {
593            return  false;
594        }
595
596        if (!isNumber(date)) {
597            return  false;
598        }
599
600        var year = parseInt(date.substring(0, 4));
601        var month = parseInt(date.substring(4, 6));
602        var day = parseInt(date.substring(6, 8));
603
604		if(year == "0000") {
605			return false;
606		}
607
608        if (month > 12 || month == "00") {
609            return  false;
610        }
611
612        var totalDays;
613
614        switch (month){
615
616            case 1 :
617                totalDays = 31;
618                break;
619            case 2 :
620                if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
621                    totalDays = 29;
622                else
623                    totalDays = 28;
624                break;
625            case 3 :
626                totalDays = 31;
627                break;
628            case 4 :
629                totalDays = 30;
630                break;
631            case 5 :
632                totalDays = 31;
633                break;
634            case 6 :
635                totalDays = 30;
636                break;
637            case 7 :
638                totalDays = 31;
639                break;
640            case 8 :
641                totalDays = 31;
642                break;
643            case 9 :
644                totalDays = 30;
645                break;
646            case 10 :
647                totalDays = 31;
648                break;
649            case 11 :
650                totalDays = 30;
651                break;
652            case 12 :
653                totalDays = 31;
654                break;
655        }
656
657        if (day > totalDays) {
658            return  false;
659        }
660
661        if (day == "00") {
662            return  false;
663        }
664
665        return  true;
666    }
667
668    /**
669     * 두 날짜간의 일 차이를 반환한다.
670     * Date형으로 반환한다.
671     * @param  time1, time2 -->String 형태로 입력
672     */
673    function getDayInterval(time1,time2)
674    {
675    	var date1 = toTimeObject(time1);
676    	var date2 = toTimeObject(time2);
677    	var day   = 1000 * 3600 * 24; //24시간
678
679    	return parseInt((date2 - date1) / day, 10);
680    }
681
682    /**
683     * 스트링 날짜를 받아서(예, YYYYMMDD, YYYYMMDDHH, YYYYMMDDHHII)
684     * Date형으로 반환한다.
685     * @param  time
686     */
687	function toTimeObject(time)
688	{
689		var year  = time.substr(0,4);
690		var month = time.substr(4,2) - 1; // 1월=0,12월=11
691		var day   = time.substr(6,2);
692		var hour  = time.substr(8,2);
693		var min   = time.substr(10,2);
694
695		return new Date(year,month,day,hour,min);
696	}
697
698    /**
699     * 숫자에 comma를 붙인다.
700     *
701     * @param   obj
702     */
703    function addComma(obj) {
704        obj.value = trim(obj.value);
705        var value = obj.value;
706
707        if (value == "") {
708            return;
709        }
710
711        value = deleteCommaStr(value);
712
713        if (!isFloat(value)) {
714            dispName = obj.getAttribute("dispName");
715
716            if (dispName == null) {
717                dispName = "";
718            }
719
720            var manyLanguage=dispName + " 형식이 올바르지 않습니다.";
721            alert(manyLanguage);
722            obj.value = "0";
723            obj.focus();
724            if (window.event) {
725                window.event.returnValue = false;
726            }
727            return;
728        }
729
730        obj.value = addCommaStr(value);
731    }
732
733    /**
734     * 숫자에 comma를 붙인다.
735     */
736    function addComma2() {
737        var obj = window.event.srcElement;
738        addComma(obj);
739    }
740
741    /**
742     * 숫자에 comma를 붙인다.
743     *
744     * @param   str
745     */
746    function addCommaStr(str) {
747        var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])');
748        var arrNumber = str.split('.');
749        arrNumber[0] += '.';
750        do {
751            arrNumber[0] = arrNumber[0].replace(rxSplit, '$1,$2');
752        } while (rxSplit.test(arrNumber[0]));
753
754        if (arrNumber.length > 1) {
755            replaceStr = arrNumber.join("");
756        } else {
757            replaceStr = arrNumber[0].split(".")[0];
758        }
759        return replaceStr;
760    }
761
762    /**
763     * 숫자에 comma를 붙인다.(음수 양수 상관없이)
764     *
765     * @param   obj
766     */
767    function addComma3(amount) {
768    	var total_amount = String(amount);  //받은 숫자를 문자로 변환
769	    var amount_len = total_amount.length;
770	    var b = 0;
771	    var dot_amount = "";
772	    var per = (amount_len % 3);
773
774	    if (per <= 0) {
775	        per = 3;
776	    }
777
778	    for (a = 0; a < amount_len; a++) {
779	        dot_amount += total_amount.charAt(a);
780
781	        if (a == (3 * b) + (per - 1)) {
782	            if (total_amount.charAt(a) != "-" && a != amount_len - 1)
783	                dot_amount += ",";
784	            b++;
785	        }
786	    }
787
788	    return dot_amount;
789	}
790
791    /**
792     * 숫자에서 comma를 없앤다.
793     *
794     * @param   obj
795     */
796    function deleteComma(obj) {
797        obj.value = deleteCommaStr(obj.value);
798    }
799
800    /**
801     * 숫자에서 comma를 없앤다.
802     */
803    function deleteComma2() {
804        var obj = window.event.srcElement;
805        deleteComma(obj);
806        obj.select();
807    }
808
809    /**
810     * 숫자에서 comma를 없앤다.
811     *
812     * @param   str
813     */
814    function deleteCommaStr(str) {
815        var temp = '';
816
817        for (var i = 0; i < str.length; i++) {
818            if (str.charAt(i) == ',') {
819                continue;
820            } else {
821                temp += str.charAt(i);
822            }
823        }
824
825        return  temp;
826    }
827
828     /**
829     * 숫자에서 하이폰(-)를 없앤다.
830     *
831     * @param   str
832     */
833    function deleteHyphenStr(str) {
834        var temp = '';
835
836        for (var i = 0; i < str.length; i++) {
837            if (str.charAt(i) == '-') {
838                continue;
839            } else {
840                temp += str.charAt(i);
841            }
842        }
843
844        return  temp;
845    }
846
847    /**
848     * 날짜에 "/"를 붙인다.
849     *
850     * @param   obj
851     */
852    function addDateFormat(obj) {
853        var value = obj.value;
854
855        if (trim(value) == "") {
856            return;
857        }
858
859        value = deleteDateFormatStr(value);
860
861        if (!isDate(value)) {
862            dispName = obj.getAttribute("dispName");
863
864            if (dispName == null) {
865                dispName = "";
866            }
867
868            var manyLanguage=dispName + " 형식이 올바르지 않습니다.";
869            alert(manyLanguage);
870
871            obj.focus();
872
873            return;
874        }
875
876        obj.value = addDateFormatStr(value);
877    }
878
879    /**
880     * 날짜(년월)에 "/"를 붙인다.
881     *
882     * @param   obj
883     */
884    function addYmFormat(obj) {
885        var value = obj.value;
886
887        if (trim(value) == "") {
888            return;
889        }
890
891        value = deleteDateFormatStr(value);
892
893        if (!isDate(value + "01")) {
894            dispName = obj.getAttribute("dispName");
895
896            if (dispName == null) {
897                dispName = "";
898            }
899
900            var manyLanguage=dispName + " 형식이 올바르지 않습니다.";
901            alert(manyLanguage);
902            obj.focus();
903
904            return;
905        }
906
907        obj.value = addYmFormatStr(value);
908    }
909
910    /**
911     * 날짜에 "/"를 붙인다.
912     */
913    function addDateFormat2() {
914        var obj = window.event.srcElement;
915        addDateFormat(obj);
916    }
917
918    /**
919     * 날짜에 "/"를 붙인다.
920     */
921    function addYmFormat2() {
922        var obj = window.event.srcElement;
923        addYmFormat(obj);
924    }
925
926    /**
927     * 날짜에 "-"를 붙인다.
928     *
929     * @param   str
930     */
931    function addDateFormatStr(str) {
932    	if (str == null || str == "") {
933    		return "";
934    	}
935        return  str.substring(0, 4) + "-" + str.substring(4, 6) + "-" + str.substring(6, 8);
936    }
937
938    /**
939     * 날짜에 "/"를 붙이고 시간에 ":"를 붙인다.
940     *
941     * @param   str
942     */
943    function addDateTimeFormatStr(str) {
944    	if (str == null || str == "") {
945    		return "";
946    	}
947        return  str.substring(0, 4) + "-" + str.substring(4, 6) + "-" + str.substring(6, 8)
948        			+" "+ str.substring(8, 10)+ ":" + str.substring(10, 12) +":" + str.substring(12, 14) ;
949    }
950
951    /**
952     * 시간에 ":"를 붙인다.
953     *
954     * @param   str
955     */
956    function addTimeFormatStr(str) {
957    	if (str == null || str == "") {
958    		return "";
959    	}
960        return  str.substring(0, 2) + ":" + str.substring(2, 4) ;
961    }
962
963
964    /**
965     * 날짜(년월)에 "-"를 붙인다.
966     *
967     * @param   str
968     */
969    function addYmFormatStr(str) {
970        return  str.substring(0, 4) + "-" + str.substring(4, 6);
971    }
972
973    /**
974     * 날짜에 "."를 붙인다.
975     *
976     * @param   str
977     */
978    function addDateFormatStr2(str) {
979    	if (str == null || str == "") {
980    		return "";
981    	}
982        return  str.substring(0, 4) + "." + str.substring(4, 6) + "." + str.substring(6, 8);
983    }
984
985    /**
986     * 날짜에서 "/"를 없앤다.
987     *
988     * @param   obj
989     */
990    function deleteDateFormat(obj) {
991        obj.value = deleteDateFormatStr(obj.value);
992    }
993
994    /**
995     * 날짜에서 "/"를 없앤다.
996     */
997    function deleteDateFormat2() {
998        var obj = window.event.srcElement;
999        deleteDateFormat(obj);
1000        obj.select();
1001    }
1002
1003    /**
1004     * 날짜에서 "/"를 없앤다.
1005     *
1006     * @param   str
1007     */
1008    function deleteDateFormatStr(str) {
1009        var temp = '';
1010
1011        for (var i = 0; i < str.length; i++) {
1012            if (str.charAt(i) == '-') {
1013                continue;
1014            } else {
1015                temp += str.charAt(i);
1016            }
1017        }
1018
1019        return  temp;
1020    }
1021
1022    /**
1023     * trim
1024     *
1025     * @param   text
1026     * @return  string
1027     */
1028    function trim(text) {
1029        if (text == "") {
1030            return  text;
1031        }
1032
1033        var len = text.length;
1034        var st = 0;
1035
1036        while ((st < len) && (text.charAt(st) <= ' ')) {
1037            st++;
1038        }
1039
1040        while ((st < len) && (text.charAt(len - 1) <= ' ')) {
1041            len--;
1042        }
1043
1044        return  ((st > 0) || (len < text.length)) ? text.substring(st, len) : text;
1045    }
1046
1047    /**
1048     * ltrim
1049     *
1050     * @param   text
1051     * @return  string
1052     */
1053    function ltrim(text) {
1054        if (text == "") {
1055            return  text;
1056        }
1057
1058        var len = text.length;
1059        var st = 0;
1060
1061        while ((st < len) && (text.charAt(st) <= ' ')) {
1062            st++;
1063        }
1064
1065        return  (st > 0) ? text.substring(st, len) : text;
1066    }
1067
1068    /**
1069     * rtrim
1070     *
1071     * @param   text
1072     * @return  string
1073     */
1074    function rtrim(text) {
1075        if (text == "") {
1076            return  text;
1077        }
1078
1079        var len = text.length;
1080        var st = 0;
1081
1082        while ((st < len) && (text.charAt(len - 1) <= ' ')) {
1083            len--;
1084        }
1085
1086        return  (len < text.length) ? text.substring(st, len) : text;
1087    }
1088
1089    /**
1090     * 이벤트 핸들러를 등록한다.
1091     */
1092    function setEventHandler() {
1093        for (i = 0; i < document.forms.length; i++) {
1094
1095            var elements = document.forms(i).elements;
1096
1097            for (j = 0; j < elements.length; j++) {
1098                // INPUT 객체의 onblur 이벤트에 핸들러를 등록한다.
1099                if (elements(j).tagName == "INPUT") {
1100
1101                    dataType = elements(j).getAttribute("dataType");
1102
1103                    if (dataType == "date") {
1104                        elements(j).onblur = addDateFormat2;
1105                        elements(j).onfocus = deleteDateFormat2;
1106                        addDateFormat(elements(j));
1107                    } else if (dataType == "number" || dataType == "integer" || dataType == "float" || dataType == "double") {
1108                        if (elements(j).getAttribute("comma") != null) {
1109                            elements(j).onblur = addComma2;
1110                            elements(j).onfocus = deleteComma2;
1111                            addComma(elements(j));
1112                        }
1113                    } else if (dataType == "yyyymm") {
1114                        elements(j).onblur = addYmFormat2;
1115                        elements(j).onfocus = deleteDateFormat2;
1116                        addYmFormat(elements(j));
1117                    }
1118                }
1119            }
1120        }
1121    }
1122
1123    /**
1124     * 자리수의 최소값, 최대값
1125     *
1126     * 최소값만 체크 : jsRange(2, -1)
1127     * 최대값만 체크 : jsRange(-1, 10)
1128     * 최소값, 최대값 모두 체크 : jsRange(2, 10)
1129     * 최소값, 최대값 둘다 체크 안함 : jsRange(-1, -1)
1130     *
1131     */
1132    function jsRange(minValue, maxValue)
1133    {
1134        jsMinLength(minValue);
1135        jsMaxLength(maxValue);
1136    }
1137
1138    /**
1139     * 최대값
1140     */
1141    function jsMaxLength(maxValue)
1142    {
1143        var obj         = window.event.srcElement;
1144        var dispName    = obj.getAttribute("dispName");
1145        //var maxValue    = obj.getAttribute("maxValue");
1146        var val         = jsByteLength(obj.value);
1147
1148        if( val > (maxValue*2))
1149        {
1150        	var manyLanguage = dispName +" 값이 최대값("+ maxValue +")을 초과합니다.\n초과 길이 :"+ (val - (maxValue*2));
1151            alert(manyLanguage);
1152            //obj.value = "0";
1153            obj.focus();
1154            if(window.event)
1155            {
1156                window.event.returnValue = false;
1157            }
1158            return;
1159        }
1160    }
1161
1162    /**
1163     * 최소값
1164     */
1165    function jsMinLength(minValue)
1166    {
1167        var obj         = window.event.srcElement;
1168        var dispName    = obj.getAttribute("dispName");
1169        //var minValue    = obj.getAttribute("minValue");
1170        var val         = jsByteLength(obj.value);
1171        if(minValue != -1 && val < minValue)
1172        {
1173        	var manyLanguage = dispName +" 값이 최소값(" + minValue + ") 미만입니다.\n부족 길이 :"+ (minValue - val);
1174            alert(manyLanguage);
1175            //obj.value = "0";
1176            obj.focus();
1177            if(window.event)
1178            {
1179                window.event.returnValue = false;
1180            }
1181            return;
1182        }
1183    }
1184
1185    /**
1186     * 숫자이면 숫자, 숫자가 아니면 0
1187     */
1188    function nvlNumber(val)
1189    {
1190        if(val == "" || isNaN(val) || val == "undefined")
1191            return 0;
1192
1193        return Number(val);
1194    }
1195
1196    /**
1197     * 숫자형식에서 comma를 없애고, 날짜형식에서 "/" 를 없앤다.
1198     *
1199     * @param   form
1200     */
1201    function makeValue(form) {
1202        for (i = 0; i < form.elements.length; i++) {
1203            obj = form.elements(i);
1204
1205            if (obj.tagName == "INPUT") {
1206                dataType = obj.getAttribute("dataType");
1207
1208                if (dataType == "date") {
1209                    deleteDateFormat(obj);
1210                } else if (dataType == "number" || dataType == "integer" || dataType == "float" || dataType == "double") {
1211                    if (obj.getAttribute("comma") != null) {
1212                        deleteComma(obj);
1213                    }
1214                } else if (dataType == "yyyymm") {
1215                    deleteDateFormat(obj);
1216                }
1217                /// notHyphen 이라고 선언했다면 하이픈을 모두 제거한다.
1218                if(obj.getAttribute("notHyphen") != null) {
1219                    deleteHyphenObj(obj);
1220                }
1221            }
1222        }
1223    }
1224
1225    /**
1226      * 문자에서 Hyphen을 없앤다.
1227      *
1228      * @param  obj
1229      */
1230    function deleteHyphenObj(obj) {
1231        obj.value = deleteHyphen(obj.value);
1232    }
1233
1234    /**
1235     * 숫자형식에서 comma를 없애고, 날짜형식에서 "/" 를 없앤다.
1236     * 하나의 오브젝트에 대한 것임.
1237     *
1238     * @param   form
1239     * @param   obj
1240     */
1241    function makeValueObj(form, obj) {
1242        if (obj.tagName == "INPUT") {
1243            dataType = obj.getAttribute("dataType");
1244
1245            if (dataType == "date") {
1246                deleteDateFormat(obj);
1247            } else if (dataType == "number" || dataType == "integer" || dataType == "float" || dataType == "double") {
1248                if (obj.getAttribute("comma") != null) {
1249                    deleteComma(obj);
1250                }
1251            }
1252        }
1253    }
1254
1255     /**
1256      * 문자에서 Hyphen을 없앤다.
1257      *
1258      * @param   str
1259      */
1260    function deleteHyphen(str) {
1261        var temp = '';
1262
1263        for (var i = 0; i < str.length; i++) {
1264            if (str.charAt(i) == '-') {
1265                continue;
1266            } else {
1267                temp += str.charAt(i);
1268            }
1269        }
1270
1271        return  temp;
1272    }
1273
1274    /**
1275     * 주민등록번호&사업자번호에 '-'넣기
1276     */
1277     function setJuminHyphen(obj) {
1278        var str = deleteHyphen(obj.value);
1279
1280        if(str.length == 13) {  // 주민등록번호  6-7
1281            str = str.substring(0, 6) + "-" + str.substring(6);
1282        }else if(str.length == 10) { // 사업자번호 3-2-5
1283            str = str.substring(0, 3) + "-"+ str.substring(3, 5) + "-"+ str.substring(5);
1284        }
1285        obj.value = str;
1286     }
1287
1288    /**
1289     * 법인번호 에 '-'넣기
1290     */
1291    function setPupinHyphen(obj) {
1292        var str = deleteHyphen(obj.value);
1293
1294        if(str.length == 13) {  // 주민등록번호  6-7
1295            str = str.substring(0, 6) + "-" + str.substring(6);
1296        }
1297        obj.value = str;
1298    }
1299
1300    /**
1301     * String이 null인 경우 '0'으로 바꾸어 준다.
1302     *
1303     * @param   string
1304     * @return  String
1305     */
1306    function jsNumnvl(str) {
1307        if(str == null || str == "") {
1308            return "0";
1309        }
1310        return  str;
1311    }
1312
1313    function jsNvl(str, arg2) {
1314    	var result = "" ;
1315    	if(arg2 == undefined) result = "";
1316    	else result = arg2 ;
1317        if(str == null) {
1318            return result ;
1319        }
1320        return  str;
1321    }
1322
1323    /**
1324     * 폼 안의 숫자 오브젝트에 콤마를 붙여준다.
1325     */
1326    function setComma() {
1327
1328        for (i = 0; i < document.forms.length; i++) {
1329            var elements = document.forms(i).elements;
1330            for (j = 0; j < elements.length; j++) {
1331                if (elements(j).tagName == "INPUT") {
1332                    dataType = elements(j).getAttribute("dataType");
1333                    if (dataType == "number" || dataType == "integer" ||
1334                    dataType == "float" || dataType == "double") {
1335                        if (elements(j).getAttribute("comma") != null) {
1336                            addComma(elements(j));
1337                        }
1338                    }
1339                }
1340            }
1341        }
1342    }
1343
1344    /**
1345     * 비밀번호 체크
1346     */
1347    function passChk(p_id, p_pass, obj) {
1348
1349        var cnt = 0;
1350        var cnt2 = 1;
1351        var cnt3 = 1;
1352        var temp = "";
1353
1354        /* 비밀번호에에 숫자만 입력되는것을 체크 */
1355        regNum = /^[0-9]+$/gi;
1356        bNum = regNum.test(p_pass);
1357        if(bNum) {
1358            alert("비밀번호는 숫자만으로 구성하실수는 없습니다.");
1359               obj.focus();
1360            return false;
1361        }
1362        /* 비밀번호에에 문자만 입력되는것을 체크 */
1363        regNum = /^[a-zA-Z]+$/gi;
1364        bNum = regNum.test(p_pass);
1365        if(bNum) {
1366            alert("비밀번호는 문자만으로 구성하실수는 없습니다.");
1367               obj.focus();
1368            return false;
1369        }
1370
1371        for(var i = 0; i < p_id.length; i++) {
1372            temp_id = p_id.charAt(i);
1373
1374            for(var j = 0; j < p_pass.length; j++) {
1375                if (cnt > 0) {
1376                    j = tmp_pass_no + 1;
1377                }
1378
1379                if (temp == "r") {
1380                    j=0;
1381                    temp="";
1382                }
1383
1384                temp_pass = p_pass.charAt(j);
1385
1386                if (temp_id == temp_pass){
1387                    cnt = cnt + 1;
1388                    tmp_pass_no = j;
1389                    break;
1390                } else if (cnt > 0 && j > 0){
1391                    temp="r";
1392                    cnt = 0;
1393                } else {
1394                    cnt = 0;
1395                }
1396            }
1397
1398            if (cnt > 3) {
1399                break;
1400            }
1401        }
1402
1403        if (cnt > 3){
1404            alert("비밀번호가 ID와 4자 이상 중복되거나, \n연속된 글자나 순차적인 숫자를 4개이상 사용해서는 안됩니다.");
1405            obj.focus();
1406            return  false;
1407        }
1408
1409        for(var i = 0; i < p_pass.length; i++) {
1410            temp_pass1 = p_pass.charAt(i);
1411            next_pass = (parseInt(temp_pass1.charCodeAt(0)))+1;
1412            temp_p = p_pass.charAt(i+1);
1413            temp_pass2 = (parseInt(temp_p.charCodeAt(0)));
1414
1415            if (temp_pass2 == next_pass) {
1416                cnt2 = cnt2 + 1;
1417            } else {
1418                cnt2 = 1;
1419            }
1420
1421            if (temp_pass1 == temp_p) {
1422                cnt3 = cnt3 + 1;
1423            } else {
1424                cnt3 = 1;
1425            }
1426
1427            if (cnt2 > 3) {
1428                break;
1429            }
1430
1431            if (cnt3 > 3) {
1432                break;
1433            }
1434        }
1435
1436        if (cnt2 > 3){
1437            alert("비밀번호에 연속된 글이나 순차적인 숫자를 4개이상 사용해서는 안됩니다.");
1438            obj.focus();
1439            return  false;
1440        }
1441
1442        if (cnt3 > 3){
1443        	alert("비밀번호에 반복된 문자/숫자를 4개이상 사용해서는 안됩니다.");
1444            obj.focus();
1445            return  false;
1446        }
1447
1448        return true;
1449    }
1450
1451    /**
1452     * 브라우저의 버전을 체크한다.
1453     *
1454     * @param   none
1455     * @return  none
1456     */
1457    function objDetectBrowser() {
1458        var strUA, s, i;
1459        this.isIE = false;  // 인터넷 익스플로러인지를 나타내는 속성
1460        this.isNS = false;  // 넷스케이프인지를 나타내는 속성
1461        this.version = null; // 브라우저 버전을 나타내는 속성
1462
1463        // Agent 정보를 담고 있는 문자열.
1464        strUA = window.navigator.userAgent;
1465
1466        s = "MSIE";
1467        // Agent 문자열(strUA) "MSIE"란 문자열이 들어 있는지 체크
1468
1469        if ((i = strUA.indexOf(s)) >= 0) {
1470            this.isIE = true;
1471            // 변수 i에는 strUA 문자열 중 MSIE가 시작된 위치 값이 들어있고,
1472            // s.length는 MSIE의 길이 즉, 4가 들어 있다.
1473            // strUA.substr(i + s.length)를 하면 strUA 문자열 중 MSIE 다음에
1474            // 나오는 문자열을 잘라온다.
1475            // 그 문자열을 parseFloat()로 변환하면 버전을 알아낼 수 있다.
1476            this.version = parseFloat(strUA.substr(i + s.length));
1477            return;
1478        }
1479
1480        s = "Netscape6/";
1481        // Agent 문자열(strUA) "Netscape6/"이란 문자열이 들어 있는지 체크
1482
1483        if ((i = strUA.indexOf(s)) >= 0) {
1484            this.isNS = true;
1485            this.version = parseFloat(strUA.substr(i + s.length));
1486            return;
1487        }
1488
1489        // 다른 "Gecko" 브라우저는 NS 6.1로 취급.
1490
1491        s = "Gecko";
1492        if ((i = strUA.indexOf(s)) >= 0) {
1493            this.isNS = true;
1494            this.version = 6.1;
1495            return;
1496        }
1497    }
1498
1499    /**
1500     * 브라우저의 버전을 체크한다.
1501     *
1502     * @param   none
1503     * @return  return version number
1504     */
1505    function detectBrowser() {
1506        var ua = window.navigator.userAgent;
1507
1508        var msie = ua.indexOf('MSIE ');
1509        if (msie > 0) {
1510            // IE 10 or older => return version number
1511            return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
1512        }
1513
1514        var trident = ua.indexOf('Trident/');
1515        if (trident > 0) {
1516            // IE 11 => return version number
1517            var rv = ua.indexOf('rv:');
1518            return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
1519        }
1520
1521        var edge = ua.indexOf('Edge/');
1522        if (edge > 0) {
1523           // Edge (IE 12+) => return version number
1524           return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
1525        }
1526
1527        // other browser
1528        return "other";
1529    }
1530
1531  /**
1532   * 화면 크기를 1024*768로 고정 시킨다.
1533   */
1534  function fixScreen(){
1535    if ((screen.availWidth >= 1024) & (screen.availHeight >= 768)){
1536      availX = 1024;
1537      availY = 768;
1538      screenX = screen.availWidth;
1539      screenY = screen.availHeight;
1540      windowX = (screenX - availX)/2;
1541      windowY = (screenY - availY)/2;
1542    }
1543    else {
1544      //availX = 1024;
1545      //availY = 768;
1546      availX = screen.availWidth;
1547      availY = screen.availHeight;
1548      windowX = 0;
1549      windowY = 0;
1550    }
1551    moveTo(windowX,windowY);
1552    resizeTo(availX, availY);
1553  }
1554
1555    /**
1556     * sub 화면을 가운데에 위치 시킨다.
1557     * centerSubWindow(winName, wx, wy)
1558     * winName : 서브윈도우의 이름
1559     * ww : 서브윈도우로 열 창의 너비
1560     * wh : 서브윈도우로 열 창의 높이
1561     */
1562    function centerSubWindow(winName, ww, wh){
1563        if (document.layers) {
1564            sw = screen.availWidth;
1565            sh = screen.availHeight;
1566        }
1567        if (document.all) {
1568            sw = screen.width;
1569            sh = screen.height;
1570        }
1571
1572        w = (sw - ww)/2;
1573        h = (sh - wh)/2;
1574        winName.moveTo(w,h);
1575    }
1576
1577    /**
1578     * 문자열에서 삭제를 원하는 문자를 삭제한다.
1579     *
1580     * @param   val 문자열
1581     * @param   str 삭제할 문자
1582     */
1583    function jsTrim(val, str) {
1584        var temp  = val.value;
1585        temp = temp.split(str);
1586
1587        val.value = temp.join("");
1588    }
1589
1590    /**
1591     * 폼 전체를 읽기전용으로 만든다.
1592     *
1593     * @param    form명
1594     */
1595    function setAllDisabled(tform) {
1596        var len = tform.elements.length;
1597        alert("len ::"+ len);
1598        for(i=0; i<len; i++) {
1599            if(tform.elements[i].type == "text" || tform.elements[i].type == "select-one"
1600               || tform.elements[i].type == "textarea" || tform.elements[i].type == "file"
1601               || tform.elements[i].type == "radio" || tform.elements[i].type == "checkbox") {
1602                 tform.elements[i].disabled = true;
1603            }
1604        }
1605    }
1606
1607    /**
1608     * 폼 전체를 읽기전용을 정상으로 돌려 놓는다.
1609     *
1610     * @param    form명
1611     */
1612    function setAllEnabled(tform) {
1613        var len = tform.elements.length;
1614        for(i=0; i<len; i++) {
1615            if(tform.elements[i].type == "text" || tform.elements[i].type == "select-one"
1616               || tform.elements[i].type == "textarea" || tform.elements[i].type == "file"
1617               || tform.elements[i].type == "radio" || tform.elements[i].type == "checkbox") {
1618                 tform.elements[i].disabled = false;
1619            }
1620        }
1621    }
1622
1623    /**
1624     * tokenCommaPatt
1625     *
1626     * @param    val
1627     * @param    patt
1628     * @ String val을 String patt로 구분하여배열로 리턴한다.
1629     * example
1630     *  var TestArray = tokenCommaPatt( "abcd efgh ijkl", " ")
1631     *  TestArray[0] = "abcd";
1632     *  TestArray[1] = "efgh";
1633     *  TestArray[2] = "ijkl";
1634     */
1635    function tokenCommaPatt(val, patt){
1636        var i = 0, iFst = 0;
1637        var sCheckValue = val;
1638        var arrRst = new Array();
1639        while( ( iFst = sCheckValue.indexOf( patt ) ) >= 0 ) {
1640            arrRst[i++] = sCheckValue.substring( 0 , iFst );
1641            sCheckValue = sCheckValue.substring( iFst + patt.length ,  sCheckValue.length );
1642            }
1643        arrRst[i] = sCheckValue;
1644        return arrRst;
1645    }
1646
1647    /**
1648     * 숫자로만 이루어져 있는지 체크 한다.
1649     *
1650     * @param    num
1651     * @return   boolean
1652     */
1653    function isNumber2(num){
1654        var inText = num.value;
1655        var ret;
1656
1657        for (var i = 0; i < inText.length; i++) {
1658            ret = inText.charCodeAt(i);
1659            if (!((ret > 47) && (ret < 58)))  {
1660                alert("숫자만 입력 가능합니다.");
1661                num.value = "";
1662                num.focus();
1663                return false;
1664            }
1665        }
1666        return true;
1667    }
1668
1669    /**
1670     * 숫자로만 이루어져 있는지 체크 한다.
1671     *
1672     * @param    num
1673     * @return   boolean
1674     */
1675    function isFloat3(num){
1676        var inText = num.value;
1677        var ret;
1678        if(!isFloat2(inText)){
1679            alert("숫자만 입력 가능합니다.");
1680            num.value = "";
1681            num.focus();
1682            return false;
1683
1684        }
1685        return true;
1686    }
1687
1688    /**
1689     * 숫자로만 이루어져 있는지 체크(,붙이기) 한다.
1690     *
1691     * @param    num
1692     * @return   boolean
1693     */
1694    function isNumberComma(num){
1695        var inText = (num.value).replace(/,/gi,'');
1696        var ret;
1697
1698        for (var i = 0; i < inText.length; i++) {
1699            ret = inText.charCodeAt(i);
1700            if (!((ret > 47) && (ret < 58)))  {
1701                alert("숫자만 입력 가능합니다.");
1702                num.value = "";
1703                num.focus();
1704                return false;
1705            }
1706        }
1707        addComma(num);
1708        return true;
1709    }
1710
1711    /**
1712     * 한글로만 이루어져 있는지 체크 한다.
1713     *
1714     * @param    han
1715     * @return   boolean
1716     */
1717    function isHangul(han) {
1718        var inText = han.value;
1719        var ret;
1720
1721        ret = inText.charCodeAt();
1722        if (ret > 31 && ret < 127) {
1723            alert("한글만 입력 가능합니다.");
1724            han.value = "";
1725            han.focus();
1726            return false;
1727        }
1728
1729        return true;
1730    }
1731
1732    /**
1733     * 한글은 입력이 불가능
1734     *
1735     * @param    obj
1736     * @return   boolean
1737     */
1738    function isNotHangul(obj) {
1739    	var strValue = obj.value
1740    	var ret;
1741
1742    	for(i=0; i<strValue.length; i++){
1743    		var code = strValue.charCodeAt(i);
1744    		if (!(code > 31 && code < 127)) {
1745    			alert("한글은 입력이 불가능합니다.");
1746				obj.value = "";
1747				obj.focus();
1748				return false;
1749			}
1750    	}
1751
1752    	return true;
1753    }
1754
1755
1756   /**
1757    * 영문캐릭터인지 체크(대문자)
1758    *
1759    * param obj
1760    * return
1761    */
1762    function checkChar(obj)
1763    {
1764        var strValue = obj.value
1765
1766        var retChar = strValue.toUpperCase();
1767
1768        if (retChar <  "A" || retChar  > "Z")
1769        {
1770            alert("영문자만 입력이 가능합니다.");
1771            obj.value = "";
1772            obj.focus();
1773            return;
1774        }
1775        obj.value = retChar;
1776    }
1777
1778
1779    /**
1780     * 영문으로만 이루어져 있는지 체크 한다.
1781     *
1782     * @param    obj
1783     * @return   boolean
1784     */
1785    function checkChar2(obj) {
1786        var strValue = obj.value
1787        var ret;
1788
1789		for(i=0; i<strValue.length; i++){
1790			var code = strValue.charCodeAt(i);
1791
1792			if( !((code >= 65 && code <= 90) ||
1793				  (code >= 97 && code <= 122)) ){
1794				alert("영문자만 입력이 가능합니다.");
1795				obj.value = "";
1796				obj.focus();
1797				return;
1798			}
1799		}
1800    }
1801
1802
1803    /**
1804     * 키보드 입력시 숫자만 입력 가능
1805     */
1806    function onlyNumber(){
1807        if ((event.keyCode >= 32 && event.keyCode < 48)
1808            || (event.keyCode > 57 && event.keyCode < 65)
1809            || (event.keyCode > 90 && event.keyCode < 97)
1810            || (event.keyCode >= 97 && event.keyCode <= 122)
1811            || (event.keyCode >= 65 && event.keyCode <= 90))
1812            event.returnValue = false;
1813    }
1814
1815    /**
1816     * 키보드 입력시 수자 및 ','가 입력 가능
1817     */
1818    function AmtNumber(){
1819        if ((event.keyCode >= 32 && event.keyCode < 44)
1820            || (event.keyCode >= 45 && event.keyCode < 48)
1821            || (event.keyCode > 57 && event.keyCode < 65)
1822            || (event.keyCode > 90 && event.keyCode < 97)
1823            || (event.keyCode >= 97 && event.keyCode <= 122)
1824            || (event.keyCode >= 65 && event.keyCode <= 90))
1825            event.returnValue = false;
1826    }
1827
1828    /**
1829     * 키보드 입력시 수자 및 '.'가 입력 가능
1830     */
1831    function RateNumber(){
1832        if ((event.keyCode >= 32 && event.keyCode < 46)
1833            || (event.keyCode >= 47 && event.keyCode < 48)
1834            || (event.keyCode > 57 && event.keyCode < 65)
1835            || (event.keyCode > 90 && event.keyCode < 97)
1836            || (event.keyCode >= 97 && event.keyCode <= 122)
1837            || (event.keyCode >= 65 && event.keyCode <= 90))
1838            event.returnValue = false;
1839    }
1840
1841    /**
1842     * 키보드 입력시 수자 및 '.'가 입력 가능
1843     */
1844    function rateNumber(event){
1845        if ((event.keyCode >= 32 && event.keyCode < 46)
1846            || (event.keyCode >= 47 && event.keyCode < 48)
1847            || (event.keyCode > 57 && event.keyCode < 65)
1848            || (event.keyCode > 90 && event.keyCode < 97)
1849            || (event.keyCode >= 97 && event.keyCode <= 122)
1850            || (event.keyCode >= 65 && event.keyCode <= 90))
1851            event.returnValue = false;
1852    }
1853
1854    /**
1855     * 숫자형식에 null이 입력되면 0으로 셋팅한다.
1856     *
1857     * @param   form
1858     */
1859    function setZero(form) {
1860        for (i = 0; i < form.elements.length; i++) {
1861            obj = form.elements(i);
1862
1863            if (obj.tagName == "INPUT") {
1864                dataType = obj.getAttribute("dataType");
1865
1866                if (dataType == "number" || dataType == "integer" || dataType == "float" || dataType == "double") {
1867                    if (obj.value == null || obj.value == "") {
1868                        obj.value = "0";
1869                    }
1870                }
1871            }
1872        }
1873    }
1874
1875    /* 날짜관련 *******************************************************************************/
1876    var dateBase  = new Date();
1877
1878    /**
1879     * 년
1880     */
1881    function getYear()
1882    {
1883        return dateBase.getFullYear();
1884    }
1885
1886    /**
1887     * 월
1888     */
1889    function getMonth()
1890    {
1891        var month = dateBase.getMonth()+1;
1892        if (("" + month).length == 1)
1893            month = "0" + month;
1894        return month;
1895    }
1896
1897    /**
1898     * 일
1899     */
1900    function getDay()
1901    {
1902        var day = dateBase.getDate();
1903        if(("" + day).length == 1)
1904            day   = "0" + day;
1905        return day;
1906    }
1907
1908    /**
1909     * 현재일부터 특정일자 이전(0), 이후(1)의 날짜를 리턴한다.(YYYYMMDD)
1910     */
1911    function getIntervalDate(term, isPrevNext)
1912    {
1913        var year2, month2, day2;
1914        var dt = new Date(getMonth() +"-"+ getDay() +"-"+ getYear());
1915        var anyTime;
1916        var anyDate;
1917        if(isPrevNext == "0") /// 이전
1918            anyTime = dt.getTime() - (term) * 1000 * 3600 * 24;
1919        else /// 이후
1920            anyTime = dt.getTime() + (term) * 1000 * 3600 * 24;
1921        anyDate = new Date();
1922        anyDate.setTime(anyTime);
1923        year2 = ( (anyDate.getYear()<100) ? "19"+ anyDate.getYear() : anyDate.getYear() );
1924        month2 = anyDate.getMonth()+1;
1925        day2 = anyDate.getDate();
1926        if (("" + month2).length == 1)
1927            month2 = "0" + month2;
1928        if(("" + day2).length == 1)
1929            day2   = "0" + day2;
1930        //alert("["+ year2 +"/"+ month2 +"/"+ day2 +"]");
1931
1932        return year2 +""+ month2 +""+ day2;
1933    }
1934
1935    /**
1936     * 기준일부터 특정일자 이전(0), 이후(1)의 날짜를 리턴한다.(YYYYMMDD)
1937     */
1938    function getIntervalDate2(kijunDate, term, isPrevNext)
1939    {
1940        var year2, month2, day2;
1941        var dt = toTimeObject(deleteDateFormatStr(kijunDate) +"0000");
1942        var anyTime;
1943        var anyDate;
1944        if(isPrevNext == "0") /// 이전
1945            anyTime = dt.getTime() - (term) * 1000 * 3600 * 24;
1946        else /// 이후
1947            anyTime = dt.getTime() + (term) * 1000 * 3600 * 24;
1948        anyDate = new Date();
1949        anyDate.setTime(anyTime);
1950        year2 = ( (anyDate.getYear()<100) ? "19"+ anyDate.getYear() : anyDate.getYear() );
1951        month2 = anyDate.getMonth()+1;
1952        day2 = anyDate.getDate();
1953        if (("" + month2).length == 1)
1954            month2 = "0" + month2;
1955        if(("" + day2).length == 1)
1956            day2   = "0" + day2;
1957        //alert("["+ year2 +"/"+ month2 +"/"+ day2 +"]");
1958
1959        return year2 +""+ month2 +""+ day2;
1960    }
1961
1962    /**
1963     * Time 스트링을 자바스크립트 Date 객체로 변환
1964     *
1965     * parameter time: Time 형식의 String
1966     */
1967    function toTimeObject(time)
1968    { //parseTime(time)
1969        var year  = time.substr(0,4);
1970        var month = time.substr(4,2) - 1; // 1월=0,12월=11
1971        var day   = time.substr(6,2);
1972        var hour  = time.substr(8,2);
1973        var min   = time.substr(10,2);
1974
1975        return new Date(year,month,day,hour,min);
1976    }
1977
1978    /**
1979     * 자바스크립트 Date 객체를 Time 스트링으로 변환
1980     *
1981     * parameter date: JavaScript Date Object
1982     */
1983    function toTimeString(date)
1984    { //formatTime(date)
1985        var year  = date.getFullYear();
1986        var month = date.getMonth() + 1; // 1월=0,12월=11이므로 1 더함
1987        var day   = date.getDate();
1988        var hour  = date.getHours();
1989        var min   = date.getMinutes();
1990
1991        if(("" + month).length == 1) { month = "0" + month; }
1992        if(("" + day).length   == 1) { day   = "0" + day;   }
1993        if(("" + hour).length  == 1) { hour  = "0" + hour;  }
1994        if(("" + min).length   == 1) { min   = "0" + min;   }
1995
1996        return ("" + year + month + day + hour + min)
1997    }
1998
1999    /**
2000     * 유효한(존재하는) 월(月)인지 체크
2001     */
2002    function isValidMonth(mm)
2003    {
2004        var m = parseInt(mm,10);
2005        return (m >= 1 && m <= 12);
2006    }
2007
2008    /**
2009     * 유효한(존재하는) 일(日)인지 체크
2010     */
2011    function isValidDay(yyyy, mm, dd)
2012    {
2013        var m = parseInt(mm,10) - 1;
2014        var d = parseInt(dd,10);
2015
2016        var end = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
2017        if ((yyyy % 4 == 0 && yyyy % 100 != 0) || yyyy % 400 == 0) {
2018            end[1] = 29;
2019        }
2020
2021        return (d >= 1 && d <= end[m]);
2022    }
2023
2024    /**
2025     * 해당 월의 마지막 일을 가져온다.
2026     */
2027    function getLastDay(yyyy, mm)
2028    {
2029        var m = parseInt(mm,10) - 1;
2030        var d;
2031
2032        var end = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
2033        if ((yyyy % 4 == 0 && yyyy % 100 != 0) || yyyy % 400 == 0) {
2034            end[1] = 29;
2035        }
2036        for(var i=0; i<end.length; i++)
2037        {
2038            if(m == i)
2039                d = end[i];
2040        }
2041        //alert("d ::"+ d);
2042
2043        return d;
2044    }
2045
2046    /**
2047     * 유효한(존재하는) 시(時)인지 체크
2048     */
2049    function isValidHour(hh)
2050    {
2051        var h = parseInt(hh,10);
2052        return (h >= 1 && h <= 24);
2053    }
2054
2055    /**
2056     * 유효한(존재하는) 분(分)인지 체크
2057     */
2058    function isValidMin(mi)
2059    {
2060        var m = parseInt(mi,10);
2061        return (m >= 1 && m <= 60);
2062    }
2063
2064    /**
2065     * 현재날짜를 리턴한다.
2066     *
2067     */
2068    function getCurDate()
2069    {
2070        var date  = new Date();
2071        var year  = date.getFullYear();
2072        var month = date.getMonth() + 1; // 1월=0,12월=11이므로 1 더함
2073        var day   = date.getDate();
2074        var hour  = date.getHours();
2075        var min   = date.getMinutes();
2076
2077        if (("" + month).length == 1) { month = "0" + month; }
2078        if (("" + day).length   == 1) { day   = "0" + day;   }
2079        if (("" + hour).length  == 1) { hour  = "0" + hour;  }
2080        if (("" + min).length   == 1) { min   = "0" + min;   }
2081
2082        return ("" + year + month + day)
2083    }
2084    /* 날짜관련 *******************************************************************************/
2085
2086    /**
2087     * 날짜를 체크하여 금월을 return
2088     *
2089     * @param       날짜
2090     */
2091    function jsThisMonth(nowDate) {
2092        var form = document.form1;
2093
2094        var nowYear = nowDate.substring(0, 4);
2095        var nowMonth = nowDate.substring(4, 6);
2096        var nowDay = nowDate.substring(6, 8);
2097        var newDay = "";
2098
2099        for(var i=28; i<=31; i++) {
2100            if (isDate(nowYear + nowMonth + i)) {
2101                newDay = i + "";
2102            }
2103        }
2104
2105        form.fromDate.value = addDateFormatStr(nowYear + nowMonth + "01");
2106        form.toDate.value = addDateFormatStr(nowYear + nowMonth + newDay);
2107    }
2108
2109    /**
2110     * 날짜를 체크하여 금주를 return
2111     *
2112     * @param       날짜
2113     */
2114    function jsThisWeek(nowDate) {
2115        var form = document.form1;
2116
2117        var dateWeek = getDateWeek(nowDate);
2118        var monday = Number(nowDate) - dateWeek + 1;
2119        var sunday = monday + 6 ;
2120
2121        form.fromDate.value = addDateFormatStr(monday + "");
2122        form.toDate.value = addDateFormatStr(sunday + "");
2123    }
2124
2125    /**
2126     * 날짜를 체크하여 금일를 return
2127     *
2128     * @param       날짜
2129     */
2130    function jsThisDay(nowDate) {
2131        var form = document.form1;
2132
2133        form.fromDate.value = addDateFormatStr(nowDate);
2134        form.toDate.value = addDateFormatStr(nowDate);
2135    }
2136
2137    /**
2138     * 지정한 날짜의 요일(1 -> 월, ~ 7 -> 일)
2139     *
2140     * @param       날짜
2141     */
2142    function getDateWeek(val){
2143        var day;
2144        var d = new Date();
2145
2146        d.setUTCFullYear(Number(val.substring(0, 4)));
2147        d.setUTCMonth(Number(val.substring(4, 6)) - 1);
2148        d.setUTCDate(Number(val.substring(6, 8)));
2149
2150        day = d.getDay();
2151
2152        return day;
2153    }
2154
2155    /**
2156     * 엔터키 누르면 자동으로 다음 필드로 이동
2157     */
2158    function enterNextField(field, event)
2159    {
2160        var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
2161
2162        if(keyCode == 13)
2163        {
2164            var i;
2165            for(i = 0; i<field.form.elements.length; i++)
2166            {
2167                if(field == field.form.elements[i])
2168                    break;
2169            }
2170
2171            i = (i + 1) % field.form.elements.length;
2172            field.form.elements[i].focus();
2173            return false;
2174        }
2175        else
2176            return true;
2177    }
2178
2179    /**
2180     * 화면의 첫번째 TextField에 포커스 이동
2181     */
2182    function firstTextFocus()
2183    {
2184        var elements;
2185        var obj;
2186
2187        for(var j=0; j<document.forms.length; j++)
2188        {
2189            elements = document.elements[j].elements;
2190
2191            for(var i=0; i<elements.length; i++)
2192            {
2193                obj = elements[i];
2194
2195                if(obj.tagName == "INPUT")
2196                {
2197                    if(obj.type == "text" && obj.disabled == false)
2198                    {
2199                        obj.focus();
2200                        endFocus(obj);
2201                        return;
2202                    }
2203                }
2204            }
2205        } /// end of for()
2206    }
2207
2208    /**
2209     * 화면의 원하는 TextField 나 TextArea에 포커스 이동
2210     */
2211    function firstTextFocus(formName)
2212    {
2213        var elements;
2214        var obj;
2215
2216        for(var j=0; j<document.forms.length; j++)
2217        {
2218            elements = document.forms[j].elements;
2219
2220            for(var i=0; i<elements.length; i++)
2221            {
2222                obj = elements[i];
2223
2224                if(obj.name == formName)
2225                {
2226                    if(obj.tagName == "INPUT" || obj.tagName.toUpperCase() == "TEXTAREA")
2227                    {
2228                        //alert("obj.name ::"+ obj.name +"/ obj.tagName ::"+ obj.tagName +"/ formName ::"+ formName +"/ obj.type ::"+ obj.type);
2229                        if((obj.type == "text" || obj.type == "textarea") && obj.disabled == false)
2230                        {
2231                            obj.focus();
2232                            endFocus(obj);
2233                            return;
2234                        }
2235                    }
2236                }
2237                else if(formName == "" || formName == null)
2238                {
2239                    if(obj.tagName == "INPUT")
2240                    {
2241                        if(obj.type == "text" && obj.disabled == false)
2242                        {
2243                            obj.focus();
2244                            endFocus(obj);
2245                            return;
2246                        }
2247                    }
2248                }
2249            }
2250        } /// end of for()
2251    }
2252
2253    /**
2254     * FM## - getFM(12, 4) -> 0012로 변경한다.
2255     * @param       val 원본 값
2256     * @param       len 사이즈 (0을 채울 갯수)
2257     */
2258    function getFM(val, len)
2259    {
2260        if(val == "")
2261            return val;
2262        var str     = "";
2263        var zero    = "";
2264        var valLen  = new String(val).length;
2265        var forLen  = len-valLen;
2266        if(len <= valLen)
2267            return val;
2268        for(var i=0; i<(forLen); i++)
2269        {
2270            zero    += "0";
2271        }
2272        str = zero+val;
2273
2274        return str;
2275    }
2276
2277    /**
2278     * 퍼미션 체크
2279     * 하나의 오브젝트에 대한 것임.
2280     *
2281     * @param   form
2282     * @param   obj
2283     */
2284    function permission(form, obj)
2285    {
2286        /// 버튼에 다음과 같이 정의해야 한다. perm permType="C" permCheck="<%= "C" %>"
2287        var permType    = ""; /// 현재 버튼의 CRUD 타입
2288        var permCheck   = ""; /// 사용자가 가진 퍼미션
2289        var dispName    = ""; /// 디스플레이명
2290        var permCheckArr= new Array();
2291
2292        alert("> obj.tagName ::"+ obj.tagName);
2293        for(i = 0; i < form.elements.length; i++)
2294        {
2295            if(obj.getAttribute("perm") != null)
2296            {
2297                if(obj.tagName == "INPUT" || obj.tagName == "IMG")
2298                {
2299                    permType    = obj.getAttribute("permType");
2300                    permCheck   = obj.getAttribute("permCheck");
2301                    dispName    = obj.getAttribute("dispName");
2302                    if(permType != null && permType != "")
2303                    {
2304                        if(permCheck != null && permCheck != "")
2305                        {
2306                            permCheckArr    = tokenCommaPatt(permCheck, "|");
2307                        }
2308                        /// CRUD 권한 체크
2309                        for(var j=0; j<permCheckArr.length; j++)
2310                        {
2311                            if(permType == permCheckArr[j])
2312                            {
2313                                break;
2314                            }
2315                            else
2316                            {
2317                            	var manyLanguage = dispName +" 권한이 없습니다.";
2318                                alert(manyLanguage);
2319                                obj.focus();
2320                                if(window.event)
2321                                {
2322                                    window.event.returnValue = false;
2323                                }
2324                                return  false;
2325                            }
2326                        }
2327                    }
2328                }
2329                break;
2330            }
2331        }
2332        alert("permType ::"+ permType +"/ permCheck ::"+ permCheck);
2333    }
2334
2335    /**
2336     * 텍스트필드의 맨 끝(오른쪽)으로 포커스 이동하기.
2337     * <input type="textfield" name="addr" onFocus="endFocus(this);">
2338     *
2339     * @param   obj
2340     */
2341    function endFocus(obj)
2342    {
2343        obj.value = obj.value + '';
2344    }
2345
2346    /**
2347     * 라디오버튼의 선택되어진 개체의 값을 가져온다.
2348     *
2349     * @param       frm document.form
2350     * @param       elem 라디오버튼 개체명
2351     */
2352    function getRadioValue(frm, elem)
2353    {
2354        var val = "";
2355
2356        if(elem == null || elem == "")
2357            return "";
2358
2359        if(frm.elements[elem].length > 0)
2360        {
2361
2362            for(var i=0; i<frm.elements[elem].length; i++)
2363            {
2364                if(frm.elements[elem][i].checked)
2365                {
2366                    val = frm.elements[elem][i].value;
2367                    break;
2368                }
2369            } /// end of for()
2370        }
2371        else
2372            val = frm.elements[elem].value;
2373
2374        return val;
2375    }
2376
2377    /**
2378    * 체크박스가 하나라도 선택 되어 있는지를 체크한다.
2379    *
2380    **/
2381	function Checkbox_Checked(obj) {
2382	    isChk=false;
2383	    if(obj == undefined) return isChk;
2384
2385	    if(obj.length == undefined) {
2386	        if(obj.checked==true) {
2387	            isChk=true;
2388	        }
2389	    } else {
2390	        for(i=0; i< obj.length; i++) {
2391	            if(obj[i].checked==true) {
2392	                isChk=true;
2393	            }
2394	        }
2395	    }
2396	    return isChk;
2397	}
2398
2399	function Checkbox_Check(obj) {
2400	    isChk=false;
2401	    if(obj.length == undefined) {
2402	        isChk=false;
2403	    } else {
2404	        isChk=true;
2405	    }
2406	    return isChk;
2407	}
2408
2409	function Checkbox_Checked_Count(obj) {
2410	    var checkCnt = 0;
2411	    if(obj == undefined) return checkCnt;
2412
2413	    if(obj.length == undefined) {
2414	        if(obj.checked==true) {
2415	            checkCnt = 1;
2416	        }
2417	    } else {
2418	        for(i=0; i< obj.length; i++) {
2419	            if(obj[i].checked==true) {
2420	                checkCnt++;
2421	            }
2422	        }
2423	    }
2424	    return checkCnt;
2425	}
2426
2427	// 창 전체화면
2428	function Full_Size_Popup(s_url, s_name, s_scroll) {
2429		ls_pri = "toolbar=no, location=no, directories=no, menubar=no, resizable=yes, scrollbars="+s_scroll+", status=yes, fullscreen=yes width="+screen.width+" height="+screen.height;
2430		wd_pop = window.open(s_url, s_name,ls_pri);
2431		if(wd_pop == null) {
2432		   alert("현재 사이트의 팝업이 차단되어 있습니다. 차단을 해제해 주십시요.");
2433		   return;
2434		}
2435
2436        var version = navigator.appVersion;
2437        //var addHeight = 0;
2438        if(version.indexOf("MSIE 7.0") > -1) addHeight=50;
2439
2440		wd_pop.blur();
2441
2442        //var aw = window.screen.availWidth;
2443        //var ah = window.screen.availHeight;
2444        //wd_pop.resizeTo(aw, ah);
2445		wd_pop.focus();
2446
2447		return wd_pop;
2448	}
2449
2450	// 창 전체화면
2451	function Full_Size_Popup2(s_url, s_name, s_scroll) {
2452		ls_pri = "toolbar=yes, location=yes, directories=yes, menubar=yes, resizable=yes, scrollbars="+s_scroll+", status=yes, fullscreen=yes width="+screen.width+" height="+screen.height;
2453		wd_pop = window.open(s_url, s_name,ls_pri);
2454		if(wd_pop == null) {
2455			alert("현재 사이트의 팝업이 차단되어 있습니다. 차단을 해제해 주십시요.");
2456		   return;
2457		}
2458
2459        var version = navigator.appVersion;
2460        //var addHeight = 0;
2461        //if(version.indexOf("MSIE 7.0") > -1) addHeight=50;
2462
2463		wd_pop.blur();
2464
2465        //var aw = window.screen.availWidth;
2466        //var ah = window.screen.availHeight;
2467        //wd_pop.resizeTo(aw, ah);
2468		wd_pop.focus();
2469
2470		return wd_pop;
2471	}
2472
2473	// 창의 위치를 가운데 조정하고 사이즈고정
2474	function Center_Fixed_Popup(s_url, s_val, s_name, s_width, s_height, s_scroll) {
2475		ls_pri = "toolbar=no, location=no, directories=no, menubar=no, resizable=no, scrollbars="+s_scroll+", status=yes, width=400 ,height=400";
2476		wd_pop = window.open(s_url+"?"+s_val, s_name,ls_pri);
2477		if(wd_pop == null) {
2478			alert("현재 사이트의 팝업이 차단되어 있습니다. 차단을 해제해 주십시요.");
2479		   return;
2480		}
2481
2482        s_width = parseInt(s_width);
2483        s_height = parseInt(s_height);
2484
2485        var version = navigator.appVersion;
2486        var addHeight = 0;
2487        if(version.indexOf("MSIE 7.0") > -1) addHeight=50;
2488
2489		wd_pop.blur();
2490		wd_pop.resizeTo(s_width, s_height+addHeight);
2491		var aw = window.screen.availWidth;
2492        var ah = window.screen.availHeight;
2493		wd_pop.moveTo((aw - (s_width/2)),(ah - (s_height/2)));
2494		wd_pop.focus();
2495
2496		return wd_pop;
2497	}
2498
2499	function Center_Fixed_Popup2(s_url, s_name, s_width, s_height, s_scroll) {
2500		var aw = window.screen.availWidth;
2501        var ah = window.screen.availHeight;
2502
2503		var xpos;
2504		var ypos;
2505
2506		s_width = parseInt(s_width);
2507		s_height = parseInt(s_height);
2508
2509		xpos=((aw - s_width)/2);
2510		ypos=((ah - s_height)/2);
2511		//ls_pri = "toolbar=no, location=no, directories=no, menubar=no, resizable=yes, scrollbars="+s_scroll+", status=yes width="+s_width+" height="+s_height+",top="+((aw - eval(s_width))/2)+",left="+((ah - eval(s_height))/2);
2512		ls_pri = "toolbar=no, location=no, directories=no, menubar=no, resizable=yes, scrollbars="+s_scroll+", status=yes ,width="+s_width+", height="+s_height+",top="+ypos+",left="+xpos;
2513
2514		wd_pop = window.open(s_url, s_name,ls_pri);
2515		if(wd_pop == null) {
2516			alert("현재 사이트의 팝업이 차단되어 있습니다. 차단을 해제해 주십시요.");
2517		   return;
2518		}
2519
2520        var version = navigator.appVersion;
2521        var addHeight = 0;
2522        if(version.indexOf("MSIE 7.0") > -1) addHeight=50;
2523
2524		wd_pop.blur();
2525		//wd_pop.resizeTo(s_width, s_height+addHeight);
2526        var aw = window.screen.availWidth;
2527        var ah = window.screen.availHeight;
2528		wd_pop.moveTo(((aw - s_width)/2),((ah - s_height)/2));
2529		wd_pop.focus();
2530
2531		return wd_pop;
2532	}
2533
2534
2535	function Center_Fixed_Popup2(s_url, s_name, s_width, s_height, s_scroll,s_resize) {
2536		var aw = window.screen.availWidth;
2537        var ah = window.screen.availHeight;
2538
2539		var xpos;
2540		var ypos;
2541
2542		s_width = parseInt(s_width);
2543        s_height = parseInt(s_height);
2544
2545		xpos=((aw - s_width)/2);
2546		ypos=((ah - s_height)/2);
2547		//ls_pri = "toolbar=no, location=no, directories=no, menubar=no, resizable=yes, scrollbars="+s_scroll+", status=yes width="+s_width+" height="+s_height+",top="+((aw - eval(s_width))/2)+",left="+((ah - eval(s_height))/2);
2548
2549		ls_pri = "toolbar=no, location=no, directories=no, menubar=no, resizable="+s_resize+", scrollbars="+s_scroll+", status=yes ,width="+s_width+", height="+s_height+",top="+ypos+",left="+xpos;
2550
2551		wd_pop = window.open(s_url, s_name,ls_pri);
2552		if(wd_pop == null) {
2553			alert("현재 사이트의 팝업이 차단되어 있습니다. 차단을 해제해 주십시요.");
2554		   return;
2555		}
2556
2557        var version = navigator.appVersion;
2558        var addHeight = 0;
2559        if(version.indexOf("MSIE 7.0") > -1) addHeight=50;
2560
2561		//wd_pop.blur();
2562		//wd_pop.resizeTo(s_width, s_height+addHeight);
2563        //var aw = window.screen.availWidth;
2564        //var ah = window.screen.availHeight;
2565		//wd_pop.moveTo(((aw - s_width)/2),((ah - s_height)/2));
2566		wd_pop.focus();
2567
2568		return wd_pop;
2569	}
2570
2571	function Center_Fixed_Popup4(s_url, s_name, s_width, s_height, s_scroll) {
2572		var ls_pri = "toolbar=no, location=no, directories=no, menubar=no, resizable=no, scrollbars="+s_scroll+", status=yes, width="+s_width+", height="+s_height;
2573		var wd_pop = window.open(s_url, s_name,ls_pri);
2574		if(wd_pop == null) {
2575			alert("현재 사이트의 팝업이 차단되어 있습니다. 차단을 해제해 주십시요.");
2576			return;
2577		}
2578	}
2579
2580	function getBrowserVersion(){
2581	  var version = navigator.appVersion;
2582
2583	}
2584
2585	function LeftTopZero_Popup(s_url, s_name, s_width, s_height, s_scroll) {
2586		ls_pri = "toolbar=no, location=no, directories=no, menubar=no, resizable=yes, scrollbars="+s_scroll+", status=yes, top=0,left=0,width="+s_width+" ,height="+s_height;
2587		wd_pop = window.open(s_url, s_name,ls_pri);
2588		if(wd_pop == null) {
2589			alert("현재 사이트의 팝업이 차단되어 있습니다. 차단을 해제해 주십시요.");
2590		   return;
2591		}
2592
2593        var version = navigator.appVersion;
2594        var addHeight = 0;
2595        if(version.indexOf("MSIE 7.0") > -1) addHeight=50;
2596
2597		//wd_pop.blur();
2598		//wd_pop.resizeTo(s_width, s_height+addHeight);
2599
2600		//wd_pop.moveTo(0,0);
2601		wd_pop.focus();
2602
2603		return wd_pop;
2604	}
2605
2606	function LeftMove_Popup(s_url, s_name, s_width, s_height, s_scroll) {
2607		ls_pri = "toolbar=no, location=no, directories=no, menubar=no, resizable=no, scrollbars="+s_scroll+", status=yes width="+s_width+" height="+s_height;
2608		wd_pop = window.open(s_url, s_name,ls_pri);
2609		if(wd_pop == null) {
2610			alert("현재 사이트의 팝업이 차단되어 있습니다. 차단을 해제해 주십시요.");
2611		   return;
2612		}
2613
2614        var version = navigator.appVersion;
2615        var addHeight = 0;
2616        if(version.indexOf("MSIE 7.0") > -1) addHeight=50;
2617
2618		wd_pop.blur();
2619		wd_pop.resizeTo(s_width, s_height+addHeight);
2620		wd_pop.moveTo(450,0);
2621		wd_pop.focus();
2622
2623		return wd_pop;
2624	}
2625
2626	/**
2627	 * 입력된 숫자값을 지정된 소숫점 자릿수로 Round해서 값을 리턴한다.<p>
2628	 * ex) fncRoundPrecision(300.12345678,3) <p>
2629	 * Result ) 300.123
2630	 */
2631	function RoundPrecision(val, precision){
2632	   var p = Math.pow(10, precision);
2633	   return Math.round(val * p) / p;
2634	}
2635
2636    /**
2637     * 셀렉트 박스의 option을 모두 삭제한다.
2638     */
2639	function selectbox_remove_all(obj) {
2640		for(i=obj.length; i >= 0; i--) {
2641				obj.remove(i);
2642		}
2643	}
2644
2645    /**
2646     * 셀렉트 박스의 값과 일치하는 option을 삭제한다.
2647     */
2648	function selectbox_remove(obj, s_val) {
2649		for(i=0; i< obj.length; i++) {
2650			if(obj.options[i].value==s_val) {
2651				obj.remove(i);
2652			}
2653		}
2654	}
2655
2656    /**
2657     * 셀렉트 박스의 option을 생성한다.
2658     */
2659	function selectbox_insert(obj, s_text, s_val, opt) {
2660		var optionIndex = obj.length;
2661		obj.options[optionIndex] = new Option(s_text,s_val,false,false);
2662
2663		if(opt != null && opt != ""){
2664			jQuery(obj.options[optionIndex]).attr("opt", opt);
2665		}else{
2666			jQuery(obj.options[optionIndex]).attr("opt", "");
2667		}
2668	}
2669
2670	function selectbox_insertlist2(targetid, list, name, id){
2671        var targetObj = document.getElementById(targetid);
2672        var info;
2673        // target의 모든 데이터를 삭제해준다.
2674        selectbox_deletelist(targetid);
2675        // 가져온 데이터를 넣어준다.
2676		if(list != null && list.length > 0){
2677			lstIndex		=	list.length;
2678			for(var i = 0; i < list.length;i++){
2679			    info		=	list[i];
2680			    selectbox_insert(targetObj,info[name].replace(/&#39;/gi,"\'"),info[id])
2681			}
2682		}
2683
2684    }
2685	/*
2686    function selectbox_insertlist(targetid, list){
2687        var targetObj = document.getElementById(targetid);
2688        var info;
2689        // target의 모든 데이터를 삭제해준다.
2690        selectbox_deletelist(targetid);
2691        // 가져온 데이터를 넣어준다.
2692		if(list != null && list.length > 0){
2693			lstIndex		=	list.length;
2694			for(var i = 0; i < list.length;i++){
2695			    info		=	list[i];
2696			    selectbox_insert(targetObj,info["CODENM"].replace(/&#39;/gi,"\'"),info["CODE"])
2697			}
2698		}
2699
2700    }
2701    */
2702    function selectbox_insertlist(targetid, list, selectval){
2703        var targetObj = document.getElementById(targetid);
2704        var info;
2705        // target의 모든 데이터를 삭제해준다.
2706        selectbox_deletelist(targetid);
2707        // 가져온 데이터를 넣어준다.
2708        var selected = false;
2709		if(list != null && list.length > 0){
2710			lstIndex		=	list.length;
2711			for(var i = 0; i < list.length;i++){
2712			    info		=	list[i];
2713			    if(selectval == info["CODE"]) selected = true;
2714			    else selected = false;
2715			    selectbox_selectedinsert(targetObj,info["CODENM"].replace(/&#39;/gi,"\'"),info["CODE"],selected,info["OPT"]);
2716			}
2717		}
2718
2719    }
2720
2721	function selectbox_selectedinsert(obj, s_text, s_val, selected, opt) {
2722		if(obj.length != null){
2723			var optionIndex = obj.length;
2724			obj.options[optionIndex] = new Option(s_text,s_val,selected,selected);
2725
2726			if(opt != null && opt != ""){
2727				jQuery(obj.options[optionIndex]).attr("opt", opt);
2728			}else{
2729				jQuery(obj.options[optionIndex]).attr("opt", "");
2730			}
2731		}
2732	}
2733
2734    function selectbox_selectedinsertlist(targetid, list, selectval){
2735        var targetObj = document.getElementById(targetid);
2736        var info;
2737        // target의 모든 데이터를 삭제해준다.
2738        selectbox_deletealllist(targetid);
2739
2740        // 가져온 데이터를 넣어준다.
2741        var selected = false;
2742		if(list != null && list.length > 0){
2743			lstIndex		=	list.length;
2744			for(var i = 0; i < list.length;i++){
2745			    info		=	list[i];
2746			    if(selectval == info["CODE"]) selected = true;
2747			    else selected = false;
2748			    selectbox_selectedinsert(targetObj,info["CODENM"],info["CODE"],selected);
2749			}
2750		}
2751    }
2752
2753    /**
2754     * 객체에 해당 값을 선택처리 해준다.
2755     * @param obj
2756     * @param s_val
2757     * @return
2758     */
2759	function selectbox_selected(obj, s_val) {
2760		for(var i=0; i< obj.length; i++) {
2761			if(obj.options[i].value==s_val) {
2762				obj.options[i].selected = true;
2763			}
2764		}
2765	}
2766
2767
2768   /**
2769   * 셀렉트 박스의 모든 option을 삭제해준다.
2770   **/
2771   function selectbox_deletelist(targetid){
2772        var targetObj = document.getElementById(targetid);
2773		for(i=targetObj.length; i > 0; i--) {
2774				targetObj.remove(i);
2775		}
2776   }
2777
2778   function selectbox_deletealllist(targetid){
2779        var targetObj = document.getElementById(targetid);
2780		for(i=targetObj.length; i >= 0; i--) {
2781				targetObj.remove(i);
2782		}
2783   }
2784
2785	var checkbox_flag = true;
2786	function checkBoxSelectAll(obj) {
2787	    try
2788	    {
2789	        if(Checkbox_Check(obj)) {
2790	            for(i=0; i< obj.length; i++) {
2791	                if (Checkbox_Checked(obj[i])) {
2792	                    obj[i].checked=false;
2793	                } else {
2794	                    obj[i].checked=true;
2795	                }
2796	            }
2797	        } else {
2798	            if (Checkbox_Checked(obj)) {
2799	                obj.checked=false;
2800	            } else {
2801	                obj.checked=true;
2802	            }
2803	        }
2804	        if(checkbox_flag==true) {
2805	            checkbox_flag=false;
2806	        } else  {
2807	            checkbox_flag=true;
2808	        }
2809	    }catch (e) {
2810	        window.status = "error";
2811	    }
2812	}
2813
2814	HashMap = function()
2815	{
2816	   this.keys = new Array();
2817	   this.values = new Array();
2818	   /**
2819	    * Removes all mappings from this map.
2820	    */
2821	   this.clear = function()
2822	   {
2823	   	  this.keys.splice(0, this.keys.length);
2824	   	  this.values.splice(0, this.values.length);
2825	   }
2826	   /**
2827	    * Returns true if this map contains a mapping for the specified key.
2828	    */
2829	   this.containsKey = function(key)
2830	   {
2831	      return this.indexKeyOf(key);
2832	   }
2833
2834	   this.indexKeyOf = function(obj, startIndex) {
2835	        if (startIndex == null) {
2836	            startIndex = 0;
2837	        }
2838
2839	        if (startIndex < this.keys.length && startIndex >= 0) {
2840	            for (var i=startIndex; i < this.keys.length; i++) {
2841	                if (this.keys[i] == obj) {
2842	                    return i;
2843	                }
2844	            }
2845	            return -1;
2846	        } else {
2847	            throw new Exception("Array Index Error. vector.indexOf()");
2848	        }
2849	   }
2850
2851	   /**
2852	    * Returns true if this map maps one or more keys to the specified value.
2853	    */
2854	   this.containsValue = function(value)
2855	   {
2856	      return this.indexValueOf(value);
2857	   }
2858
2859	   this.indexValueOf = function(obj, startIndex) {
2860	        if (startIndex == null) {
2861	            startIndex = 0;
2862	        }
2863
2864	        if (startIndex < this.values.length && startIndex >= 0) {
2865	            for (var i=startIndex; i < this.values.length; i++) {
2866	                if (this.values[i] == obj) {
2867	                    return i;
2868	                }
2869	            }
2870	            return -1;
2871	        } else {
2872	            throw new Exception("Array Index Error. vector.indexOf()");
2873	        }
2874	   }
2875
2876	   /**
2877	    * Returns true if this map contains no key-value mappings.
2878	    */
2879	   this.isEmpty = function()
2880	   {
2881	   	  return (this.size() == 0);
2882	   }
2883	   /**
2884	    * Associates the specified value with the specified key in this map.
2885	    */
2886	   this.put = function(key, value)
2887	   {
2888	      this.keys[this.keys.length] = key;
2889	      this.values[this.values.length] = value;
2890	   }
2891	   /**
2892	    * Returns the value to which the specified key is mapped in this identity hash map, or null if the map contains no mapping for this key
2893	    */
2894	   this.get = function(key)
2895	   {
2896	      var value = null;
2897	      for(var i = 0; i < this.keys.length; i++)
2898	      {
2899	         if(this.keys[i] == key) value = this.values[i];
2900	      }
2901	      return value;
2902	   }
2903	   /**
2904	    * Returns the number of key-value mappings in this map.
2905	    */
2906	   this.size = function()
2907	   {
2908	     return this.keys.length;
2909	   }
2910
2911	   this.toKeyString = function() {
2912	        return this.keys.join(",");
2913	   }
2914
2915	   this.toValueString = function() {
2916	        return this.values.join(",");
2917	   }
2918
2919	   this.remove = function(key){
2920	      for(var i = 0; i < this.keys.length; i++)
2921	      {
2922	         if(this.keys[i] == key) {
2923			        this.values[i] = null;
2924					this.keys[i] = null;
2925			 }
2926	      }
2927	   }
2928	}
2929
2930
2931	/**
2932	 * 초를 시간형식(HHHH:MM:SS)으로 변환
2933	 */
2934	function convertSecondsToTime(ts) {
2935		var hour	= 0;
2936		var min		= 0;
2937		var sec		= (ts % 60);
2938
2939		ts -= sec;
2940		var tmp = (ts % 3600);
2941		ts -= tmp;
2942
2943		if ((ts % 3600) != 0 ) {
2944			hour = 0;
2945		}
2946		else {
2947			hour = (ts / 3600);
2948		}
2949
2950		if ( (tmp % 60) != 0 ) {
2951			min = 0;
2952		}
2953		else {
2954			min = (tmp / 60);
2955		}
2956
2957		if ((new String(hour)).length < 2) {
2958			hour = "0"+hour;
2959		}
2960		if ((new String(min)).length < 2) {
2961			min = "0"+min;
2962		}
2963		if ((new String(sec)).length < 2) {
2964			sec = "0"+sec;
2965		}
2966
2967		var rtnVal = hour+":"+min+":"+sec;
2968
2969		return rtnVal;
2970	}
2971    /**
2972    * HTML 태그를 제거해준다.
2973    **/
2974	function stripHTMLtag(string) {
2975	   var objStrip = new RegExp();
2976	   objStrip = /[<][^>]*[>]/gi;
2977	   return string.replace(objStrip, "");
2978    }
2979
2980    /**
2981     * 웹에디터 내용을 리턴한다
2982     **/
2983	function FCKeditor(instance){
2984		var oEditor = FCKeditorAPI.GetInstance(instance) ;
2985		var div = document.createElement("DIV");
2986		div.innerHTML = oEditor.GetXHTML();
2987		var s = div.innerText;
2988		return s;
2989	}
2990
2991	function FCKeditorHTML(instance){
2992		var oEditor = FCKeditorAPI.GetInstance(instance) ;
2993		var div = document.createElement("DIV");
2994
2995		return oEditor.GetXHTML();
2996	}
2997
2998	var browserType			= checkBrowserType();	// 사용자 브라우져 타입
2999
3000
3001	/**
3002	 * 사용자 브라우져 체크
3003	 */
3004	function checkBrowserType() {
3005		var brType = "IE";
3006		if (document.all){
3007			brType = "IE";
3008		}
3009		else if (document.getElementById){
3010			brType = "NE";
3011		}
3012		else if (document.layers){
3013			brType = "NE4";
3014		}
3015		return brType;
3016	}
3017
3018
3019	/**
3020	 * 마우스 X 위치
3021	 */
3022	function checkMouseX(evt) {
3023		var xCoord = 0;
3024		if (browserType == "IE"){
3025			xCoord = event.clientX;
3026		}
3027		else if (browserType == "NE"){
3028			xCoord = evt.pageX;
3029		}
3030		return xCoord;
3031	}
3032
3033
3034	/**
3035	 * 마우스 Y 위치
3036	 */
3037	function checkMouseY(evt) {
3038		var yCoord = 0;
3039		if (browserType == "IE"){
3040			yCoord = event.clientY;
3041		}
3042		else if (browserType == "NE"){
3043			yCoord = evt.pageY;
3044		}
3045		return yCoord;
3046	}
3047
3048
3049	/**
3050	 * 마우스 버튼값 구하기
3051	 * @return left,center,right
3052	 */
3053	function getMouseButton(evt) {
3054		var button 		= "left";
3055		var mouseKey	= 1;
3056		if (browserType == "IE") {
3057			mouseKey = event.button
3058			if (mouseKey == 1) {
3059				button = "left";
3060			}
3061			else if (mouseKey == 2) {
3062				button = "right";
3063			}
3064			else if (mouseKey == 4) {
3065				button = "center";
3066			}
3067		}
3068		else {
3069			mouseKey = evt.which;
3070			if (mouseKey == 1) {
3071				button = "left";
3072			}
3073			else if (mouseKey == 2) {
3074				button = "center";
3075			}
3076			else if (mouseKey == 3) {
3077				button = "right";
3078			}
3079		}
3080		return button;
3081	}
3082
3083
3084	/**
3085	 * 객체의 넓이 구하기
3086	 */
3087	function getWidth(obj) {
3088		if (obj) {
3089			var objWidth = obj.offsetWidth;
3090			return objWidth;
3091		}
3092	}
3093
3094
3095	/**
3096	 * 객체의 높이 구하기
3097	 */
3098	function getHeight(obj) {
3099		if (obj) {
3100			var objHeight = obj.offsetHeight;
3101			return objHeight;
3102		}
3103	}
3104
3105
3106	/**
3107	 * 윈도우 넓이 구하기
3108	 */
3109	function getWindowWidth() {
3110		var winWidth = 0;
3111		if (browserType == "IE") {
3112			winWidth = document.documentElement.offsetWidth;
3113		}
3114		else if (browserType == "NE") {
3115			winWidth = window.innerWidth;
3116		}
3117		return winWidth;
3118	}
3119
3120
3121	/**
3122	 * 윈도우 높이 구하기
3123	 */
3124	function getWindowHeight() {
3125		var winHeight = 0;
3126		if (browserType == "IE") {
3127			winHeight = document.documentElement.offsetHeight;
3128		}
3129		else if (browserType == "NE") {
3130			winHeight = window.innerHeight;
3131		}
3132		return winHeight;
3133	}
3134
3135
3136	/**
3137	 * 스크롤값(X) 구하기
3138	 */
3139	function getScrollX() {
3140		var scrollX		= 0;
3141
3142	    if (browserType == "NE") {
3143	        scrollX		= window.pageXOffset;
3144	    }
3145	    else {
3146	        scrollX		= document.documentElement.scrollLeft;
3147	    }
3148
3149		return scrollX;
3150	}
3151
3152
3153	/**
3154	 * 스크롤값(Y) 구하기
3155	 */
3156	function getScrollY() {
3157		var scrollY		= 0;
3158
3159		if (browserType == "NE") {
3160	        scrollY		= window.pageYOffset;
3161	    }
3162	    else {
3163	        scrollY		= document.documentElement.scrollTop;
3164	    }
3165
3166		return scrollY;
3167	}
3168
3169	/**
3170	 * 객체 DISPLAY 변경
3171	 */
3172	function changeDisplay(obj) {
3173		if (obj) {
3174			var displayStyle = obj.style.display;
3175			if (displayStyle == "block") {
3176				offDisplay(obj);
3177			}
3178			else if (displayStyle == "none") {
3179				onDisplay(obj);
3180			}
3181		}
3182	}
3183
3184
3185	/**
3186	 * DISPLAY on
3187	 */
3188	function onDisplay(obj) {
3189		if (obj) {
3190			obj.style.display = "block";
3191		}
3192	}
3193
3194
3195	/**
3196	 * DISPLAY off
3197	 */
3198	function offDisplay(obj) {
3199		if (obj) {
3200			obj.style.display = "none";
3201		}
3202	}
3203
3204
3205	/**
3206	 * 객체 보이기
3207	 */
3208	function visibleObject(obj) {
3209		if (obj) {
3210			obj.style.visibility = "visible";
3211		}
3212	}
3213
3214
3215	/**
3216	 * 객체 숨기기
3217	 */
3218	function hiddenObject(obj) {
3219		if (obj) {
3220			obj.style.visibility = "hidden";
3221		}
3222	}
3223
3224
3225	/**
3226	 * 객체 선택시 색상 반전
3227	 */
3228	function onSelectColor(obj) {
3229		if (obj) {
3230			obj.style.backgroundColor	= "highlight";
3231			obj.style.color				= "highlighttext";
3232		}
3233	}
3234
3235
3236	/**
3237	 * 객체 선택 비활성 색상 복원
3238	 */
3239	function offSelectColor(obj, color, bgColor) {
3240		if (obj) {
3241			if (color == null) {
3242				color = "";
3243			}
3244			if (bgColor == null) {
3245				bgColor = "";
3246			}
3247			obj.style.color				= color;
3248			obj.style.backgroundColor	= bgColor;
3249		}
3250	}
3251
3252
3253	/*
3254	 * 객체 사이즈 설정
3255	 */
3256	function resizeObject(obj, newWidth, newHeight) {
3257		if (obj) {
3258			obj.style.width     = newWidth+"px";
3259			obj.style.height    = newHeight+"px";
3260		}
3261	}
3262
3263
3264	/**
3265	 * 객체 넓이 설정
3266	 */
3267	 function resizeWidth(obj, newWidth) {
3268	 	if (obj) {
3269			obj.style.width		= newWidth+"px";
3270		}
3271	 }
3272
3273
3274	/**
3275	 * 객체 높이 설정
3276	 */
3277	function resizeHeight(obj, newHeight) {
3278		if (obj) {
3279			obj.style.height	= newHeight+"px";
3280		}
3281	}
3282
3283
3284	/**
3285	 * 객체 이동 설정 (위치)
3286	 */
3287	function moveObject(obj, topPosition, leftPosition) {
3288		if (obj) {
3289			if (nullToEmpty(topPosition) != "") {
3290				obj.style.top       = topPosition+"px";
3291			}
3292			if (nullToEmpty(leftPosition) != "") {
3293				obj.style.left      = leftPosition+"px";
3294			}
3295		}
3296	}
3297
3298
3299	/**
3300	 * 객체의 위치 (document 내에서 절대적인 위치)
3301	 */
3302	function getPosition(obj) {
3303		var pos = { x:0, y:0 };
3304
3305		if ( document.layers ) {
3306			pos.x = obj.x;
3307			pos.y = obj.y;
3308		}
3309		else {
3310			do {
3311				pos.x += parseInt( obj.offsetLeft );
3312				pos.y += parseInt( obj.offsetTop );
3313				obj = obj.offsetParent;
3314			} while (obj);
3315		}
3316		return pos;
3317	}
3318
3319
3320	/**
3321	 * 객체의 왼쪽 위치 (상대위치)
3322	 */
3323	function getLeftPosition(obj) {
3324		var value = 0;
3325		if (obj) {
3326			if (browserType == "IE") {
3327				if (obj.currentStyle.left == "auto") {
3328					value = 0;
3329				}
3330				else {
3331					value = parseInt(obj.currentStyle.left);
3332				}
3333			}
3334			else {
3335				value = parseInt(obj.style.left);
3336			}
3337		}
3338		return value;
3339	}
3340
3341
3342	/**
3343	 * 객체 위쪽 위치 (상대위치)
3344	 */
3345	function getTopPosition(obj) {
3346		var value = 0;
3347		if (obj) {
3348			if (browserType == "IE") {
3349				if (obj.currentStyle.top == "auto") {
3350					value = 0;
3351				}
3352				else {
3353					value = parseInt(obj.currentStyle.top);
3354				}
3355			}
3356			else {
3357				value = parseInt(obj.style.top);
3358			}
3359		}
3360		return value;
3361	}
3362
3363
3364	/**
3365	 * 객체의 속성값 구하기
3366	 */
3367	function getObjectAttribute(obj, attrName) {
3368		var attrValue	= null;
3369
3370		if (obj) {
3371			attrValue	= obj.getAttribute(attrName);
3372		}
3373		return attrValue;
3374	}
3375
3376
3377	/**
3378	 * 객체ID 구하기
3379	 */
3380	function getObjectId(obj) {
3381		var objectId = getObjectAttribute(obj, "id");
3382		return objectId;
3383	}
3384
3385	/**
3386	 * 문자열에서 구분자로 분자열 분리하기
3387	 * @param str		문자열
3388	 * @param idx		구분자를 기준으로 n번째 문자열 추출
3389	 * @param divideStr 구분문자
3390	 */
3391	function getDivideString(str, idx, divideChar) {
3392		var result = "";
3393		if (nullToEmpty(str) != "") {
3394			var strArr = str.split(divideChar);
3395			result = strArr[idx-1];
3396		}
3397
3398		if (!result) {
3399			result = "";
3400		}
3401
3402		return result;
3403	}
3404
3405	/**
3406	 * null 값을 ""으로 변환
3407	 */
3408	function nullToEmpty(value) {
3409		if (value == null) {
3410			value = "";
3411		}
3412		return value;
3413	}
3414
3415	/**
3416	 * 객체를 맨 위로 위치하기
3417	 */
3418	var makeOnTopCount = 0;
3419	function makeOnTop(obj) {
3420		if (obj) {
3421			var daiz;
3422			var max = 0;
3423			var da = null;
3424			if (browserType == "IE") {
3425				da = document.all;
3426			}
3427			else if (browserType == "NE") {
3428				da = document.getElementsByTagName("div");
3429			}
3430
3431			makeOnTopCount += 1;
3432			obj.style.zIndex  = da.length + makeOnTopCount;
3433		}
3434	}
3435
3436	/**
3437	 * Attribute의 Value 추출 (name=value 에서 value 추출
3438	 */
3439	function getAttributeValue(attr, name) {
3440		attr = nullToEmpty(attr).toLowerCase();
3441		var value = "";
3442		if (attr.length > 1) {
3443			var idx1 = attr.indexOf(name);
3444			if (idx1 != -1) {
3445				var idx2 = attr.indexOf("=",idx1);
3446				if (idx2 != -1) {
3447					var idx3 = attr.indexOf(",",idx2);
3448					var oValue = "";
3449					if (idx3 == -1) {
3450						oValue = attr.substring(idx2+1);
3451					}
3452					else {
3453						oValue = attr.substring(idx2+1,idx3);
3454					}
3455					for (var i = 0; i < oValue.length; i++) {
3456						if (oValue.charCodeAt(i) != 32) {
3457							value += oValue.charAt(i);
3458						}
3459					}
3460
3461				}
3462			}
3463
3464		}
3465		return value;
3466	}
3467
3468	/**
3469	 * 이미지 변경
3470	 */
3471	function changeImage(imgObj, imgSrc) {
3472		imgObj.src = imgSrc;
3473	}
3474
3475	//팝업창 화면중앙
3476	function MM_openWindowCenter(theURL,winName,width,height,features) { //v2.0
3477	  xpos = (screen.availWidth-width) > 0 ? (screen.availWidth-width) / 2 : 0;
3478	  ypos = (screen.availHeight-height) > 0 ? (screen.availHeight-height) / 2 : 0;
3479
3480	  window.open(theURL,winName,"left="+xpos+",top="+ypos+",width="+width+",height="+height+","+features);
3481	}
3482
3483	/**
3484	* 특수문자, 한글 제외 스크립트
3485	**/
3486	function checkNonKr(obj) {
3487		tvalue = obj
3488		onvalue = tvalue.value;
3489		count=0
3490		for (i=0;i<onvalue.length;i++){
3491			ls_one_char = onvalue.charAt(i);
3492
3493			if(ls_one_char.search(/[0-9|a-z|A-Z]/) == -1) {
3494				count++;
3495			}
3496		}
3497		if(count!=0) {
3498			//alert("숫자, 영문만 사용 가능합니다")
3499			tvalue.value = "";
3500			tvalue.focus();
3501			return false;
3502		}
3503		else {
3504			//alert(onvalue + "를 입력 했습니다.");
3505			return true;
3506		}
3507	}
3508
3509
3510	/**
3511	* 특정 form의 특정name에 대한 chkbox를 모두 value로 setting
3512	**/
3513	function setChkboxAll(formname, name, value) {
3514		for (var i = 0; i < formname.length ; i++) {
3515			if (name == formname.elements[i].name)
3516				 formname.elements[i].checked = value;
3517		}
3518	}
3519
3520	function resizeIframeHnW(curFrame) {
3521		curFrame.style.display = "block";
3522		if (curFrame.contentDocument && curFrame.contentDocument.body.offsetHeight) { //ns6 syntax
3523			curFrame.style.height = curFrame.contentDocument.body.offsetHeight + 16 + "px";
3524		}
3525		else if (curFrame.Document && curFrame.Document.body.scrollHeight) { //ie5+ syntax
3526			curFrame.style.height = curFrame.Document.body.scrollHeight + "px";
3527		}
3528		if (curFrame.contentDocument && curFrame.contentDocument.body.offsetWidth) { //ns6 syntax
3529			curFrame.style.width = curFrame.contentDocument.body.offsetWidth + 16 + "px";
3530		}
3531		else if (curFrame.Document && curFrame.Document.body.scrollWidth) { //ie5+ syntax
3532			curFrame.style.width = curFrame.Document.body.scrollWidth + "px";
3533		}
3534
3535	}
3536	function resizeIframe(curFrame, defaultHeight) {
3537
3538		curFrame.style.display = "block";
3539		if (defaultHeight == null) {
3540			defaultHeight = 0;
3541		}
3542
3543		var height = 0;
3544		if (curFrame.contentDocument && curFrame.contentDocument.body.offsetHeight) { //ns6 syntax
3545			height = curFrame.contentDocument.body.offsetHeight + 16;
3546		}
3547		else if (curFrame.Document && curFrame.Document.body.scrollHeight) { //ie5+ syntax
3548			height = curFrame.Document.body.scrollHeight + 16;
3549		}
3550		if (height < defaultHeight) {
3551			height = defaultHeight;
3552		}
3553		curFrame.style.height = height+"px";
3554	}
3555
3556	function resizeIframe(curFrame, defaultWeight, defaultHeight) {
3557		curFrame.style.display = "block";
3558		if (defaultHeight == null) {
3559			defaultHeight = 0;
3560		}
3561
3562		var height = 0;
3563		if (curFrame.contentDocument && curFrame.contentDocument.body.offsetHeight) { //ns6 syntax
3564			height = curFrame.contentDocument.body.offsetHeight + 16;
3565		}
3566		else if (curFrame.Document && curFrame.Document.body.scrollHeight) { //ie5+ syntax
3567			height = curFrame.Document.body.scrollHeight + 16;
3568		}
3569		if (height < defaultHeight) {
3570			height = defaultHeight;
3571		}
3572		curFrame.style.width  = defaultWeight+"px";
3573		curFrame.style.height = height+"px";
3574	}
3575
3576	function resizeWindow(curFrame) {
3577		if (curFrame.contentDocument && curFrame.contentDocument.body.offsetHeight) { //ns6 syntax
3578			curFrame.style.height = curFrame.contentDocument.body.offsetHeight + 16 + "px";
3579		}
3580		else if (curFrame.Document && curFrame.Document.body.scrollHeight) { //ie5+ syntax
3581			curFrame.style.height = curFrame.Document.body.scrollHeight + "px";
3582		}
3583		if (curFrame.contentDocument && curFrame.contentDocument.body.offsetWidth) { //ns6 syntax
3584			curFrame.style.width = curFrame.contentDocument.body.offsetWidth + 16 + "px";
3585		}
3586		else if (curFrame.Document && curFrame.Document.body.scrollWidth) { //ie5+ syntax
3587			curFrame.style.width = curFrame.Document.body.scrollWidth + "px";
3588		}
3589
3590	}
3591
3592	function Resize_Contents_Frame(width){
3593		var Frame_Body  = document.body;
3594		//var width = Frame_Body.clientWidth+10;//Frame_Body.scrollWidth + (Frame_Body.offsetWidth-Frame_Body.clientWidth);
3595		var height = Frame_Body.scrollHeight+30;//Frame_Body.scrollHeight + (Frame_Body.offsetHeight-Frame_Body.clientHeight);
3596
3597		this.resizeTo(width, height)
3598	}
3599
3600	function popupAutoResize() {
3601	    var thisX = parseInt(document.body.scrollWidth);
3602	    var thisY = parseInt(document.body.scrollHeight);
3603	    var maxThisX = screen.width - 50;
3604	    var maxThisY = screen.height - 50;
3605	    var marginY = 0;
3606	    // 브라우저별 높이 조절. (표준 창 하에서 조절해 주십시오.)
3607	    if (navigator.userAgent.indexOf("MSIE 8") > 0) { // IE 6.x
3608	    	marginY = 100;
3609	    } else if (navigator.userAgent.indexOf("MSIE 7") > 0) { // IE 6.x
3610	    	marginY = 80;
3611	    } else if(navigator.userAgent.indexOf("MSIE 6") > 0) { // IE 7.x
3612	    	 marginY = 45;
3613	    } else if(navigator.userAgent.indexOf("Firefox") > 0) { // FF
3614	    	marginY = 100;
3615	    } else if(navigator.userAgent.indexOf("Opera") > 0) { // Opera
3616	    	marginY = 30;
3617	    } else if(navigator.userAgent.indexOf("Netscape") > 0) {// Netscape
3618	    	marginY = -2;
3619	    } else {
3620	    	marginY = 100;
3621	    }
3622	    //alert( " thisX : " + thisX + ", marginY : " + marginY);
3623	    if (thisX > maxThisX) {
3624	        window.document.body.scroll = "yes";
3625	        thisX = maxThisX;
3626	    }
3627	    if (thisY > maxThisY - marginY) {
3628	        window.document.body.scroll = "yes";
3629	        thisX += 19;
3630	        thisY = maxThisY - marginY;
3631	    }
3632	    window.resizeTo(thisX+10, thisY+marginY);
3633
3634	    // 센터 정렬
3635	    // var windowX = (screen.width - (thisX+10))/2;
3636	    // var windowY = (screen.height - (thisY+marginY))/2 - 20;
3637	    // window.moveTo(windowX,windowY);
3638	}
3639
3640	function  getBrowserMargin(){
3641	    var marginY = 0;
3642	    //alert(navigator.userAgent);
3643		if (navigator.userAgent.indexOf("MSIE 7") > 0) { // IE 6.x
3644			marginY = 80;
3645		} else if(navigator.userAgent.indexOf("MSIE 6") > 0) { // IE 7.x
3646			 marginY = 45;
3647		} else if(navigator.userAgent.indexOf("Firefox") > 0) { // FF
3648			marginY = 100;
3649		} else if(navigator.userAgent.indexOf("Opera") > 0) { // Opera
3650			marginY = 30;
3651		} else if(navigator.userAgent.indexOf("Netscape") > 0) {// Netscape
3652			marginY = -2;
3653		} else {
3654			marginY = 100;
3655		}
3656
3657		return marginY;
3658	}
3659
3660	function getFileIcon(fileName) {
3661		var	ext			= "";
3662		var	iconImg		= "";
3663		if (fileName != "") {
3664			ext	= fileName.substring(fileName.length-3,fileName.length)
3665	        ext = ext.toLowerCase();
3666
3667			if (ext == "gz" || ext == "zip" || ext == "rar" || ext == "arj"
3668				|| ext == "lzh" || ext == "tar" || ext == "cab" || ext == "alz") {
3669				iconImg			=	"zip";
3670			}
3671			else if (ext == "gif" || ext == "jpg" || ext == "bmp" || ext == "pcx"
3672				|| ext == "tif" || ext == "png" ) {
3673				iconImg			=	"image";
3674			}
3675			else if (ext == "exe" || ext == "com" || ext == "dll") {
3676				iconImg			=	"exe";
3677			}
3678			else if (ext == "htm" || ext == "html") {
3679				iconImg			=	"html";
3680			}
3681			else if (ext == "hwp") {
3682				iconImg			=	"hwp";
3683			}
3684			else if (ext == "mov" || ext == "avi" || ext == "mpg" || ext == "mpeg" || ext == "wmv") {
3685				iconImg			=	"mov";
3686			}
3687			else if (ext == "wav" || ext == "mod" || ext == "mid" || ext == "wma") {
3688				iconImg			=	"sound";
3689			}
3690			else if (ext == "txt" || ext == "log" || ext == "dat"
3691					|| ext == "ini" || ext == "sql") {
3692				iconImg			=	"text";
3693			}
3694			else if (ext == "xls" || ext == "csv") {
3695				iconImg			=	"xls";
3696			}
3697			else if (ext == "doc") {
3698				iconImg			=	"doc";
3699			}
3700			else if (ext == "ppt") {
3701				iconImg			=	"ppt";
3702			}
3703			else if (ext == "pdf") {
3704				iconImg			=	"pdf";
3705			}
3706			else {
3707				iconImg			=	"etc";
3708			}
3709
3710			return	iconImg + ".gif";
3711		}
3712		else {
3713			return	"";
3714		}
3715	}
3716
3717	function getThumIcon(fileName) {
3718		var	ext			= "";
3719		var	iconImg		= "";
3720		if (fileName != "") {
3721			ext = fileName.substr(fileName.lastIndexOf(".")+1);
3722	        ext = ext.toLowerCase();
3723
3724			if (ext == "avi" || ext == "mov" || ext == "mpg" || ext == "mpeg" || ext == "wmv" || ext == "asf" || ext == "rm" || ext == "flv" || ext == "mp4") {
3725				iconImg = "icon-movie.gif";
3726			}
3727			else if (ext == "mp3" || ext == "wav" || ext == "wma" || ext == "ogg") {
3728				iconImg = "sound.gif";
3729			}
3730			else if (ext == "pdf") {
3731				iconImg = "icon-pdf.gif";
3732			}
3733			else if (ext == "mind") {
3734				iconImg = "icon-mindmap.gif";
3735			}
3736
3737			return iconImg;
3738		}
3739		else {
3740			return	"";
3741		}
3742	}
3743
3744
3745	function getThumIconForPad(fileName) {
3746		var	ext			= "";
3747		var	iconImg		= "";
3748		if (fileName != "") {
3749			ext = fileName.substr(fileName.lastIndexOf(".")+1);
3750	        ext = ext.toLowerCase();
3751
3752			if (ext == "avi" || ext == "mov" || ext == "mpg" || ext == "mpeg" || ext == "wmv" || ext == "asf" || ext == "rm" || ext == "flv" || ext == "mp4") {
3753				iconImg = "feedMov";
3754			}
3755			else if (ext == "mp3" || ext == "wav" || ext == "wma" || ext == "ogg" ) {
3756				iconImg = "mic-ico";
3757			}
3758			else if (ext == "pdf") {
3759				iconImg = "feedPdf";
3760			}
3761			else if (ext == "mind") {
3762				iconImg = "feedMindmap";
3763			}
3764
3765			return iconImg
3766		}
3767		else {
3768			return	"";
3769		}
3770	}
3771
3772
3773
3774	//공지사항 팝업 쿠키
3775	function setCookie( name, value, expiredays ) {
3776		var today = new Date();
3777		today.setDate( today.getDate() + expiredays );
3778		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";";
3779	}
3780
3781	//공지사항 팝업 쿠키
3782	function getCookie(name) {
3783	  	var prefix = name + "=";
3784	  	var cookieStartIndex = document.cookie.indexOf(prefix);
3785
3786		if(cookieStartIndex == -1) return null;
3787
3788	  	var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
3789	  	if (cookieEndIndex == -1) cookieEndIndex = document.cookie.length;
3790
3791	  	return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
3792	}
3793
3794	/**
3795	* HTML 태그를 제거해준다.
3796	**/
3797	function stripHTMLtag(string) {
3798	   var objStrip = new RegExp();
3799	   objStrip = /[<][^>]*[>]/gi;
3800	   return string.replace(objStrip, "");
3801	}
3802
3803	function setPng24(obj) {
3804	 obj.width=obj.height=1;
3805	 obj.className=obj.className.replace(/\bpng24\b/i,'');
3806	 obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
3807	 obj.src='';
3808	 return '';
3809	 }
3810
3811	function bluring(){
3812		if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
3813	}
3814	document.onfocusin=bluring;
3815
3816
3817	function replaceAll(str,orgStr,repStr)
3818	{
3819	    return str.split(orgStr).join(repStr);
3820	}
3821
3822
3823	/**
3824	 * 수직방향으로 같은 값을 가진 cell 을 merge 한다.
3825	 *
3826
3827	 * [IE 6.0], [FireFox 2.0]
3828
3829	 *
3830	 * <입력 파라미터>
3831	 * - table : Table 객체
3832	 * - startRowIdx : 테이블의 몇 번째 row 에서부터 merge 를 수행할 지 결정하는 row's Index
3833	 * - cellIdx : merge 하기 위한 테이블의 cell's Index
3834	 *
3835	 * <반환값>
3836	 * - 없음
3837	 *
3838	 * ex) var table = document.getElementById("tbl");
3839	 *     mergeVerticalCell(table, 0, 0);
3840	 *
3841	 */
3842	function mergeVerticalCell(table, startRowIdx, cellIdx) {
3843	  var rows            = table.getElementsByTagName("tr");
3844	  var numRows         = rows.length;
3845	  var numRowSpan      = 1;
3846	  var currentRow      = null;
3847	  var currentCell     = null;
3848	  var currentCellData = null;
3849	  var nextRow         = null;
3850	  var nextCell        = null;
3851	  var nextCellData    = null;
3852
3853	  for (var i = startRowIdx; i < (numRows-1); i++) {   // i 는 row's index
3854
3855	    // 새롭게 cell merge 를 해야하면,
3856	    // 현재(비교의 기준이 되는..) row, cell, data 구함
3857	    if (numRowSpan <= 1) {
3858	      currentRow      = table.getElementsByTagName('tr')[i];
3859	      currentCell     = currentRow.getElementsByTagName('td')[cellIdx];
3860	      currentCellData = currentCell.childNodes[0].data;
3861	    }
3862
3863
3864	    if (i < numRows-1) {  // 현재 row 가 마지막 row 가 아니면
3865
3866	      // 다음 row, cell, data 구함
3867	      if (table.getElementsByTagName('tr')[i+1]) {
3868	        nextRow       = table.getElementsByTagName('tr')[i+1];
3869	        nextCell      = nextRow.getElementsByTagName('td')[cellIdx];
3870	        nextCellData  = nextCell.childNodes[0].data;
3871
3872	        // 현재 cell == 다음 cell 이면, merge
3873	        if (currentCellData == nextCellData) {
3874	          numRowSpan              += 1;
3875	          currentCell.rowSpan     = numRowSpan;
3876	          nextCell.style.display  = 'none';
3877
3878	        // 현재 cell != 다음 cell 이면,
3879	        // 새로운 현재(비교의 기준이 되는..) cell 을 구할 수 있도록 초기화
3880	        } else {
3881	          numRowSpan = 1;
3882
3883	        }
3884	      }
3885	    }
3886	  }
3887	}
3888
3889	function formRealValidation(){
3890		var forms = document.forms;
3891		var flength = forms.length;
3892		for(var i=0; i < flength; i++){
3893			var form = forms[i];
3894			for (i = 0; i < form.elements.length; i++) {
3895	            var obj = form.elements[i];
3896	            var type = obj.type;
3897	            if(type == "text"){
3898	            	var isEvent = false;
3899	            	var dataType = obj.getAttribute("dataType");
3900	            	if(dataType == "integer" || dataType == "number")
3901	            		isEvent = true;
3902		            if(isEvent){
3903		            	if(obj.attachEvent){
3904		            		obj.attachEvent("onkeydown", onlyNumberInput);
3905		            	} else {
3906		            		obj.addEventListener("keydown", onlyNumberInput, false);
3907		            	}
3908		            }
3909	            }
3910			}
3911		}
3912	}
3913
3914	function onlyNumberInput(event, id, sel){
3915		onlyNumber(event);
3916		onlyNumberInputCheck(id, sel);
3917
3918	}
3919
3920	function onlyNumber(event){
3921		var code = event.keyCode;
3922	 	event.returnValue = false;
3923	 	if ((code > 32 && code < 48) || (code > 57 && code < 61) || (code > 61 && code < 65) || (code > 90 && code < 97) || (code > 34 && code < 41) || (code > 47 && code < 58) || (code > 95 && code < 106) || code == 8 || code == 9 || code == 13 || code == 46){
3924	 		event.returnValue = true;
3925	  		return;
3926	 	}
3927	 	if(!event.returnValue && event.returnValue != undefined){
3928	 		event.returnValue = false;
3929	 	} else {
3930	 		event.preventDefault();
3931	 	}
3932	}
3933
3934	var pos = new Array("1","2","3","4");
3935	var agent = window.navigator.userAgent;
3936	var busy = false;
3937	function onlyNumberInputCheck(id, sel){
3938		if( !busy && pos[sel] != document.getElementById(id).value && document.getElementById(id).value !="") {
3939		    busy = true;
3940
3941		      var str = document.getElementById(id).value;
3942
3943		        if( !isNumCheck(str)) {
3944		          if(agent.indexOf("Macintosh") != -1)
3945		            {
3946		        	    document.getElementById(id).value="";
3947		                alert("숫자를 입력해 주십시오..");
3948		                document.getElementById(frm).value="";
3949		                pos[sel] = "";
3950		            }
3951		            else {
3952		            	alert("숫자를 입력해 주십시오.");
3953		                document.getElementById(id).value="";
3954		            }
3955		        }  else { pos[sel] = document.getElementById(id).value; }
3956
3957		    busy = false;
3958		    }
3959		  else { setTimeout("onlyNumberInputCheck('"+id+"')",10); }
3960	}
3961
3962	function isCharsCehck(input,chars)
3963	{
3964	  for(var i=0; i< input.length; i++) {
3965	    if(chars.indexOf(input.charAt(i)) == -1)
3966	    return false;
3967	  }
3968	  return  true;
3969	}
3970
3971	function isNumCheck(input)
3972	{
3973	  var chars = "0123456789";
3974	  return isCharsCehck(input,chars);
3975	}
3976
3977	/**
3978	 * 비밀번호 체크
3979	 * @param str		문자열
3980	 * @param idx		구분자를 기준으로 n번째 문자열 추출
3981	 * @param divideStr 구분문자
3982	 */
3983
3984	function checkPassword(p_pwd, p_cono, obj) {
3985		var chk_pwd = p_pwd;
3986		var chk_num = chk_pwd.search(/[0-9]/g);
3987		var chk_eng = chk_pwd.search(/[a-z]/ig);
3988
3989		var sp_filter =  /[~!@\#$%<>^&*\()\-=+_\']/gi;
3990		var blank_filter = /[\s]/g;
3991
3992	    var chk_sp  =  sp_filter.test(chk_pwd);
3993
3994	    if(chk_pwd.length < 10 ){
3995			  alert("비밀번호는 10자 이상의  영문, 숫자, 특수문자를 혼합해서 사용하셔야합니다..");
3996			  obj.focus();
3997			  return false;
3998		}
3999
4000	    if(chk_num <0 || chk_eng <0 || !chk_sp){
4001			  alert("비밀번호는 영문자와 숫자, 특수문자를 혼용하여야 합니다.");
4002			  obj.focus();
4003			  return false;
4004		 }
4005
4006
4007		 if(/(\w)\1\1\1/.test(chk_pwd)){
4008			 alert("비밀번호에 같은 문자를 4번 이상 사용하실 수 없습니다.");
4009			  obj.focus();
4010			  return false;
4011		 }
4012
4013		 if(chk_pwd.search(p_cono) > -1){
4014			 alert("아이디가 포함된 비밀번호는 사용하실 수 없습니다.");
4015			  obj.focus();
4016			  return false;
4017		 }
4018
4019		 if(blank_filter.test(chk_pwd)){
4020			 alert("비밀번호는 공백을 사용할 수 없습니다.");
4021			  obj.focus();
4022			  return false;
4023		 }
4024
4025		 var chk_conNext	= 0; //연속성(+) 카운드
4026		 var chk_conBefore  = 0; //연속성(-) 카운드
4027		 var chkchar1;
4028		 var chkchar2;
4029		 var isflag = false;
4030
4031		 for(var i=0; i < chk_pwd.length; i++)
4032		 {
4033		 	chkchar1 = chk_pwd.charAt(i);
4034		    chkchar2 = chk_pwd.charAt(i+1);
4035
4036			//연속성(+) 카운드
4037			if(chkchar1.charCodeAt(0) - chkchar2.charCodeAt(0) == 1  )
4038		    {
4039		    	chk_conNext = chk_conNext + 1;
4040			}else {
4041				chk_conNext = 0;
4042			}
4043			//연속성(-) 카운드
4044		    if(chkchar1.charCodeAt(0) - chkchar2.charCodeAt(0) == -1  )
4045		    {
4046		    	chk_conBefore = chk_conBefore + 1;
4047			} else{
4048				chk_conBefore = 0;
4049			}
4050
4051		    if(chk_conNext > 1 || chk_conBefore > 1 )
4052			 {
4053		    	isflag = true;
4054			  	break;
4055			 }
4056		 }
4057
4058		 if(isflag )
4059		 {
4060		 	alert("연속된 문자열을 3자 이상 사용 할 수 없습니다.");
4061		 	obj.focus();
4062		  	return false;
4063		 }
4064
4065		return true;
4066
4067	}
4068
4069
4070	/**
4071	 * 비밀번호 체크(특수문자포함)
4072	 * @param str		문자열
4073	 * @param idx		구분자를 기준으로 n번째 문자열 추출
4074	 * @param divideStr 구분문자
4075	 */
4076
4077	function checkPassword2(p_pwd, /*p_cono,*/ obj) {
4078		var chk_pwd = p_pwd;
4079		var sp_filter =  /[~!@\#$%<>^&*\()\-=+_\']/gi;
4080		var blank_filter = /[\s]/g;
4081
4082		var chk_num = chk_pwd.search(/[0-9]/g);
4083		var chk_eng = chk_pwd.search(/[a-z]/ig);
4084		var chk_sp =chk_pwd.search(sp_filter);
4085
4086
4087		//var chk_sp  =  sp_filter.test(chk_pwd);
4088
4089		if(chk_pwd.length < 8 ){
4090			alert("비밀번호는 8자 이상의 영문, 숫자, 특수기호를 혼합해서 사용하실 수 있습니다.");
4091			obj.focus();
4092			return false;
4093		}
4094
4095		/*if(!/^[a-zA-Z0-9]{10,20}$/.test(chk_pwd)){
4096			  alert("비밀번호는 영문자, 숫자, 특수문자의 조합으로 8자리 이상 입력해 주십시오.");
4097			  obj.focus();
4098			  return false;
4099		}*/
4100
4101		if(chk_num <0 || chk_eng <0 || chk_sp < 0){
4102			alert("비밀번호는 숫자와 영문자, 특수문자를 혼용하여야 합니다.");
4103			obj.focus();
4104			return false;
4105		}
4106
4107
4108		if(/(\w)\1\1\1/.test(chk_pwd)){
4109			alert("비밀번호에 같은 문자를 4번 이상 사용하실 수 없습니다.");
4110			obj.focus();
4111			return false;
4112		}
4113		/*
4114		if(chk_pwd.search(p_cono) > -1){
4115			alert("아이디가 포함된 비밀번호는 사용하실 수 없습니다.");
4116			obj.focus();
4117			return false;
4118		}
4119		*/
4120		if(blank_filter.test(chk_pwd)){
4121			alert("비밀번호는 공백을 사용할 수 없습니다.");
4122			obj.focus();
4123			return false;
4124		}
4125
4126		var chk_conNext	= 0; //연속성(+) 카운드
4127		var chk_conBefore  = 0; //연속성(-) 카운드
4128		var chkchar1;
4129		var chkchar2;
4130		var isflag = false;
4131
4132		for(var i=0; i < chk_pwd.length; i++)
4133		{
4134			chkchar1 = chk_pwd.charAt(i);
4135			chkchar2 = chk_pwd.charAt(i+1);
4136
4137			//연속성(+) 카운드
4138			if(chkchar1.charCodeAt(0) - chkchar2.charCodeAt(0) == 1  )
4139			{
4140				chk_conNext = chk_conNext + 1;
4141			}else {
4142				chk_conNext = 0;
4143			}
4144			//연속성(-) 카운드
4145			if(chkchar1.charCodeAt(0) - chkchar2.charCodeAt(0) == -1  )
4146			{
4147				chk_conBefore = chk_conBefore + 1;
4148			} else{
4149				chk_conBefore = 0;
4150			}
4151
4152			if(chk_conNext > 1 || chk_conBefore > 1 )
4153			{
4154				isflag = true;
4155				break;
4156			}
4157		}
4158
4159		if(isflag )
4160		{
4161			alert("연속된 문자열을 3자 이상 사용 할 수 없습니다.");
4162			obj.focus();
4163			return false;
4164		}
4165
4166		return true;
4167
4168	}
4169
4170	/**
4171	 * 비밀번호 체크(특수문자포함)
4172	 * @param str		문자열
4173	 * @param idx		구분자를 기준으로 n번째 문자열 추출
4174	 * @param divideStr 구분문자
4175	 */
4176
4177	function checkPassword3(p_pwd, /*p_cono,*/ view) {
4178		var chk_pwd = p_pwd;
4179		var sp_filter =  /[~!@\#$%<>^&*\()\-=+_\']/gi;
4180		var blank_filter = /[\s]/g;
4181
4182		var chk_num = chk_pwd.search(/[0-9]/g);
4183		var chk_eng = chk_pwd.search(/[a-z]/ig);
4184		var chk_sp =chk_pwd.search(sp_filter);
4185
4186
4187		//var chk_sp  =  sp_filter.test(chk_pwd);
4188
4189		if(chk_pwd.length < 8 ){
4190			view.innerHTML = "비밀번호는 8자 이상의 영문, 숫자, 특수기호를 혼합해서 사용하실 수 있습니다.";
4191			return false;
4192		}
4193
4194		/*if(!/^[a-zA-Z0-9]{10,20}$/.test(chk_pwd)){
4195			  alert("비밀번호는 영문자, 숫자, 특수문자의 조합으로 8자리 이상 입력해 주십시오.");
4196			  obj.focus();
4197			  return false;
4198		}*/
4199
4200		if(chk_num <0 || chk_eng <0 || chk_sp < 0){
4201			view.innerHTML = "비밀번호는 숫자와 영문자, 특수문자를 혼용하여야 합니다.";
4202			return false;
4203		}
4204
4205
4206		if(/(\w)\1\1\1/.test(chk_pwd)){
4207			view.innerHTML = "비밀번호에 같은 문자를 4번 이상 사용하실 수 없습니다.";
4208			return false;
4209		}
4210		/*
4211		if(chk_pwd.search(p_cono) > -1){
4212			alert("아이디가 포함된 비밀번호는 사용하실 수 없습니다.");
4213			obj.focus();
4214			return false;
4215		}
4216		*/
4217		if(blank_filter.test(chk_pwd)){
4218			view.innerHTML = "비밀번호는 공백을 사용할 수 없습니다.";
4219			return false;
4220		}
4221
4222		var chk_conNext	= 0; //연속성(+) 카운드
4223		var chk_conBefore  = 0; //연속성(-) 카운드
4224		var chkchar1;
4225		var chkchar2;
4226		var isflag = false;
4227
4228		for(var i=0; i < chk_pwd.length; i++)
4229		{
4230			chkchar1 = chk_pwd.charAt(i);
4231			chkchar2 = chk_pwd.charAt(i+1);
4232
4233			//연속성(+) 카운드
4234			if(chkchar1.charCodeAt(0) - chkchar2.charCodeAt(0) == 1  )
4235			{
4236				chk_conNext = chk_conNext + 1;
4237			}else {
4238				chk_conNext = 0;
4239			}
4240			//연속성(-) 카운드
4241			if(chkchar1.charCodeAt(0) - chkchar2.charCodeAt(0) == -1  )
4242			{
4243				chk_conBefore = chk_conBefore + 1;
4244			} else{
4245				chk_conBefore = 0;
4246			}
4247
4248			if(chk_conNext > 1 || chk_conBefore > 1 )
4249			{
4250				isflag = true;
4251				break;
4252			}
4253		}
4254
4255		if(isflag )
4256		{
4257			view.innerHTML = "연속된 문자열을 3자 이상 사용 할 수 없습니다.";
4258			return false;
4259		}
4260
4261		return true;
4262
4263	}
4264
4265	function isNull(obj){
4266		if(obj == null || obj == undefined){
4267			return true;
4268		}
4269		return false;
4270	}
4271
4272	function isNull2(obj){
4273		if(obj == null || obj == undefined || obj == ""){
4274			return true;
4275		}
4276		return false;
4277	}
4278
4279	//팝업창 가운데 위치 변경
4280	function centerPopWindow(formName, ww, wh){
4281		if (formName) {
4282		sw = screen.availWidth;
4283		sh = screen.availHeight;
4284		}
4285		if (document.all) {
4286		sw = screen.width;
4287		sh = screen.height;
4288		}
4289		w = (sw - ww)/2;
4290		h = (sh - wh)/2;
4291		window.moveTo(w,h);
4292	}
4293
4294	//팝업창 풀스크린으로 띄우기
4295	function fullScreenPopWindow( url ){
4296		window.open(url,'popupname','scrollbars=yes,width='+screen.width+',height='+screen.height);
4297	}
4298
4299	function fullScreenPopWindow1( url ){
4300		window.open(url,'popupname','scrollbars=yes,location=yes,menubar=yes,toolbar=yes,width='+screen.width+',height='+screen.height );
4301	}
4302
4303	function Browser()
4304	{
4305	    var browser = navigator.userAgent.toLowerCase();
4306
4307	    this.getName = function() {
4308	        var names = {
4309	            ie6 : browser.indexOf('msie 6') != -1,
4310	            ie7 : browser.indexOf('msie 7') != -1,
4311	            ie8 : browser.indexOf('msie 8') != -1,
4312	            chrome : browser.indexOf('chrome') != -1,
4313	            firefox : browser.indexOf('firefox') != -1
4314	        };
4315
4316	        for (var name in names)
4317	        {
4318	            if (names[name])
4319	                return name;
4320	        }
4321	        return 'other';
4322	    }
4323	}
4324
4325	//글자 자르기
4326	function byteLengthCut( val, len ) {
4327		var count = 0;
4328
4329		for(var i = 0; i < val.length; i++) {
4330			if(escape(val.charAt(i)).length >= 4)
4331				count += 2;
4332			else
4333				if(escape(val.charAt(i)) != "%0D")
4334					count++;
4335
4336
4337			if( count >  len ) {
4338				if(escape(val.charAt(i)) == "%0A")
4339					i--;
4340				break;
4341			}
4342		}
4343		return val.substring(0, i);
4344	}
4345
4346	function searchTextBlankCheck(searchText){
4347		var tmp_Txt = rtrim(ltrim(searchText));
4348
4349		if(tmp_Txt == ""){
4350			alert("검색어를 입력해 주십시오.");
4351			return false;
4352		}else{
4353			return true;
4354		}
4355
4356
4357	}
4358
4359	function postRemaking(orgStr, tranStr, appendlen){
4360		var remakingStr = jsNvl(orgStr, "");
4361		if(remakingStr.length < appendlen){
4362			appendlen = remakingStr.length;
4363		}
4364		remakingStr= remakingStr.substring(0, remakingStr.length-appendlen);
4365		for(var i = 0; i < appendlen; i++){
4366			remakingStr += tranStr;
4367		}
4368		return remakingStr;
4369	}
4370
4371
4372	function remarkString(stringVal, markLeng, type){
4373		var value = stringVal;
4374		var markValue = "";
4375
4376
4377
4378		for(var i = 0; i < markLeng; i++){
4379			markValue += "*";
4380		}
4381
4382		if(stringVal == undefined || stringVal == null || stringVal == "" || stringVal.length < markLeng){
4383			return markValue;
4384		}
4385
4386		if(type == undefined || type == null || type == ""){
4387			type = "default";
4388		}
4389
4390		if(type == "email"){
4391			var mailId = "";
4392			var mailDomain = "";
4393
4394			if( value.indexOf("@") < 0){
4395				value = value.substring(0, value.length - markLeng) + markValue;
4396				return value;
4397			}
4398
4399			mailId  = value.substring(0, value.indexOf("@"));
4400			if(mailId.length <= markLeng){
4401				mailId = markValue;
4402			}else{
4403				mailId = mailId.substring(0, mailId.length - markLeng) + markValue;
4404			}
4405
4406			mailDomain = value.substring(value.indexOf("@") + 1);
4407
4408			value = mailId + "@" + mailDomain;
4409		}else{
4410			value = value.substring(0, value.length - markLeng) + markValue;
4411		}
4412
4413		return value;
4414	}
4415
4416	/**
4417	 * 전화번호 등  '*' remark 된 항목 수정시 기존값과 비교하여  기존값( form.data)을 변경한다.  (한글은 테스트 하지 않음)
4418	 * remarkValueChange(this.value, 'p_hometel3', 'form1');
4419	 * @param newStr   input 태그에 입력된 값 ( 수정값 )
4420	 * @param key      기존값을 저장하는  form.data 의 키
4421	 * @param formname  Form  name
4422	 * @return 변환된 UTF-8형식 데이터
4423	 */
4424	function remarkValueChange( newStr, key , formname){
4425
4426		var form =  jQuery("form[name="+formname+"]");
4427		var oldStr = form.data(key)
4428
4429
4430		var oldStr_len = oldStr.length;
4431		var newStr_len = newStr.length;
4432		var changeStr = "" ;
4433		// *: 42
4434		for(i = 0 ; i < newStr_len ; i++){
4435
4436			if( i < oldStr_len &&  ( newStr.charCodeAt(i) == "42" ||  oldStr.charAt(i) == newStr.charAt(i) )   ){
4437				changeStr +=  oldStr.charAt(i) ;
4438			}else {
4439				changeStr +=  newStr.charAt(i) ;
4440			}
4441
4442		}
4443
4444		form.data(key, changeStr );
4445
4446		return true;
4447	}
4448
4449	/**
4450	 * 위치 조정 가능한 팝업
4451	 * @param s_url
4452	 * @param s_name
4453	 * @param s_width
4454	 * @param s_height
4455	 * @param s_scroll
4456	 * @param s_resize
4457	 * @param s_top
4458	 * @param s_left
4459	 * @returns
4460	 */
4461	function Position_Variable_Popup1(s_url, s_name, s_width, s_height, s_scroll, s_resize, s_top, s_left) {
4462
4463		var ls_pri = "toolbar=no, location=no, directories=no, menubar=no, resizable="+s_resize+", scrollbars="+s_scroll+", status=yes ,width="+s_width+", height="+s_height+",top="+s_top+",left="+s_left;
4464
4465		var wd_pop = window.open(s_url, s_name,ls_pri);
4466		if(wd_pop == null) {
4467			alert("현재 사이트의 팝업이 차단되어 있습니다. 차단을 해제해 주십시요.");
4468		   return;
4469		}
4470
4471        var version = navigator.appVersion;
4472        var addHeight = 0;
4473        if(version.indexOf("MSIE 7.0") > -1) addHeight=50;
4474
4475		//wd_pop.blur();
4476		//wd_pop.resizeTo(s_width, s_height+addHeight);
4477        //var aw = window.screen.availWidth;
4478        //var ah = window.screen.availHeight;
4479		//wd_pop.moveTo(((aw - eval(s_width))/2),((ah - eval(s_height))/2));
4480		wd_pop.focus();
4481
4482		return wd_pop;
4483	}
4484
4485	/**
4486	 * 함수명 : selectbox droupkick reload 함수
4487	 * @param obj_id : reload 객체id
4488	 * @param f_optionyn : 첫번째 옵션 세팅여부 (Y,N)
4489	 * @param f_optionyn_msg : 첫번째 옵션 메세지 (선택, 전체 등등)
4490	 * @param list : 옵션 데이터 목록
4491	**/
4492	/*
4493	function droupkickSelectboxReload(obj_id, f_optionyn, f_optionyn_msg, list){
4494		 jQuery("#dk_container_"+obj_id+" >  div > ul > li").remove(); //하위옵션 전부 삭제
4495
4496		if("Y" == f_optionyn){
4497			jQuery("#dk_container_"+obj_id+" > a> span").html(f_optionyn_msg); //첫번째 select 초기값 세팅
4498			jQuery("#dk_container_"+obj_id+" >  div > ul ").append("<li class='dk_option_current'><a data-dk-dropdown-value=''>"+f_optionyn_msg+"</a></li>"); //첫번째 select option 추가
4499		}
4500
4501		jQuery.each(list, function(i){
4502			if("N" == f_optionyn && i == 0){ //첫번째 옵션 세팅여부가 N인 경우 목록중 첫번째 데이터를 첫번째 옵션으로 세팅
4503				jQuery("#dk_container_"+obj_id+" >  div > ul ").append("<li class='dk_option_current'><a data-dk-dropdown-value='"+list[i].CODE+"'>"+list[i].CODENM+"</a></li>"); //첫번째 select option 추가
4504			}
4505
4506			jQuery("#dk_container_"+obj_id+" >  div > ul ").append("<li><a data-dk-dropdown-value='"+list[i].CODE+"'>"+list[i].CODENM+"</a></li>");
4507		});
4508	}*/
4509
4510
4511	/**
4512	 * 함수명 : selectbox droupkick 첫번째 옵션 선택 함수
4513	 * @param obj_id : 옵션선택 객체id
4514	 * @param f_optionyn_value : 첫번째 옵션 value
4515	 * @param f_optionyn_msg : 첫번째 옵션 메세지 (선택, 전체 등등)
4516	**/
4517	/*
4518	function droupkickSelectboxSetFirstItem(obj_id, f_optionyn_value, f_optionyn_msg){
4519
4520		jQuery("#"+obj_id).val(f_optionyn_value); //select box 첫번째 옵션 선택
4521		jQuery("#dk_container_"+obj_id+" > a> span").html(f_optionyn_msg); //design select box 첫번째 옵션 세팅
4522		jQuery("#dk_container_"+obj_id+" >  div > ul > li").removeClass(); //기존에 선택 class 제거
4523
4524		jQuery.each(jQuery("#dk_container_"+obj_id+" >  div > ul > li"), function(i){
4525			if(i == 0){
4526				jQuery(this).addClass("dk_option_current"); //첫번째 항목에 선택 class 추가
4527			}
4528		});
4529	}*/
4530
4531	/**
4532	 * 함수명 :글자수 카운트 해서 짤라 와서  ... 붙이기
4533	 * @param  str : 글자수 자를 데이터
4534	 * @param  maxSize : 자를 제한 길이
4535	 */
4536	function noticeByteCnt(str, maxSize){
4537		var li_byte = 0;
4538
4539		for(var i=0;i < str.length;i++) {
4540	  		if(escape(str.charAt(i)).length > 3) {
4541	   			li_byte += 2;
4542	  		} else li_byte++;
4543
4544	  		if(li_byte > maxSize) {
4545	   			str = str.substring(0,i) + " ...";
4546	   			break;
4547	  		}
4548	 	}
4549	 	return str;
4550	}
4551
4552	/**
4553	 * 달력을 띄울 폼에 class='dateSet' 클래스를 지정
4554	 *
4555	 * @param date_calendar_yn
4556	 * @param datefmt
4557	 * @param clearYn
4558	 * @param hidden : 구분자가 제외된 값이 지정되는 폼의 규칙입력 : ex) 클릭폼의 id + _hidden
4559	 * @param view	선택한 날짜가 보여지는 폼의 규칙입력 : ex) 클릭폼의 id + _view
4560	 * ex) fn_datepicker_call('Y', 'YMD','Y','_hidden' , '_view');
4561	 */
4562	function fn_datepicker_call(date_calendar_yn, datefmt,clearYn, hidden, view,event){
4563		var dateFormat = "";
4564		if(datefmt == "YM") {
4565			dateFormat = "yy-mm";
4566		} else {
4567			dateFormat = "yy-mm-dd";
4568		}
4569		jQuery(".dateSet").each(function(){
4570			var id= jQuery(this).attr("id");
4571			jQuery(this).datepicker({
4572				dateFormat:dateFormat,
4573				changeYear: true,
4574				changeMonth: true,
4575				showButtonPanel: true,
4576				dayNamesMin: [  "일", "월", "화", "수", "목", "금", "토" ],
4577				monthNamesShort : [ '1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월' ],
4578				beforeShow: function() {
4579					if(date_calendar_yn == "Y") {
4580						jQuery('#ui-datepicker-div').removeClass('hide-calendar');			//날짜까지 출력
4581					} else {
4582						jQuery('#ui-datepicker-div').addClass('hide-calendar');			//달력만 출력
4583					}
4584					jQuery(".ui-datepicker-current").hide();										//달력 하단 Today 버튼 미출력
4585
4586					//Clear 버튼(초기화) 추가
4587					if(clearYn == "Y"){
4588					 	setTimeout(function() {
4589				            var buttonPane = jQuery("#"+id).datepicker( "widget" ).find( ".ui-datepicker-buttonpane" );
4590				            jQuery( "<button>", {
4591				                text: "Clear",
4592				                click: function() {
4593				                	jQuery("#"+id).val("");
4594				                	if(hidden != undefined){
4595				                		jQuery("#"+id+hidden).val("");
4596				                	}
4597				                	if(view != undefined){
4598				                		jQuery("#"+id+view).val("");
4599				                	}
4600				                }
4601				            }).appendTo( buttonPane ).addClass("ui-datepicker-clear ui-state-default ui-priority-primary ui-corner-all");
4602			        	}, 1 );
4603					}
4604	  			} ,onSelect: function (dateText, inst) {
4605	  				if(hidden != undefined){
4606	  					jQuery("#"+id+hidden).val(dateText.replace(/-/gi, ""));
4607	  				}
4608	  				if(view != undefined){
4609	  					jQuery("#"+id+view).val(dateText);
4610	  				}
4611	  				jQuery("#"+id).blur();
4612	            }
4613			});
4614		})
4615	}
4616
4617	/**
4618	 * 특정 타겟 달력을 띄울 폼 지정
4619	 * @param target : jquery 형식 대상오브젝트
4620	 * @param date_calendar_yn
4621	 * @param datefmt
4622	 * @param clearYn
4623	 * @param hidden : 구분자가 제외된 값이 지정되는 폼의 규칙입력 : ex) 클릭폼의 id + _hidden
4624	 * @param view	선택한 날짜가 보여지는 폼의 규칙입력 : ex) 클릭폼의 id + _view
4625	 * ex) fn_datepicker_call('Y', 'YMD','Y','_hidden' , '_view');
4626	 */
4627	function fn_target_datepicker_call(target,date_calendar_yn, datefmt,clearYn, hidden, view,event){
4628		var dateFormat = "";
4629		if(datefmt == "YM") {
4630			dateFormat = "yy-mm";
4631		} else {
4632			dateFormat = "yy-mm-dd";
4633		}
4634
4635		var id= target;
4636		jQuery("#"+target).datepicker({
4637			dateFormat:dateFormat,
4638			changeYear: true,
4639			changeMonth: true,
4640			showButtonPanel: true,
4641			dayNamesMin: [  "일", "월", "화", "수", "목", "금", "토" ],
4642			monthNamesShort : [ '1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월' ],
4643			beforeShow: function() {
4644				if(date_calendar_yn == "Y") {
4645					jQuery('#ui-datepicker-div').removeClass('hide-calendar');			//날짜까지 출력
4646				} else {
4647					jQuery('#ui-datepicker-div').addClass('hide-calendar');			//달력만 출력
4648				}
4649				jQuery(".ui-datepicker-current").hide();										//달력 하단 Today 버튼 미출력
4650
4651				//Clear 버튼(초기화) 추가
4652				if(clearYn == "Y"){
4653				 	setTimeout(function() {
4654			            var buttonPane = jQuery("#"+target).datepicker( "widget" ).find( ".ui-datepicker-buttonpane" );
4655			            jQuery( "<button>", {
4656			                text: "Clear",
4657			                click: function() {
4658			                	jQuery("#"+target).val("");
4659			                	if(hidden != undefined){
4660			                		jQuery("#"+id+hidden).val("");
4661			                	}
4662			                	if(view != undefined){
4663			                		jQuery("#"+id+view).val("");
4664			                	}
4665			                }
4666			            }).appendTo( buttonPane ).addClass("ui-datepicker-clear ui-state-default ui-priority-primary ui-corner-all");
4667		        	}, 1 );
4668				}
4669  			} ,onSelect: function (dateText, inst) {
4670  				if(hidden != undefined){
4671  					jQuery("#"+id+hidden).val(dateText.replace(/-/gi, ""));
4672  				}
4673  				if(view != undefined){
4674  					jQuery("#"+id+view).val(dateText);
4675  				}
4676  				jQuery("#"+target).blur();
4677            }
4678		});
4679
4680	}
4681
4682	/**
4683	 * 코드구분(cdclsf_id)에 해당하는 코드리스트를 돌려준다.
4684	 *
4685	 * @param cdclsf_id
4686	 */
4687	function fn_getCodeList(cdclsf_id){
4688		var dataList = "";
4689		jQuery.ajax({
4690			url : contextpath + 'common/selectCodeList.do',
4691			async : false,
4692			cache : false,
4693			dataType: 'json',
4694			data : {
4695				p_cdclsf_id : cdclsf_id
4696			},
4697			success : function (data){
4698				dataList =  data.codeList;
4699			},
4700			error : function (error){
4701
4702			}
4703		});
4704		return dataList;
4705	}
4706
4707	/**
4708	 * 윈도우 창 크기에 맞게 Grid resize
4709	 * @param string grid_id 사이즈를 변경할 그리드의 아이디
4710	 * @param string div_id 그리드의 사이즈의 기준을 제시할 div 의 아이디
4711	 * @param string width 그리드의 초기화 width 사이즈
4712	 */
4713	function resizeJqGridWidth(grid_id, div_id, width){
4714	    // window에 resize 이벤트를 바인딩 한다.
4715	    jQuery(window).bind('resize', function() {
4716	        // 그리드의 width 초기화
4717	        jQuery('#' + grid_id).setGridWidth(width, true);
4718	        // 그리드의 width를 div 에 맞춰서 적용
4719	        jQuery('#' + grid_id).setGridWidth(parseInt(jQuery('#' + div_id).width(), 10) , true); //Resized to new width as per window
4720	     }).trigger('resize');
4721	}
4722
4723	/**
4724     * 윈도우 창 크기에 맞게 Grid resize - group headers 존재하는 경우
4725     * @param string grid_id 사이즈를 변경할 그리드의 아이디
4726     * @param string div_id 그리드의 사이즈의 기준을 제시할 div 의 아이디
4727     * @param string width 그리드의 초기화 width 사이즈
4728     * @param string[]
4729     */
4730    function resizeJqGridWidthGroup(grid_id, div_id, width, groupHeader){
4731        // window에 resize 이벤트를 바인딩 한다.
4732        jQuery(window).bind('resize', function() {
4733            jQuery("#" + grid_id).jqGrid('destroyGroupHeader');
4734            // 그리드의 width 초기화
4735            jQuery('#' + grid_id).setGridWidth(width, true);
4736            // 그리드의 width를 div 에 맞춰서 적용
4737            jQuery('#' + grid_id).setGridWidth(parseInt(jQuery('#' + div_id).width(), 10) , true); //Resized to new width as per window
4738
4739            jQuery("#" + grid_id).jqGrid('setGroupHeaders', {
4740                useColSpanStyle: true,
4741                groupHeaders: groupHeader
4742            });
4743         }).trigger('resize');
4744    }
4745
4746    /**
4747     * 윈도우 창 크기에 맞게 Grid resize - (검색 영역이 없는 경우 사용)
4748     * @param string grid_id 사이즈를 변경할 그리드의 아이디
4749     * @param string div_id 그리드의 사이즈의 기준을 제시할 div 의 아이디
4750     * @param string width 그리드의 초기화 width 사이즈
4751     */
4752    function resizeJqGridWidthNoSearch(grid_id, div_id, width){
4753        // window에 resize 이벤트를 바인딩 한다.
4754        jQuery(window).bind('resize', function() {
4755            // 그리드의 width 초기화
4756            jQuery('#' + grid_id).setGridWidth(width, true);
4757            // 그리드의 width를 div 에 맞춰서 적용
4758            jQuery('#' + grid_id).setGridWidth(parseInt(jQuery('#' + div_id).width(), 10), true); //Resized to new width as per window
4759         }).trigger('resize');
4760    }
4761
4762    /**
4763      * 윈도우 창 크기에 맞게 Grid resize - group headers 존재하는 경우 (검색 영역이 없는 경우 사용)
4764     * @param string grid_id 사이즈를 변경할 그리드의 아이디
4765     * @param string div_id 그리드의 사이즈의 기준을 제시할 div 의 아이디
4766     * @param string width 그리드의 초기화 width 사이즈
4767     */
4768    function resizeJqGridWidthGroupNoSearch(grid_id, div_id, width, groupHeader){
4769        // window에 resize 이벤트를 바인딩 한다.
4770        jQuery(window).bind('resize', function() {
4771            jQuery("#" + grid_id).jqGrid('destroyGroupHeader');
4772            // 그리드의 width 초기화
4773            jQuery('#' + grid_id).setGridWidth(width, true);
4774            // 그리드의 width를 div 에 맞춰서 적용
4775            jQuery('#' + grid_id).setGridWidth(parseInt(jQuery('#' + div_id).width(), 10), true); //Resized to new width as per window
4776
4777            jQuery("#" + grid_id).jqGrid('setGroupHeaders', {
4778                useColSpanStyle: true,
4779                groupHeaders: groupHeader
4780            });
4781         }).trigger('resize');
4782    }
4783
4784    /**
4785     * 윈도우 창 크기에 맞게 Grid resize - group headers 존재하는 경우 (검색 영역이 없는 경우 사용)
4786    * @param string grid_id 사이즈를 변경할 그리드의 아이디
4787    * @param string div_id 그리드의 사이즈의 기준을 제시할 div 의 아이디
4788    * @param string width 그리드의 초기화 width 사이즈
4789    */
4790   function resizeJqGridWidthGroupNoSearch2(grid_id, div_id, width, groupHeader){
4791       // window에 resize 이벤트를 바인딩 한다.
4792       jQuery(window).bind('resize', function() {
4793           jQuery("#" + grid_id).jqGrid('destroyGroupHeader');
4794           // 그리드의 width 초기화
4795           jQuery('#' + grid_id).setGridWidth(width, true);
4796           // 그리드의 width를 div 에 맞춰서 적용
4797           jQuery('#' + grid_id).setGridWidth(parseInt(jQuery('#' + div_id).width(), 10), true); //Resized to new width as per window
4798
4799           jQuery("#" + grid_id).jqGrid('setGroupHeaders', {
4800               useColSpanStyle: true,
4801               groupHeaders: groupHeader
4802           });
4803        }).trigger('resize');
4804   }
4805
4806	/**
4807	 * 그리드 cell의 selectbox 옵션에 사용할 option 리스트를 공통코드에서 가져온다.
4808	 * @param code 공통코드
4809	 * @returns {String}
4810	 */
4811	function makeGridOptions(code) {
4812	    var options_list = fn_getCodeList(code);        //공통코드 리스트
4813	    var options_len = options_list.length;
4814	    var options_array = null;
4815	    var options = "";
4816
4817	    for(var i = 0; i < options_len; i++) {
4818	        options_array = options_list[i];
4819	        options += options_array.CODE + ":" + options_array.CODENM;
4820	        if(i < options_len - 1) {
4821	            options += ";";
4822	        }
4823	    }
4824	    return options;
4825	}
4826
4827	/**
4828    * 한글 여부 확인
4829    */
4830	function isHangulChar(ch) {
4831	  c = ch.charCodeAt(0);
4832	  if( 0x1100<=c && c<=0x11FF ) return true;
4833	  if( 0x3130<=c && c<=0x318F ) return true;
4834	  if( 0xAC00<=c && c<=0xD7A3 ) return true;
4835	  return false;
4836	}
4837
4838	//자기진단센터
4839	function ASDC(AID,ANAME,MENU){
4840		var e7 = null;
4841		e7 = window.open("http://contents.alpaco.co.kr/ASDC/Access2.php?s1_param="+AID+"&s2_param="+ANAME+
4842		"&UserType=APC-USERTYPE_STUDENT&menu="+MENU,"ASDC","top=0,left=0,width=1024,height=768,statusbar=0,scrollbars=1");
4843		e7.focus();
4844	}
4845
4846	/**
4847     * 모바일여부 확인
4848     */
4849	function isMobile() {
4850		if((navigator.userAgent.match(/Mobile|iPhone|iPod|iPad|Android|Windows CE|BlackBerry|Symbian|Windows Phone|webOS|Opera Mini|Opera Mobi|POLARIS|IEMobile|lgtelecom|nokia|SonyEricsson/i) != null)){
4851			return true;
4852		}else{
4853			return false;
4854		}
4855	}
4856
4857	/**
4858     * 브라우저 스크린 높이
4859     */
4860	function browserScreenHeight(){
4861		var userAgent = navigator.userAgent.toLowerCase();
4862
4863		var browser = {
4864			msie    : (/msie/.test( userAgent ) && !/opera/.test( userAgent )) || (navigator.appName == 'Netscape' && navigator.userAgent.
4864search('Trident') != -1),
4865		    safari  : /webkit/.test( userAgent ),
4866		    firefox : /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ) && !(navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1),
4867		    opera   : /opera/.test( userAgent )
4868		};
4869
4870		var totalHeight = 0;
4871
4872		if(browser.msie){
4873			totalHeight = window.screen.height;
4874		}else if(browser.safari){
4875			totalHeight = parseInt(window.screen.height * 0.88);
4876		}else if(browser.firefox){
4877			totalHeight = window.screen.height;
4878		}else if(browser.opera){
4879			totalHeight = window.screen.height;
4880		}else{
4881			totalHeight = 0;
4882		}
4883
4884		return totalHeight;
4885	}
4886
4887	/**
4888     * 브라우저 클라이언트 높이
4889     */
4890	function browserClientHeight(){
4891		var userAgent = navigator.userAgent.toLowerCase();
4892
4893		var browser = {
4894			msie    : (/msie/.test( userAgent ) && !/opera/.test( userAgent )) || (navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1),
4895		    safari  : /webkit/.test( userAgent ),
4896		    firefox : /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ) && !(navigator.appName == 'Netscape' && navigator.userAgent.
4896search('Trident') != -1),
4897		    opera   : /opera/.test( userAgent )
4898		};
4899
4900		var totalHeight = 0;
4901
4902		if(browser.msie){
4903			totalHeight = document.documentElement.clientHeight;
4904		}else if(browser.safari){
4905			totalHeight = parseInt(document.documentElement.clientHeight * 0.98);
4906		}else if(browser.firefox){
4907			totalHeight = window.screen.height;
4908		}else if(browser.opera){
4909			totalHeight = window.screen.height;
4910		}else{
4911			totalHeight = 0;
4912		}
4913
4914		return totalHeight;
4915	}
4916
4917	/**
4918     * 브라우저
4919     */
4920	function browserReturn(){
4921		var userAgent = navigator.userAgent.toLowerCase();
4922
4923		var browser = {
4924			msie    : (/msie/.test( userAgent ) && !/opera/.test( userAgent )) || (navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1),
4925		    safari  : /webkit/.test( userAgent ),
4926		    firefox : /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ) && !(navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1),
4927		    opera   : /opera/.test( userAgent )
4928		};
4929
4930		return browser;
4931	}
4932
4933	/**
4934     * IE 버전 확인
4935     */
4936	function getVersionOfIE(){
4937		 var word;
4938		 var version = "N/A";
4939		 var agent = navigator.userAgent.toLowerCase();
4940		 var name = navigator.appName;
4941		 // IE old version ( IE 10 or Lower )
4942		 if ( name == "Microsoft Internet Explorer" ) word = "msie ";
4943		 else {
4944			 // IE 11
4945			 if ( agent.search("trident") > -1 ) word = "trident/.*rv:";
4946			 // Microsoft Edge
4947			 else if ( agent.search("edge/") > -1 ) word = "edge/";
4948		 }
4949		 var reg = new RegExp( word + "([0-9]{1,})(\\.{0,}[0-9]{0,1})" );
4950		 if (  reg.exec( agent ) != null  ) version = RegExp.$1 + RegExp.$2;
4951		 return version;
4952	}
4953
4954
4955
4956	/*
4957	 * DB에서 조회한 값을 폼객체의 값으로 셋팅한다
4958	 * [주의!] 조회한 DB Field명 = Form 객채명 (일치해야함)
4959	 *
4960	 * @param : curData
4961	 * @param : formName
4962	 *
4963	 * ex) setValueObjOfForm(data,"#editFrm");
4964	*/
4965	function setValueObjOfForm(curData , target){
4966		jQuery.each(curData ,function(key,val){
4967			jQuery.each(jQuery(target+" input") ,function(){
4968				if(jQuery(this).prop("name") == key){
4969					if(jQuery(this).prop("type") == "radio"){
4970						jQuery(this).filter("[name="+key+"]:input[value="+val+"]").prop("checked",true);
4971					}else if(jQuery(this).prop("type") != "file"){
4972						jQuery(this).val(val);
4973					}
4974				}
4975			});
4976			jQuery.each(jQuery(target+" select") ,function(){
4977				if(jQuery(this).prop("name") == key){
4978						jQuery(this).val(val);
4979				}
4980			});
4981			jQuery.each(jQuery(target+" textarea") ,function(){
4982				if(jQuery(this).prop("name") == key){
4983					jQuery(this).val(val);
4984				}
4985			});
4986		});
4987	}
4988
4989	/**
4990     * 문자열의 length를 얻는다.
4991     *
4992     * @param   str 문자열
4993     * @return  length
4994     */
4995    function jsStrLength(str) {
4996        if (str == "") {
4997            return  0;
4998        }
4999
5000        return  str.length;
5001    }
5002
5003    function numberFormat(x) {
5004	    return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
5005	}
5006
5007	function numberToKoreanWon(number){
5008	    var inputNumber  = number < 0 ? false : number;
5009	    var unitWords    = ['', '만', '억', '조', '경'];
5010	    var splitUnit    = 10000;
5011	    var splitCount   = unitWords.length;
5012	    var resultArray  = [];
5013	    var resultString = '';
5014
5015	    for (var i = 0; i < splitCount; i++){
5016	        var unitResult = (inputNumber % Math.pow(splitUnit, i + 1)) / Math.pow(splitUnit, i);
5017	        unitResult = Math.floor(unitResult);
5018	        if (unitResult > 0){
5019	            resultArray[i] = unitResult;
5020	        }
5021	    }
5022
5023	    for (var i = 0; i < resultArray.length; i++){
5024	        if(!resultArray[i]) continue;
5025	        resultString = String(numberFormat(resultArray[i])) + unitWords[i] + resultString;
5026	    }
5027
5028	    return resultString + '원';
5029  }
5030  function downloadFileByFileidForSearch(fileId, fileIdntfcKey){
5031     $.fileDownload(contextpath + 'downloadFileByFileid.do?fileid='+fileId + '&file_idntfc_key=' + fileIdntfcKey, {
5032        //successCallback: function (url) {},
5033        failCallback: function(html, url) {
5034            if(html=='404'){
5035                alert("파일이 존재하지 않습니다.");
5036            }else if(html=='403'){
5037                alert("해당 파일다운로드는 로그인이 필요한 서비스입니다.");
5038            }
5039        }
5040     });
5041  }
5042
5043    function setDefaultImage(id, kind){
5044	    $("#"+id).error(function(e){
5045	        $("#"+id).unbind('error');
5046
5047	        if(kind == "profile"){
5048				$("#"+id).attr('src', "/public/mng/images/default_profile.png");
5049			}else{
5050				$("#"+id).attr('src', "/public/mng/images/no_image.png");
5051			}
5052		});
5053	}
5054
5055    function defaultImage(id, kind){
5056        if(kind == "profile"){
5057			$("#"+id).attr('src', "/public/mng/images/default_profile.png");
5058		}else{
5059			$("#"+id).attr('src', "/public/mng/images/no_image.png");
5060		}
5061	}
5062
5063    //공공보기 팝업 2020-03-31
5064    function fn_positionPopUp(postnid){
5065    	window.open(contextpath + 'mng/postn/postnPop.do?postnid='+postnid ,"", 'top=50,left=50,width=900, height=900 ,scrollbars=yes');
5066    }
5067
5068    // id에 해당하는 엘리먼트로 브라우저 스크롤 이동
5069    function scrollIntoView(id) {
5070        window.scrollTo({top: document.getElementById(id).getBoundingClientRect().top-80 + window.pageYOffset, behavior: 'smooth'});
5071        //$('html').animate({scrollTop : $('#'+id).offset().top}, 400);
5072    }
5073
5074    /**
5075    * 특정 문자열입력 엘리먼트에서 지정한 최대 문자열길이 초과입력시 초과된 문자열을 자동으로 삭제.
5076    *
5077    * @Description : 특정 문자열입력 엘리먼트에서 지정한 최대 문자열길이 초과입력시 초과된 문자열을 자동으로 삭제후 안내 alert을 띄워준다.
5078    *                onkeyup등에서 해당함수를 적용하도록 하고, 현재입력글자수를 화면에 노출해야 할시 리턴값을 사용하도록 한다.
5079    * @param element 문자열입력 엘리먼트
5080    * @param maxLen 입력을 허용할 최대 문자열 길이
5081    * @return 처리 이후 입력된 문자수
5082    *
5083    */
5084    function jsSubstrLength(element, maxLen) {
5085        if(element.value.length > maxLen){
5086            alert('최대 허용 길이인 ' + maxLen + '글자를 초과했습니다.\n초과한 문자열은 자동 삭제 처리 됩니다.');
5087            element.value = element.value.substr(0, maxLen);
5088            return maxLen;
5089        }
5090        return element.value.length;
5091    }
5092
5093    /**
5094    * 스위치엘리먼트의 on/off 설정.
5095    *
5096    * @Description : 스위치엘리먼트의 on/off 설정.
5097    * @param switch_elem 스위치 엘리먼트
5098    * @param on 스위치on(true) off(false)
5099    *
5100    */
5101    function toggleSwitch(switch_elem, on) {
5102        if (on){ // turn it on
5103            if ($(switch_elem)[0].checked){ // it already is so do
5104                // nothing
5105            }else{
5106                $(switch_elem).trigger('click').attr("checked", "checked"); // it was off, turn it on
5107            }
5108        }else{ // turn it off
5109            if ($(switch_elem).length > 0 && $(switch_elem)[0].checked){ // it's already on so
5110                $(switch_elem).trigger('click').removeAttr("checked"); // turn it off
5111            }else{ // otherwise
5112                // nothing, already off
5113            }
5114        }
5115    }
5116    /**
5117    * 수동 validate 체크시 에러 마크 표출
5118    *
5119    * @Description : 수동 validate 체크시 에러 마크 표출
5120    * @param showErrorMark 스위치 엘리먼트
5121    *
5122    */
5123    function showErrorMark($el) {
5124        setTimeout(function() {$($el).css("border","2px solid #ff0000"); $($el).focus(); }, 300);
5125        setTimeout(function() { $($el).css("border","")}, 1000);
5126    }
5127
5128    /**
5129     * jsGrid에서 sorting시 카멜케이스 포맷의 변수명을 언더스코어 포맷으로 변경
5130     *
5131     * @Description : jsGrid에서 sorting시 카멜케이스 포맷의 변수명을 언더스코어 포맷으로 변경
5132     * @param sortField 정렬할 변수명
5133     *
5134     */
5135    function mapCamelCaseToUnderscore(sortField) {
5136        var result = "";
5137        for (var i = 0; i < sortField.length; i++) {
5138            if (sortField[i] === sortField[i].toUpperCase()) {
5139                result += "_";
5140                result += sortField[i].toLowerCase();
5141            } else {
5142                result += sortField[i];
5143            }
5144        }
5145        return result;
5146    }
5147
5148    /**
5149     *
5150     * @Description : escape 처리된 문자열을 unescape된 문자열로 변환
5151     * @param text
5152     * @returns {string}
5153     *
5154     */
5155    function unescapeHtml( text ) {
5156        var doc = new DOMParser().parseFromString(text, "text/html");
5157        return doc.documentElement.textContent;
5158    }
5159
5160    /**
5161     *
5162     * @Description : HTML 특수문자를 escape 처리하여 반환
5163     * @param text
5164     * @returns {string}
5165     *
5166     */
5167    function escapeHtml( text ) {
5168        if (!text) return text;
5169        return text.replace(/&/g, '&amp;')
5170                   .replace(/</g, '&lt;')
5171                   .replace(/>/g, '&gt;')
5172                   .replace(/"/g, '&quot;')
5173                   .replace(/'/g, '&#039;');
5174    }
5175
5176	/**
5177     *
5178     * @param phone
5179     * @returns boolean
5180     *
5181     */
5182	function isMobilePhone(phone) {
5183        if(!$.trim(phone)) {
5184            return false;
5185        }
5186        var pattern = /^(01[016789]{1})[0-9]{3,4}[0-9]{4}$/;
5187        return pattern.test(phone);
5188    }
5189
5190    function openBrAcctInfoPopup(){
5191       var popUpUrl = contextpath + "front/srvc/brAcctInfoPopup.html";
5192       $.ajax({
5193           cache: false
5194           , url: popUpUrl
5195           , type: 'GET'
5196           , async: 'false'
5197           , dataType: 'html'
5198           , success: function(result) {
5199        	   openPopup('brAcctInfoPopup',result);
5200           }
5201       });
5202    }
5203

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.