PageSourceSearch

https://www.noon.co.kr/assets/lib/front.js?ver=20261007123038

js noon.co.kr collected 2026-10-07 03:30:51 UTC 27,765 bytes, 772 lines download raw bytes

1$(document).ready(function(){
2
3    $('#div_load_image').hide(); //로딩바를 숨겨준다.
4
5    // set csrf
6    $.ajaxPrefilter(function (options, originalOptions, jqXHR) {
7        if (!options.processData && !options.contentType) {
8            options.data.append('dt_csrf_token', getCookie('dt_csrf_cookie'))
9        } else if (options.type.toLowerCase() === 'post') {
10            options.data = $.param($.extend({}, originalOptions.data, {
11                dt_csrf_token: getCookie('dt_csrf_cookie')
12            }))
13        }
14    });
15
16    // set ajax error
17    $(document).on('ajaxError', function (jqXHR, textStatus, errorThrown) {
18        if (jqXHR.status === 401 || jqXHR.status === 403) {
19            alert('이상 접근이 감지되어 페이지를 재접속 합니다.');
20            window.location.reload();
21        }
22
23        //console.log(jqXHR)
24        //console.log(textStatus)
25        //console.log(errorThrown)
26    });
27
28    /*
29    $(".datepicker input").datepicker({
30        dateFormat:"yy-mm-dd"
31    }).datepicker("setDate", "today");
32    */
33    $.datepicker.setDefaults($.datepicker.regional['ko']);
34    $( "#sch_sdate" ).datepicker({
35    //changeMonth: true,
36    //changeYear: true,
37	stepMonths: 4, //next,prev 버튼 클릭시 한번에 이동하는 개월수
38    nextText: '다음 달',
39    prevText: '이전 달',
40    dayNames: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
41    dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
42    monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
43    monthNames: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
44    numberOfMonths: [2,2], // 한번에 얼마나 많은 월을 표시할것인가. [2,3] 일 경우, 2(행) x 3(열) = 6개의 월을 표시한다.
45    dateFormat: "yy-mm-dd",
46    maxDate: 0, // 선택할수있는 최소날짜, ( 0 : 오늘 이후 날짜 선택 불가)
47    onClose: function( selectedDate ) { //시작일(startDate) datepicker가 닫힐때 //종료일(endDate)의 선택할수있는 최소 날짜(minDate)를 선택한 시작일로 지정
48        $("#sch_edate").datepicker( "option", "minDate", selectedDate );
49    }
50    });
51    $( "#sch_edate" ).datepicker({
52    //changeMonth: true,
53    //changeYear: true,
54	stepMonths: 4, //next,prev 버튼 클릭시 한번에 이동하는 개월수
55    nextText: '다음 달',
56    prevText: '이전 달',
57    dayNames: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
58    dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
59    monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
60    monthNames: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
61    numberOfMonths: [2,2], // 한번에 얼마나 많은 월을 표시할것인가. [2,3] 일 경우, 2(행) x 3(열) = 6개의 월을 표시한다.
62    dateFormat: "yy-mm-dd",
63    maxDate: 0, // 선택할수있는 최대날짜, ( 0 : 오늘 이후 날짜 선택 불가)
64    onClose: function( selectedDate ) { //시작일(startDate) datepicker가 닫힐때 //종료일(endDate)의 선택할수있는 최소 날짜(minDate)를 선택한 시작일로 지정
65        $("#sch_sdate").datepicker( "option", "maxDate", selectedDate );
66    }
67    });
68
69    $.datepicker.setDefaults($.datepicker.regional['ko']);
70    $( "#sdate" ).datepicker({
71    //changeMonth: true,
72    //changeYear: true,
73    nextText: '다음 달',
74    prevText: '이전 달',
75    dayNames: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
76    dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
77    monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
78    monthNames: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
79    numberOfMonths: [1,1], // 한번에 얼마나 많은 월을 표시할것인가. [2,3] 일 경우, 2(행) x 3(열) = 6개의 월을 표시한다.
80    dateFormat: "yy-mm-dd",
81    //maxDate: 0, // 선택할수있는 최소날짜, ( 0 : 오늘 이후 날짜 선택 불가)
82    onClose: function( selectedDate ) { //시작일(startDate) datepicker가 닫힐때 //종료일(endDate)의 선택할수있는 최소 날짜(minDate)를 선택한 시작일로 지정
83        $("#edate").datepicker( "option", "minDate", selectedDate );
84    }
85    });
86    $( "#edate" ).datepicker({
87    //changeMonth: true,
88    //changeYear: true,
89    nextText: '다음 달',
90    prevText: '이전 달',
91    dayNames: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
92    dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
93    monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
94    monthNames: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
95    numberOfMonths: [1,1], // 한번에 얼마나 많은 월을 표시할것인가. [2,3] 일 경우, 2(행) x 3(열) = 6개의 월을 표시한다.
96    dateFormat: "yy-mm-dd",
97    //maxDate: 0, // 선택할수있는 최대날짜, ( 0 : 오늘 이후 날짜 선택 불가)
98    onClose: function( selectedDate ) { //시작일(startDate) datepicker가 닫힐때 //종료일(endDate)의 선택할수있는 최소 날짜(minDate)를 선택한 시작일로 지정
99        $("#sdate").datepicker( "option", "maxDate", selectedDate );
100    }
101    });
102
103	$( "#rdate" ).datepicker({ 
104        //changeMonth: true, 
105        //changeYear: true, 
106        nextText: '다음 달', 
107        prevText: '이전 달', 
108        dayNames: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'], 
109        dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'], 
110        monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'], 
111        monthNames: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
112        numberOfMonths: [1,1], // 한번에 얼마나 많은 월을 표시할것인가. [2,3] 일 경우, 2(행) x 3(열) = 6개의 월을 표시한다.
113        dateFormat: "yy-mm-dd", 
114        //maxDate: 0, // 선택할수있는 최소날짜, ( 0 : 오늘 이후 날짜 선택 불가)
115    });
116
117})
118.ajaxStart(function(){
119	$('#div_load_image').center();
120    $('#div_load_image').show(); //ajax실행시 로딩바를 보여준다.
121})
122.ajaxStop(function(){
123    $('#div_load_image').hide(); //ajax종료시 로딩바를 숨겨준다.
124});
125
126$.fn.center = function() {
127	this.css({
128	'position': 'fixed',
129	'left': '50%',
130	'top': '50%'
131	});
132	this.css({
133	'margin-left': -this.outerWidth() / 2 + 'px',
134	'margin-top': -this.outerHeight() / 2 + 'px'
135	});
136
137	return this;
138}
139
140/**
141 * AJAX호출을 공통함수로 처리
142 * callback_id : 후처리 구분값
143 * url : 호출주소
144 * type : POST or GET
145 * data : 전달 데이터
146 * async : true(비동기) or false
147 * form_use : 폼전송 사용시 true
148 * temp : 임시
149 * response.result : 999(세션만료),888(권한없음),400(처리오류)
150*/
151var isAjaxCall = false;
152function common_ajax_call(callbackId,url,type,data,async,formUse,temp) {
153    if(isAjaxCall == true) { return; }
154
155    if(formUse){
156        processData = false;
157        contentType = false;
158    }else{
159        processData = true;
160        contentType = "application/x-www-form-urlencoded; charset=UTF-8";
161    }
162    isAjaxCall = true;
163    $.ajax({
164        url: url,
165        type: type,
166        data: data,
167        dataType: "json",
168        cache: false,
169        contentType: contentType,
170        processData: processData,
171        async: async,
172        success: function(response) {
173            if(response.result == '999'){//세션만료 처리
174                modalAlert(response.desc,function(){
175                    location.href = siteUrl+'member/login';
176                });
177            }else if(response.result == '888' || response.result == '400'){
178                modalAlert(response.desc);
179            }else{
180                ajax_callBack(callbackId,response,temp);
181            }
182            isAjaxCall = false;
183        },
184        error: function(request,status,error) {
185            if(request.status === 401 || request.status === 403) {
186                alert('일시적인 오류 입니다. 다시 시도해 주세요.');
187            }else{
188                alert("ERROR : 서버 오류 관리자에게 문의하세요.");
189            }
190            //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
191            isAjaxCall = false;
192        },
193        complete: function (response) {
194
195        }
196    });
197}
198
199function getCookie(cname) {
200    var name = cname + '='
201    var decodedCookie = decodeURIComponent(document.cookie)
202    var ca = decodedCookie.split(';')
203    for(var i = 0; i <ca.length; i++) {
204        var c = ca[i]
205        while (c.charAt(0) == ' ') {
206            c = c.substring(1)
207        }
208        if (c.indexOf(name) == 0) {
209            return c.substring(name.length, c.length)
210        }
211    }
212    return ''
213}
214
215/**
216 * 병원지점코드로 의료과 리스트 반환
217 * @param {string} val1 키
218 * @param {string} val2 의료과 셀렉트박스 ID
219 * @param {string} sel 선택된 값
220 */
221function go_doctor_center_list(val1,val2,sel){
222    var data = {};
223    data['code_key'] = val1;
224    $.ajax({
225        url: siteUrl+'api/get_doctor_center_list_ajax',
226        type: 'POST',
227        data: data,
228        dataType: "json",
229        success: function(response) {
230            if(response.result == '100'){
231
232                $("#"+val2).empty();
233                var rstHtml = '<option value="">선택</option>';
234                if (response.list.length > 0) { //리스트 데이터가 있을때
235
236                    $.each(response.list, function(k, v) {
237                        selected = (sel == v.code_no) ? 'selected' : '';
238                        rstHtml += '<option value="'+v.code_no+'" '+selected+'>'+v.code_value+'</option>';
239                    });
240                }
241
242                $("#"+val2).append(rstHtml);
243                $('select').niceSelect('update');
244
245            }else{
246                modalAlert(response.desc);
247            }
248        },
249        error: function(request,status,error) {
250            if(request.status === 401 || request.status === 403) {
251                alert('일시적인 오류 입니다. 다시 시도해 주세요.');
252            }else{
253                alert("ERROR : 서버 오류 관리자에게 문의하세요.");
254            }
255            //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
256        },
257        complete: function (response) {
258
259        }
260    });
261}
262
263/**
264 * 병원지점코드로 안과센터 리스트 반환
265 * @param {string} val1 키
266 * @param {string} val2 안과센터 셀렉트박스 ID
267 * @param {string} sel 선택된 값
268 */
269 function go_counsel_center_list(val1,val2,sel){
270    var data = {};
271    data['code_key'] = val1;
272    $.ajax({
273        url: siteUrl+'api/get_counsel_center_list_ajax',
274        type: 'POST',
275        data: data,
276        dataType: "json",
277        success: function(response) {
278            if(response.result == '100'){
279
280                $("#"+val2).empty();
281                var rstHtml = '<option value="">선택</option>';
282                if (response.list.length > 0) { //리스트 데이터가 있을때
283
284                    $.each(response.list, function(k, v) {
285                        selected = (sel == v.code_no) ? 'selected' : '';
286                        rstHtml += '<option value="'+v.code_no+'" '+selected+'>'+v.code_value+'</option>';
287                    });
288                }
289
290                $("#"+val2).append(rstHtml);
291                $('select').niceSelect('update');
292
293            }else{
294                modalAlert(response.desc);
295            }
296        },
297        error: function(request,status,error) {
298            if(request.status === 401 || request.status === 403) {
299                alert('일시적인 오류 입니다. 다시 시도해 주세요.');
300            }else{
301                alert("ERROR : 서버 오류 관리자에게 문의하세요.");
302            }
303            //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
304        },
305        complete: function (response) {
306
307        }
308    });
309}
310
311/**
312 * 병원지점코드로 상담진료과목 반환
313 * @param {string} val1 키
314 * @param {string} val2 상담진료과목 셀렉트박스 ID
315 * @param {string} sel 선택된 값
316 * @param {string} gu 온라인상담(online), 진료예약(reserve) 구분
317 */
318 function go_counsel_medical_department_list(val1,val2,sel,gu){
319    var data = {};
320    data['code_key'] = val1;
321    $.ajax({
322        url: siteUrl+'api/get_counsel_medical_department_list_ajax',
323        type: 'POST',
324        data: data,
325        dataType: "json",
326        success: function(response) {
327            if(response.result == '100'){
328
329                $("#"+val2).empty();
330                var rstHtml = '<option value="">선택</option>';
331                if (response.list.length > 0) { //리스트 데이터가 있을때
332
333                    $.each(response.list, function(k, v) {
334                        selected = (sel == v.code_no) ? 'selected' : '';
335						if ((gu == 'online' || gu == 'reserve') && v.code_value == '사시·소아안과'){
336							rstHtml += '<option value="'+v.code_no+'" '+selected+'>'+v.code_value+' (※드림렌즈 관련 예약은 전화상담만 가능)</option>';
337						}else if ((gu == 'online' || gu == 'reserve') && v.code_value == '시력교정'){
338							rstHtml += '<option value="'+v.code_no+'" '+selected+'>'+v.code_value+' (※시력교정수술 전 검사 관련 문의는 전화상담만 가능)</option>';
339						}else if ((gu == 'online' || gu == 'reserve') && v.code_value == '각막'){
340							rstHtml += '<option value="'+v.code_no+'" '+selected+'>'+v.code_value+' (※렌즈 관련 예약은 전화 상담만 가능)</option>';
341						}else{
342							rstHtml += '<option value="'+v.code_no+'" '+selected+'>'+v.code_value+'</option>';
343						}
344                    });
345                }
346
347                $("#"+val2).append(rstHtml);
348                $('select').niceSelect('update');
349
350            }else{
351                modalAlert(response.desc);
352            }
353        },
354        error: function(request,status,error) {
355            if(request.status === 401 || request.status === 403) {
356                alert('일시적인 오류 입니다. 다시 시도해 주세요.');
357            }else{
358                alert("ERROR : 서버 오류 관리자에게 문의하세요.");
359            }
360            //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
361        },
362        complete: function (response) {
363
364        }
365    });
366}
367
368/**
369 * 병원지점코드와 안과센터코드로 의료진 리스트 반환
370 * @param {string} val1 병원지점키
371 * @param {string} val2 의료진 셀렉트박스 ID
372 * @param {string} val3 안과센터 키
373 * @param {string} sel 선택된 값
374 */
375 function go_doctor_list(val1,val2,val3,sel){
376    var data = {};
377    data['branch_code_key'] = val1;
378    data['center_code_no'] = val3;
379    $.ajax({
380        url: siteUrl+'api/get_doctor_list_ajax',
381        type: 'POST',
382        data: data,
383        dataType: "json",
384        success: function(response) {
385            if(response.result == '100'){
386
387                $("#"+val2).empty();
388                var rstHtml = '<option value="">선택</option>';
389                if (response.list.length > 0) { //리스트 데이터가 있을때
390
391                    $.each(response.list, function(k, v) {
392                        selected = (sel == v.doctor_no) ? 'selected' : '';
393                        rstHtml += '<option value="'+v.doctor_no+'" '+selected+'>'+v.doctor_name+'</option>';
394                    });
395                }
396
397                $("#"+val2).append(rstHtml);
398                $('select').niceSelect('update');
399
400            }else{
401                modalAlert(response.desc);
402            }
403        },
404        error: function(request,status,error) {
405            alert("ERROR : 서버 오류 관리자에게 문의하세요.");
406            //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
407        },
408        complete: function (response) {
409
410        }
411    });
412}
413
414/**
415 * 병원지점코드와 상담진료과목코드로 의료진 리스트 반환
416 * @param {string} val1 병원지점키
417 * @param {string} val2 의료진 셀렉트박스 ID
418 * @param {string} val3 상담진료과목코드 키
419 * @param {string} sel 선택된 값
420 */
421 function go_medical_doctor_list(val1,val2,val3,sel){
422    var data = {};
423    data['branch_code_key'] = val1;
424    data['medical_department'] = val3;
425    $.ajax({
426        url: siteUrl+'api/get_medical_doctor_list_ajax',
427        type: 'POST',
428        data: data,
429        dataType: "json",
430        success: function(response) {
431            if(response.result == '100'){
432
433                $("#"+val2).empty();
434                var rstHtml = '<option value="">선택</option>';
435                if (response.list.length > 0) { //리스트 데이터가 있을때
436
437                    $.each(response.list, function(k, v) {
438                        selected = (sel == v.doctor_no) ? 'selected' : '';
439                        rstHtml += '<option value="'+v.doctor_no+'" '+selected+'>'+v.doctor_name+'</option>';
440                    });
441                }
442
443                $("#"+val2).append(rstHtml);
444                $('select').niceSelect('update');
445
446            }else{
447                modalAlert(response.desc);
448            }
449        },
450        error: function(request,status,error) {
451            alert("ERROR : 서버 오류 관리자에게 문의하세요.");
452            //alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
453        },
454        complete: function (response) {
455
456        }
457    });
458}
459
460/**
461 * PC 및 모바일 의료진 검색
462 */
463function go_doctor_search(){
464    var schBranchCodeKey = $('#sch_branch_code_key').val();
465
466    if(schBranchCodeKey){
467        var schCenterCodeNo = $('#sch_center_code_no').val();
468        var schDoctorNo = ($("#sch_doctor_no").val()) ? $("#sch_doctor_no option:checked").text() : '';
469
470        location.href = siteUrl+'about/doctor_list?sch_branch_code_key='+schBranchCodeKey+'&sch_center_code_no='+schCenterCodeNo+'&sch_text='+schDoctorNo;
471    }else{
472        var schDoctorName = $('#sch_doctor_name').val();
473        location.href = siteUrl+'about/doctor_list?sch_branch_code_key=1&sch_text='+schDoctorName;
474    }
475}
476
477/**
478 * 파일다운로드
479 */
480function file_download(val1,val2,val3){
481    //location.href = siteUrl+`api/file_download?url=${val1}&ori=${val2}&save=${val3}`;
482    location.href = siteUrl+'api/file_download?url='+val1+'&ori='+val2+'&save='+val3;
483}
484
485/**
486 * 달력이동
487 */
488 function move_calendar(val1,yyyy,mm){
489    var date = new Date(yyyy,mm-1,1);
490    var yyyy1 = '';
491    var mm1 = '';
492
493    switch(val1){
494        case 'y1' : //이전연도
495            date.setFullYear(date.getFullYear()-1);
496            yyyy1 = date.getFullYear();
497            mm1 = date.getMonth()+1;
498            break;
499
500        case 'y2' : //다음연도
501            date.setFullYear(date.getFullYear()+1);
502            yyyy1 = date.getFullYear();
503            mm1 = date.getMonth()+1;
504            break;
505
506        case 'm1' : //이전달
507            date.setMonth(date.getMonth()-1);
508            yyyy1 = date.getFullYear();
509            mm1 = date.getMonth()+1;
510            break;
511
512        case 'm2' : //다음달
513            date.setMonth(date.getMonth()+1);
514            yyyy1 = date.getFullYear();
515            mm1 = date.getMonth()+1;
516            break;
517        default:
518    }
519
520    var returnArray = new Array(yyyy1,mm1);
521
522    return returnArray;
523
524}
525
526
527function FN_CheckId(id){
528
529    var num = id.search(/[0-9]/g);
530    var eng = id.search(/[a-zA-Z]/ig);
531    var spe = id.search(/[`~!@#$%^&*()\-_=+\[\]{}|\\\'\";:\/?,,<>]/gi);
532
533    var msg = '';
534
535    if(id.search(/\s/) != -1){
536        msg = "아이디는 공백없이 4자 이상 영문/숫자 조합만 가능합니다.";
537    }else if(id.length < 4){
538        msg = "아이디는 공백없이 4자 이상 영문/숫자 조합만 가능합니다.";
539    }else if(spe >= 0){
540        msg = "아이디는 공백없이 4자 이상 영문/숫자 조합만 가능합니다.";
541    }else {
542
543    }
544    return msg;
545}
546
547function FN_CheckPw(pw){
548
549    var num = pw.search(/[0-9]/g);
550    var eng = pw.search(/[a-zA-Z]/ig);
551    var spe = pw.search(/[`~!@#$%^&*()\-_=+\[\]{}|\\\'\";:\/?,,<>]/gi);
552
553    var msg = '';
554    var chkmin = 0;
555    if(num < 0) chkmin++;
556    if(eng < 0) chkmin++;
557    if(spe < 0) chkmin++;
558
559    if(pw.length < 8 || pw.length > 12){
560        msg = "8~12자로 영문,숫자,특수문자 중 2가지 이상 조합으로 입력해 주세요.";
561    }else if(pw.search(/\s/) != -1){
562        msg = "8~12자로 영문,숫자,특수문자 중 2가지 이상 조합으로 입력해 주세요.";
563    }else if(chkmin>=2){
564        msg = "8~12자로 영문,숫자,특수문자 중 2가지 이상 조합으로 입력해 주세요.";
565    }else {
566
567    }
568    return msg;
569}
570
571function FN_CheckEmail(email){
572    var filter = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
573
574    if (filter.test(email) == false)
575    {
576        return false;
577    }else{
578        return true;
579    }
580}
581
582function FN_CheckHp(num) {
583    var regExp = /^(01[016789]{1}|02|0[3-9]{1}[0-9]{1})-?[0-9]{3,4}-?[0-9]{4}$/;
584
585    if(!regExp.test(num)) {
586        return false;
587    }else{
588        return true;
589    }
590}
591
592$(document).on("keyup", ".onlynumber", function() {
593    $(this).val( $(this).val().replace(/[^0-9]/g,'') ); //숫자
594});
595$(document).on("keyup", ".onlyengnum", function() {
596    $(this).val( $(this).val().replace(/[^0-9a-zA-Z]/g,'') ); //숫자+영문
597});
598
599
600function go_valid_text(id,msg,gubun){
601    if(gubun == 'add'){
602      $('#'+id).addClass('error');
603      $('#'+id+'_desc').addClass('error-alert');
604      $('#'+id+'_desc').text(msg);
605    }else if(gubun == 'remove'){
606      $('#'+id).removeClass('error');
607      $('#'+id+'_desc').removeClass('error-alert');
608      $('#'+id+'_desc').text(msg);
609    }
610}
611
612var validChkResult = {}; //폼체크 전역변수
613/**
614 * 폼체크 함수
615 * @param {*} inputGubun : input type 구분
616 * @param {*} id : input 태그 ID
617 * @param {*} errorMsg : 에러 메시지
618 * @param {*} defaultMsg : 디폴트 메시지
619 * @param {*} alertYn : 경고창여부
620 */
621function FN_required_valid_chk(inputGubun,id,errorMsg,defaultMsg,alertYn){
622    var inputText = '';
623    if(inputGubun == 'input' || inputGubun == 'select' || inputGubun == 'niceselect'){
624        inputText = $.trim($('#'+id).val());
625    }else if(inputGubun == 'agreecheck'){
626        inputText = ($('input:checkbox[id="'+id+'"]').is(":checked") == true) ? 'Y' : '';
627    }
628    if(!inputText){
629        $('#'+id).addClass('error');
630        $('#'+id+'_desc').addClass('error-alert');
631        $('#'+id+'_desc').text(errorMsg).show();
632        if(inputGubun == 'niceselect'){
633            $('#'+id).niceSelect('update');//nice select 일때 갱신
634        }
635        if(validChkResult.result){ //제일 처음에 체크된 요소를 삽입
636            if(inputGubun == 'niceselect'){
637                $('#'+id+'_desc').focus();//nice select 사용으로 select에 포커스가 안돼서, desc 요소에 tabindex="-1" 추가해야함
638            }else{
639                $('#'+id).focus();
640            }
641            if(alertYn == 'alertY'){//팝업도 띄우기 원한다면
642                validChkResult.alertMsg = errorMsg;
643                if(inputGubun == 'niceselect'){
644                    validChkResult.focusId = id+'_desc';
645                }else{
646                    validChkResult.focusId = id;
647                }
648            }
649        }
650        validChkResult.result = false;
651    }else{
652        $('#'+id).removeClass('error');
653        $('#'+id+'_desc').removeClass('error-alert');
654        $('#'+id+'_desc').text(defaultMsg);
655        if(inputGubun == 'niceselect'){
656            $('#'+id).niceSelect('update');//nice select 일때 갱신
657        }
658    }
659}
660
661
662function FN_required_valid_checkbox_chk(inputGubun, id){
663
664    if(inputGubun == "agreecheck"){
665        inputText = ($('input:checkbox[id="'+id+'"]').is(":checked") == true) ? 'Y' : '';
666    }
667    if(!inputText){
668        $('#'+id).next('label').addClass('error-color');
669        validChkResult.result = false;
670    }
671    else{
672        $('#'+id).next('label').removeClass('error-color');
673    }
674
675}
676
677function go_login_page(){
678    location.href = siteUrl+'member/login?url='+encodeURIComponent(fullUrl);
679}
680
681//카카오 지도 호출을 위해서는 key가 포함된 스크립트를 먼저 호출 필요
682/**
683 *
684 * @param {지도 element} element
685 * @param {실제 주소} address
686 * @param {인포창 사용 유무 / default true} isInfo
687 * @returns
688 */
689function load_kakao_map(element,address,isInfo){
690    var mapContainer = document.getElementById(element), // 지도를 표시할 div
691
692    mapOption = {
693        center: new daum.maps.LatLng(0, 0),// 지도의 중심좌표
694        level: 3// 지도의 확대 레벨
695    };
696
697    //지도 생성
698    var map = new daum.maps.Map(mapContainer, mapOption);
699
700    // 주소-좌표 변환 객체를 생성합니다
701    var geocoder = new daum.maps.services.Geocoder();
702
703    // 주소로 좌표를 검색합니다
704    geocoder.addressSearch(address, function(result, status) {
705
706        // 정상적으로 검색이 완료됐으면
707        if (status === daum.maps.services.Status.OK) {
708
709            var coords = new daum.maps.LatLng(result[0].y, result[0].x);
710
711            // 결과값으로 받은 위치를 마커로 표시
712            var marker = new daum.maps.Marker({
713                map: map,
714                position: coords
715            });
716
717
718            if(isInfo){
719                // 커스텀 오버레이 생성
720                var content = '<div style="width:150px;padding:5px 0;background-color:#ffffff;text-align:center;"><img src="/assets/img/logoB.svg" style="width:80%; vertical-align:top; pointer-events:none;"></div>';
721                var customOverlay = new kakao.maps.CustomOverlay({
722                    map: map,
723                    position: coords,
724                    content: content,
725                    yAnchor:2.3
726                });
727
728                /*
729                // 인포윈도우로 장소에 대한 설명을 표시
730                var infowindow = new daum.maps.InfoWindow({
731                    content: '<img src="/assets/img/guide/logo.gif" style="width:80%;margin:0px 10%">'
732                });
733                infowindow.open(map, marker);
734                */
735            }
736
737            // 지도의 중심을 결과값으로 받은 위치로 이동
738            map.setCenter(coords);
739            map.coords = coords;
740        }
741    });
742    return map;
743}
744
745function go_online_menu(){
746	if(!isLogin){
747      modalOpen("#onlineLoginConfirm");
748    }else{
749	  if(accessGubun == 'mypage'){
750		location.href = siteUrl+'mypage/online_write';
751	  }else{
752		location.href = siteUrl+'counsel/online_write';
753	  }
754    }
755}
756
757function go_reserve_menu(){
758    location.href = siteUrl+'counsel/reserve_write';
759}
760
761function go_review_menu(val){
762	if(!isLogin){
763		modalConfirm('의료법에 따라 로그인 후 이용 가능합니다.<br/>로그인 후 자세한 내용을 확인하세요.', function() {
764			go_login_page();
765		});
766	}else{
767		if(!val){ 
768			val = 'list';
769		}
770		location.href = siteUrl+'customer/review_'+val;
771	}
772}

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.