PageSourceSearch

https://nexd.designdb.com/js/cmsUtil.js?versoin=20261002_204142

js designdb.com collected 2026-10-02 11:42:17 UTC 24,739 bytes, 915 lines download raw bytes

1/**
2 * cmsUtil.js
3 * @author kimmj
4 */
5 
6 var topClickCount = parseInt(sessionStorage.getItem("topClickCount") || "0"); // 이용제한 우회 확인 
7 
8/**
9 * 해당객체가 undefined이면 defstr로 리턴.
10 */
11$.fn.serializeObject = function() {
12  "use strict"
13  var result = {}
14  var extend = function(i, element) {
15    var node = result[element.name]
16    if ("undefined" !== typeof node && node !== null) {
17      if ($.isArray(node)) {
18        node.push(element.value)
19      } else {
20        result[element.name] = [node, element.value]
21      }
22    } else {
23      result[element.name] = element.value
24    }
25  }
26
27  $.each(this.serializeArray(), extend)
28  return result
29}
30
31function isUndefined(obj, defstr) {
32	var result;
33	if (obj == null || typeof obj == "undefined") {
34		result = defstr;
35	} else {
36		result = obj;
37	}
38
39	return result;
40}
41
42function isEmpty(obj, defstr) {
43	var result;
44	if (obj == null || typeof obj == "undefined" || obj == '') {
45		result = defstr;
46	} else {
47		result = obj;
48	}
49
50	return result;
51}
52
53function isNull(str) {
54	str = $.trim(str);
55	if (str == null || str == "undefined" || str.length == 0 || typeof str == "undefined" || str == '') {
56		return true;
57	} else {
58		return false;
59	}
60}
61
62/* function : 숫자처리
63 * param : String strVal
64 */
65function isNumber(strVal) {
66	var v_str = new String(strVal);
67	var j = 0;
68	if (strVal == '')
69		return true;
70
71	for (var i = 0; i < v_str.length; i++) {
72		if ((v_str.substring(i, i + 1) >= '0') && (v_str.substring(i, i + 1) <= '9'))
73			j++;
74	}
75
76	if (j == v_str.length)
77		return true;
78	else
79		return false;
80}
81
82function jsNvl(str) {
83	var result = "";
84	if (str == undefined || str == null || str == "null" || str == "NULL") {
85		result = "";
86	} else {
87		result = str;
88	}
89
90	return result;
91}
92
93function jsNvl2(str, result) {
94	
95	result = jsNvl(result);
96	
97	if (str == undefined || str == null || str == "null" || str == "NULL") {
98		return result;
99	} else {
100		return trim(str);
101	}
102}
103
104function jsNvl3(str, result) {
105	
106	result = jsNvl(result);
107	
108	if (str == undefined || str == null || str == "null" || str == "NULL" || str == "") {
109		return result;
110	} else {
111		return trim(str);
112	}
113}
114
115function jsNvlTrim(str) {
116	var result = "";
117	if (str == undefined || str == null || str == "null" || str == "NULL") {
118		result = "";
119	} else {
120		result = trim(str);
121	}
122
123	return result;
124}
125
126
127function jsNumnvl(str) {
128	if (str == undefined || str == null || str == "null" || str == "NULL") {
129		return "0";
130	}
131	return str;
132}
133
134/**
135 * trim
136 * 
137 * @param text
138 * @return string
139 */
140function trim(text) {
141	if (text == "") {
142		return text;
143	}
144
145	var len = text.length;
146	var st = 0;
147
148	while ((st < len) && (text.charAt(st) <= ' ')) {
149		st++;
150	}
151
152	while ((st < len) && (text.charAt(len - 1) <= ' ')) {
153		len--;
154	}
155
156	return ((st > 0) || (len < text.length)) ? text.substring(st, len) : text;
157}
158
159function utfCharByteSize(ch) {
160	
161	if (ch == null || ch.length == 0) {
162		return 0;
163	}
164	
165	var charCode = ch.charCodeAt(0);
166	
167	if (charCode <= 0x00007F) {
168		return 1;
169	} else if (charCode <= 0x0007FF) {
170		return 2;
171	} else if (charCode <= 0x00FFFF) {
172		return 3;
173	} else {
174		return 3; 
175	}
176      
177};
178
179/**
180 * 숫자에 comma를 붙인다.
181 * 
182 * @param str
183 */
184function addCommaStr(str) {
185	
186	if (str == "NaN" || jsNvl(str) == ""){
187		return "0";
188	}
189	
190	var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])');
191	var arrNumber = str.split('.');
192	arrNumber[0] += '.';
193	do {
194		arrNumber[0] = arrNumber[0].replace(rxSplit, '$1,$2');
195	} while (rxSplit.test(arrNumber[0]));
196
197	if (arrNumber.length > 1) {
198		replaceStr = arrNumber.join("");
199	} else {
200		replaceStr = arrNumber[0].split(".")[0];
201	}
202	return replaceStr;
203}
204
205function onOnlyAlphaNumber(obj) {
206	var inText = obj;
207	var deny_char = /^[A-Za-z0-9]+$/;
208
209	if (deny_char.test(inText)) {
210		return false;
211	}
212	return true;
213}
214
215/**
216 * <pre>
217 * 숫자만 입력 가능하게 처리
218 * </pre>
219 * 
220 * @author P081305
221 * @param evt : Key Up 이벤트
222 * */
223var setNumberOnly = function( evt ) {
224	var thisValue = this.value;
225	var rexStr = /[^-0-9]/gi;
226	
227	if( rexStr.test( thisValue ) ) {
228		$( this ).val( thisValue.replace( rexStr, "" ) );
229	}
230};
231
232function checkPass(pw){
233	var msg = checkPassMsg(pw);
234	if(msg == ""){
235		return true;
236	}else{
237		alert(msg);
238		return false;
239	}
240}
241
242function checkPassMsg(pw){
243
244    var alpha  		= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
245    var number 		= "1234567890";
246	var sChar 	 	= "-_=+\|()*&^%$#@!~`?></;,.:'";
247	var sCharCheck 	= 0;
248	var alphaCheck 	= 0;
249	var numberCheck = 0;
250	var sCharCnt 	= 0;
251	var alphaCnt 	= 0;
252	var numberCnt 	= 0;
253
254	
255	if(10 <= pw.length && pw.length <= 15){
256	    
257	    for(var i=0; i<pw.length; i++){
258		
259			if(sChar.indexOf(pw.charAt(i)) != -1){
260				sCharCheck++;
261			}
262			
263			if(alpha.indexOf(pw.charAt(i)) != -1){
264			    alphaCheck++;
265			}
266			
267			if(number.indexOf(pw.charAt(i)) != -1){
268			    numberCheck++;
269			}
270		
271	    }//for
272	    sCharCnt = sCharCheck>0?1:0;
273	    alphaCnt = alphaCheck>0?1:0;
274	    numberCnt = numberCheck>0?1:0;
275
276	    if(sCharCnt+alphaCnt+numberCnt<2){
277	    	return "영문, 숫자, 특수문자 중 2가지 이상을 조합하여 10자리 이상으로 설정해주세요.";
278	    }//if
279	} else {
280		return "영문, 숫자, 특수문자 중 2가지 이상을 조합하여 10자리 이상으로 설정해주세요.";
281	}//else
282	
283	return "";
284}
285
286function checkPassFlag(pw){
287
288    var alpha  = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
289    var number = "1234567890";
290	var sChar  = "-_=+\|()*&^%$#@!~`?></;,.:'";
291
292	var sCharCheck = 0;
293	var alphaCheck = 0;
294	var numberCheck = 0;
295	var sCharCnt = 0;
296	var alphaCnt = 0;
297	var numberCnt = 0;
298
299	if(8 <= pw.length && pw.length <= 15){
300	    
301	    for(var i=0; i<pw.length; i++){
302		
303			if(sChar.indexOf(pw.charAt(i)) != -1){
304				sCharCheck++;
305			}
306			
307			if(alpha.indexOf(pw.charAt(i)) != -1){
308			    alphaCheck++;
309			}
310			
311			if(number.indexOf(pw.charAt(i)) != -1){
312			    numberCheck++;
313			}
314		
315	    }//for
316	    sCharCnt = sCharCheck>0?1:0;
317	    alphaCnt = alphaCheck>0?1:0;
318	    numberCnt = numberCheck>0?1:0;
319
320	    if(sCharCnt+alphaCnt+numberCnt<2){
321		return  false;
322	    }//if
323	    
324	    return true;
325	} else {
326		return false;
327	}//else
328	 
329	return false;
330}
331
332function checkAll(allChkId, rowChkId){
333	
334	//전체선택
335	var checked = $("#"+allChkId).is(":checked");
336	var thisVal = $("#"+allChkId).val();
337	$("input[name='"+rowChkId+"']").each(function(index) {
338		$(this).prop('checked', checked);
339	});
340	
341}
342/*
343	날짜비교
344	stDate(YYYY-MM-DD)
345	enDate(YYYY-MM-DD)
346	return : 1:앞자리가 큼, 2:뒷자리가 큼, 0:같음
347*/
348function compareDate(stDate, enDate){
349	
350    var date1 	= new Date(stDate.substring(0,4), stDate.substring(5,7), stDate.substring(8,10));
351    var date2 	= new Date(enDate.substring(0,4), enDate.substring(5,7), enDate.substring(8,10));
352    
353    if(date1 > date2){
354    	return "1";
355    }else if(date1 < date2){
356    	return "2";
357    }else{
358    	return "0";
359    }
360    
361}
362
363function toDate(){
364	var today = new Date();
365
366	var year = today.getFullYear();
367	var month = ('0' + (today.getMonth() + 1)).slice(-2);
368	var day = ('0' + today.getDate()).slice(-2);
369
370	var dateString = year + '-' + month  + '-' + day;
371
372	return dateString;
373}
374
375function nl2br(str){
376    if (str == undefined || str == null)
377    {
378        return "";
379    }
380
381    str = str.replace(/\r\n/ig, '<br>');
382    str = str.replace(/\\n/ig, '<br>');
383    str = str.replace(/\n/ig, '<br>');
384    return str;
385}
386
387function setDatepicker(obj, toObj, callback, maxDate, minDate){
388	
389	if(isNull(obj)) {
390		obj = ".datepicker";
391	}
392	
393	if(isNull(minDate)) {
394		minDate = "";
395	}
396
397	if(!isNull(obj)) {
398		
399		$(obj).each(function(){
400			
401		    $(this).datepicker({
402		      dateFormat		: "yy-mm-dd",
403			  language			: "kr",
404			  keyboardNavigation: false,
405			  forceParse		: false,
406			  autoclose			: true,
407			  todayHighlight	: true,
408			  showOn			: "button",
409			  buttonImage		: cmsValUtil.contextPath + "/images/adm/icon_calendar.png",
410			  buttonImageOnly	: true,
411			  changeMonth		: true,
412	          changeYear		: true,
413	          showButtonPanel	: false,
414	          yearRange			: 'c-100:c+10', // 년도 선택 셀렉트박스를 현재 년도에서 이전, 이후로 얼마의 범위를 표시할것인가.
415	          minDate 			: minDate,
416			  onSelect			: function (selectedDate) {
417
418					if(!isNull(toObj)) {
419						$(toObj).datepicker( "option", "minDate", selectedDate );
420					}
421					
422					if(!isNull(callback)) {
423						eval(callback+"(this)");
424					}
425					
426			  }
427		    
428		    });
429		    $(this).addClass("inputBg")
430		});
431	}
432	
433	$(toObj).each(function(){
434	    $(this).datepicker({
435	      dateFormat		: "yy-mm-dd",
436		  language			: "kr",
437		  keyboardNavigation: false,
438		  forceParse		: false,
439		  autoclose			: true,
440		  todayHighlight	: true,
441		  showOn			: "button",
442		  buttonImage		: cmsValUtil.contextPath + "/images/adm/icon_calendar.png",
443		  buttonImageOnly	: true,
444		  changeMonth		: true,
445          changeYear		: true,
446          showButtonPanel	: false,
447          yearRange			: 'c-100:c+10', // 년도 선택 셀렉트박스를 현재 년도에서 이전, 이후로 얼마의 범위를 표시할것인가.
448          minDate 			: minDate,
449		  onSelect			: function (selectedDate) {
450				
451				if(!isNull(callback)) {
452					eval(callback+"(this)");
453				}
454			
455		  }
456	    });
457	    $(this).addClass("inputBg")
458	});
459
460}
461
462function setWebDatepicker(obj, toObj, callback, maxDate, minDate){
463	
464	if(isNull(obj)) {
465		obj = ".datepicker";
466	}
467	
468	if(isNull(minDate)) {
469		minDate = "";
470	}
471
472	if(!isNull(obj)) {
473		
474		$(obj).each(function(){
475			
476		    $(this).datepicker({
477		      dateFormat		: "yy-mm-dd",
478			  language			: "kr",
479			  keyboardNavigation: false,
480			  forceParse		: false,
481			  autoclose			: true,
482			  todayHighlight	: true,
483			  showOn			: "button",
484			  buttonImage		: cmsValUtil.contextPath + "/images/web/icon_calendar.jpg",
485			  //buttonImageOnly	: true,
486			  changeMonth		: true,
487	          changeYear		: true,
488	          showButtonPanel	: false,
489	          yearRange			: 'c-100:c+10', // 년도 선택 셀렉트박스를 현재 년도에서 이전, 이후로 얼마의 범위를 표시할것인가.
490	          minDate 			: minDate,
491			  onSelect			: function (selectedDate) {
492
493					if(!isNull(toObj)) {
494						$(toObj).datepicker( "option", "minDate", selectedDate );
495					}
496					
497					if(!isNull(callback)) {
498						eval(callback+"(this)");
499					}
500					
501			  }
502		    
503		    });
504		    $(this).addClass("inputBg")
505		});
506	}
507	
508	$(toObj).each(function(){
509	    $(this).datepicker({
510	      dateFormat		: "yy-mm-dd",
511		  language			: "kr",
512		  keyboardNavigation: false,
513		  forceParse		: false,
514		  autoclose			: true,
515		  todayHighlight	: true,
516		  showOn			: "button",
517		  buttonImage		: cmsValUtil.contextPath + "/images/web/icon_calendar.jpg",
518		  //buttonImageOnly	: true,
519		  changeMonth		: true,
520          changeYear		: true,
521          showButtonPanel	: false,
522          yearRange			: 'c-100:c+10', // 년도 선택 셀렉트박스를 현재 년도에서 이전, 이후로 얼마의 범위를 표시할것인가.
523          minDate 			: minDate,
524		  onSelect			: function (selectedDate) {
525				
526				if(!isNull(callback)) {
527					eval(callback+"(this)");
528				}
529			
530		  }
531	    });
532	    $(this).addClass("inputBg")
533	});
534
535}
536
537function execDaumPostcode(zipCodeId, jibunAddId, roadAddrId, callback) {
538	 new daum.Postcode({
539	        oncomplete: function(data) {
540	            // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
541
542	            // 도로명 주소의 노출 규칙에 따라 주소를 조합한다.
543	            // 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
544	            var fullRoadAddr  = data.roadAddress; // 도로명 주소 변수
545	            var extraRoadAddr = ''; // 도로명 조합형 주소 변수
546
547	            // 법정동명이 있을 경우 추가한다. (법정리는 제외)
548	            // 법정동의 경우 마지막 문자가 "동/로/가"로 끝난다.
549	            if(data.bname !== '' && /[동|로|가]$/g.test(data.bname)){
550	                extraRoadAddr += data.bname;
551	            }
552	            // 건물명이 있고, 공동주택일 경우 추가한다.
553	            if(data.buildingName !== '' && data.apartment === 'Y'){
554	               extraRoadAddr += (extraRoadAddr !== '' ? ', ' + data.buildingName : data.buildingName);
555	            }
556	            // 도로명, 지번 조합형 주소가 있을 경우, 괄호까지 추가한 최종 문자열을 만든다.
557	            if(extraRoadAddr !== ''){
558	                extraRoadAddr = ' (' + extraRoadAddr + ')';
559	            }
560	            // 도로명, 지번 주소의 유무에 따라 해당 조합형 주소를 추가한다.
561	            if(fullRoadAddr !== ''){
562	                fullRoadAddr += extraRoadAddr;
563	            }
564
565	            // 우편번호와 주소 정보를 해당 필드에 넣는다.
566	            //document.getElementById('sample4_postcode').value 		= data.zonecode; //5자리 새우편번호 사용
567	            //document.getElementById('sample4_roadAddress').value 		= fullRoadAddr;
568	            //document.getElementById('sample4_jibunAddress').value 	= data.jibunAddress;
569	            $("#"+zipCodeId).val(data.zonecode);
570	            if(jibunAddId != ""){
571	            	$("#"+jibunAddId).val(data.jibunAddress);
572	            }
573	            
574	            if(roadAddrId != ""){
575	            	$("#"+roadAddrId).val(fullRoadAddr);
576	            }
577	            
578	            // 사용자가 '선택 안함'을 클릭한 경우, 예상 주소라는 표시를 해준다.
579	            if(data.autoRoadAddress) {
580	                //예상되는 도로명 주소에 조합형 주소를 추가한다.
581	                //var expRoadAddr = data.autoRoadAddress + extraRoadAddr;
582	                //document.getElementById('guide').innerHTML = '(예상 도로명 주소 : ' + expRoadAddr + ')';
583	            } else if(data.autoJibunAddress) {
584	                //var expJibunAddr = data.autoJibunAddress;
585	                //document.getElementById('guide').innerHTML = '(예상 지번 주소 : ' + expJibunAddr + ')';
586	            } else {
587	                //document.getElementById('guide').innerHTML = '';
588	            }
589
590	            if(jsNvl(fullRoadAddr) == ''){
591	            	fullRoadAddr = data.jibunAddress;
592	            }
593	            
594	            if(jsNvl(data.roadAddress) == ''){
595	            	data.roadAddress = data.jibunAddress;
596	            }
597	            
598				if(!isNull(callback)) {
599					eval(callback+"('"+data.zonecode+"','"+data.jibunAddress+"','"+data.roadAddress+"','"+fullRoadAddr+"')");
600				}
601				
602	        }
603	    }).open();
604	}
605
606/**
607 * 함수설명 : 화면 중앙에 팝업창
608 * 예제     : nmPopupCenter(url, object,windowWidth, windowHeight, windowFeatures);
609* @ parameter : sTargetPath : 해당 popup창의 실제 페이지 경로
610                              object          : popup창으로 넘길 object
611                              windowWidth     : 창의 넓이
612                              windowHeight    : 창의 높이
613                              windowFeatures  : 창의 속성
614 */
615openWinC = function (url, windowName, sParam, windowWidth, windowHeight, windowFeatures, frmId){
616	
617    try {
618        if( windowFeatures == null || windowFeatures == "" ) {
619            windowFeatures = "toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no";
620        }
621        //windowFeatures="";
622        //alert(windowFeatures);
623        
624        
625        if(navigator.appVersion.indexOf("Safari") > 0 && navigator.appVersion.indexOf("Chrome") < 0 && navigator.appVersion.indexOf("Version/5.1") > 0) {
626            windowHeight = parseInt(windowHeight) - 61;
627        }
628        
629        if(navigator.appVersion.indexOf("Chrome") < 0) {
630            windowHeight = parseInt(windowHeight) - 61;
631        }
632
633        if(navigator.appVersion.indexOf("Chrome") > 0) {
634        	windowWidth  = parseInt(windowWidth)  + 165;
635        	windowHeight = parseInt(windowHeight) + 20;
636        }
637
638        var xPos = (screen.availWidth  - windowWidth)  / 2;
639        var yPos = (screen.availHeight - windowHeight) / 2;
640        var feature =  "top=" + yPos + ",left=" + xPos + ",width=" + windowWidth + ",height=" + windowHeight +  "," + windowFeatures;
641        if(!windowName) {
642        	//windowName = "_blank";
643        	windowName = "LOFA_POP";
644        }
645        var newUrl = url;
646        if(sParam) {
647        	newUrl = newUrl+"?"+sParam;
648        }
649        
650        var oWin;
651        if(jsNvl(frmId) != ""){
652        	oWin = window.open( ''     ,windowName, feature );
653        	frmId.action = newUrl; 
654        	frmId.target = windowName; //window,open()의 두번째 인수와 같아야 하며 필수다.   
655        	frmId.submit();
656        }else{
657        	oWin = window.open( newUrl , windowName, feature );
658        }
659        
660 		setTimeout(function(){
661 			oWin.focus();
662 		}, 1000);
663 		
664        return oWin;
665    } catch(errorObject) {
666		alert("Opening a pop-up window was blocked. Please allow opening a pop-ups  for this site");
667    }
668};
669
670function openPosPopUp(url, name, width, height, xPos, yPos)  {
671	var args = 'scrollbars=yes,toolbar=no,location=no,left='+xPos+',top='+yPos+',width='+width+',height='+height;
672	var oWin = window.open(url, name, args);
673	return oWin;
674}
675
676// 팝업 열기
677function modalPopupShow(id){
678	$("#"+id).modal('show');
679	$("#"+id).css('display', 'flex');
680}
681
682// 팝업 닫기
683function modalPopupClose(id){
684	$("#"+id).modal("hide");
685	
686	if(id === 'modal-ExcelListPop') {
687		$("#ExcelListPopCont").empty();
688	}
689}
690
691//팝업 열기
692function modalWebPopupShow(id){
693	//modal.open(id);
694	modalPopupShow(id);
695}
696
697// 팝업 닫기
698function modalWebPopupClose(id){
699	//modal.close(id);
700	modalPopupClose(id);
701}
702
703$(document).on("click" , "#gallay_scrap,#check_scrap,input[name=my_scrap],input[name=gallay_scrap]" , function(){
704	
705	
706	var object = new Object();
707	var node = $(this);
708	var url = cmsValUtil.contextPath + "/web/mbmy/bmrk/bmrkUpdt";
709	object.menu_nm = $(".sub_title h2").text();
710	object.flag = $(this).prop("checked")?"Y":"N";
711	object.titl_nm = $(this).data("titl_nm");
712	if($(this).attr("name")=="gallay_scrap"){
713		object.link_addr = location.pathname.replace("ListPage","Detail")+"?brd_no="+$(this).data("brd_no")+"&post_no="+$(this).data("post_no");
714		object.link_no = $(this).data("post_no");
715		
716	}else if($(this).attr("id")=="check_scrap"){
717		object.link_addr = location.pathname+"?care_no="+$(this).data("care_no");
718		object.link_no = $(this).data("care_idx_no")+$(this).data("care_no");
719	}else{
720		object.link_no = $(this).data("link_no");
721	}
722	comUtil.submitAjax(url, object,function(res){
723		alert(res.message);
724		if(res.success == "false"){
725			$(node).prop("checked" , false);
726		}else{
727			if($(node).attr("name")=="my_scrap"){
728				search();
729			}
730		}
731	}); 	
732});
733
734$(document).on("keyup","#header .search_wrap input ,.main_visual_search .search_area input  ",function(e){
735	if (e.keyCode == 13) {
736		integralSearch($(this).val());
737        return false;
738    }
739});
740
741$(document).on("click","#header .search_wrap .btn_search", function(e, obj){
742	integralSearch($(this).closest(".search_cont").find("input").val());
743});
744
745function integralSearch(text){
746	var object = new Object();
747	var searchtxt = text;
748	if(searchtxt==""){
749		alert("검색어를 입력해주세요.");
750		return;
751	}	
752	$("#integralSearchFrm input[name=query]").val(searchtxt);
753	// comUtil.frmSubmitForm("integralSearchFrm", cmsValUtil.contextPath + "/web/sear/totalSearchPage");
754	comUtil.frmSubmitForm("integralSearchFrm", cmsValUtil.contextPath + "/web/sear/esrc/totalSearchPage");
755}
756
757function goodInfoDetail(){
758	
759	var goodInfoDetailUrl = cmsValUtil.contextPath + "/web/comm/memb/goodInfoDetail";
760	
761	var param = {};
762	
763	if(jsNvl(g_memb_user_no) != ""){
764		
765		//회원정보 호출
766		comUtil.submitAjax(goodInfoDetailUrl, param, function(res) {
767			
768			if(res.success == "true"){
769				
770				//상당정보
771				if(!isNull(res.goodCounComfDetail)){
772					var comfNCnt = parseInt(jsNvl3(res.goodCounComfDetail.comf_n_cnt,"0"));
773					if(comfNCnt > 0){
774						$("#header-goodCounComf").addClass("new");
775						
776						var counselPopHtml = '';
777						for(var i=0; i<res.goodCounComfContDetail.length; i++){
778							
779							var data = res.goodCounComfContDetail[i];
780							
781							counselPopHtml += '<ul>';
782							counselPopHtml += '<li>';
783							
784							counselPopHtml += '<a class="user" onclick="counDetail(\'' + data.user_no + '\',\'' + data.coun_no + '\',\'' + data.appl_user_no + '\');">';
785							counselPopHtml += '<span class="name">' + data.appl_user_no_nm + '</span>';
786							counselPopHtml += '<span class="time">' + data.reg_dt2 + '</span>';
787							counselPopHtml += '</a>';
788							counselPopHtml += '<p class="txt">' + data.coun_cont + '</p>';
789							counselPopHtml += '</li>';
790							counselPopHtml += '</ul>';
791							
792							/*<li>
793								<a href="#" class="user">
794									<span class="name">이지섭</span>
795									<span class="time">지금</span>
796								</a>
797								<p class="txt">구매 확정되었습니다.</p>
798							</li>*/
799						}
800						
801						$("#counsel-popup").html(counselPopHtml);
802					}else{
803						$("#header-goodCounComf").removeClass("new");
804					}
805				}
806				
807				//장바구니정보
808				if(!isNull(res.goodShopBaskBuyDetail)){
809					var baskCnt = parseInt(jsNvl3(res.goodShopBaskBuyDetail.bask_cnt,"0"));
810					if(baskCnt > 9){
811						$("#header-goodShopBask").attr("data-count","9+");
812						$("#header-goodShopBask2").attr("data-count","9+");
813					}else{
814						$("#header-goodShopBask").attr("data-count",baskCnt);
815						$("#header-goodShopBask2").attr("data-count",baskCnt);
816					}
817					
818				}
819				
820			}
821			
822		});
823		
824	}
825	
826}
827
828//상담상세 이동
829function counDetail(userNo, counNo, applUserNo) {
830
831	var counDetailUrl 		 = cmsValUtil.contextPath + "/web/mbmy/wgmg/cons/counDetail";
832	
833	$("#headerFrm").find("input[name=user_no]").val(userNo);
834	$("#headerFrm").find("input[name=coun_no]").val(counNo);
835	$("#headerFrm").find("input[name=appl_user_no]").val(applUserNo);
836	
837	comUtil.frmSubmitForm('headerFrm', counDetailUrl);
838}
839
840//패밀리 사이트 정보
841function familyBnerList(){
842	
843	var bnerList = cmsValUtil.contextPath + "/web/comm/bnerList";
844	
845	var param = {};
846		param.p_bner_area_cd = "L";
847	
848	if($("#footer-family-list").length > 0) {
849		
850		//회원정보 호출
851		comUtil.submitAjax(bnerList, param, function(res) {
852			
853			if(res.success == "true"){
854				
855				var bnerList = res.bnerList;
856				
857				if(!isNull(bnerList)){
858					
859					var sHtml = '';
860					for(var i=0; i<bnerList.length; i++){
861						
862						var data = bnerList[i];
863						
864						/*1:현재창 열기, 2:새창 열기, 3:팝업*/
865						var target = data.link_tget_cd=="2"?"_blank":target;
866						
867						sHtml += '<li><a href="'+jsNvl(data.link_addr)+'" class="family-link" target = "'+target+'">'+jsNvl(data.titl_nm)+'<img src="/assets/images/ico-new-page.png" alt="new-page"></a></li>';
868						
869					}
870					
871//					$("#footer-family-list").html(sHtml);
872					$("#footer-family-list").append(sHtml);
873					
874				}else{
875					
876//					$("#footer-family-list").html("");
877					$("#footer-family-list").append("");
878
879				}
880				
881			}
882			
883		});
884		
885	}
886	
887}
888
889
890function pageTopMove(){
891	var offset = $("#dataContent").offset();
892	var winH = $(window).height(); 
893	$('html, body').animate({scrollTop : (offset.top - winH/2)}, 400);
894}
895
896// 시스템 이용제한 우회 기능 (테스트 용도)
897function resetRstr() {
898    $("#btnTop").on("click", function (e) {
899      topClickCount++;
900      sessionStorage.setItem("topClickCount", topClickCount);
901
902      $.ajax({
903		  url: "/web/rstr/passSession.json",
904		  type: "POST",
905		  data: { topClickCount: topClickCount },
906		  success: function () {
907			console.log("점검 우회가 활성화되었습니다.");
908		    window.location.href = "/web/main.do";
909		  },
910		  error: function () {
911		    alert("error");
912		  }
913		});
914    });
915  }

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.