PageSourceSearch

https://www.yes24.com/24/Scripts/Common/address.js?v=

js yes24.com collected 2026-09-24 08:38:27 UTC 35,664 bytes, 905 lines download raw bytes

1// PlaceHolder Extends
2(function ($) {
3    $.fn.placeHolder = function () {
4        return this.each(function () {
5            $.placeHolder(this);
6        });
7    }
8
9    $.fn.phVal = function (value) {
10        if (value != undefined || value != null) {
11            $(this).val(value);
12            $.placeHolderSet(this);
13        }
14
15        return $.phVal(this);
16    }
17
18    $.phVal = function (obj) {
19        var text = $(obj).val();
20        var title = $(obj).attr('title');
21
22        if (text == title)
23            return '';
24        else
25            return text;
26    }
27
28    $.placeHolderSet = function (obj) {
29        var text = $(obj).val();
30        var title = $(obj).attr('title');
31
32        if (text != undefined && text == '') {
33            $(obj).val(title);
34        }
35
36        $.placeHolderStyleSet(obj);
37    }
38
39    $.placeHolderStyleSet = function (obj) {
40                var text = $(obj).val();
41                var title = $(obj).attr('title');
42
43                if (text == title) {
44                    $(obj).css('color', '#999999');
45                }
46                else {
47                    $(obj).css('color', '#000000');
48                }
49    }
50
51    $.placeHolder = function (obj) {
52        var setting = function (input) {
53            var text = $(input).val();
54            var title = $(input).attr('title');
55
56            if (text != undefined && text == '')
57                $(input).val(title);
58        }
59        $.placeHolderSet(obj);
60
61        $(obj).bind('blur', function () {
62            $.placeHolderSet(this);
63        });
64
65        $(obj).bind('focus', function () {
66            var text = $(this).val();
67            var title = $(this).attr('title');
68
69            if (text == title) {
70                $(this).val('');
71            }
72            $.placeHolderStyleSet(this);
73        });
74
75    }
76})(jQuery);
77
78// 도로명 사용 변수
79var EventJson = null;
80var _PC_URL = 'http://www.yes24.com';
81var PAYMENT_HTTP_URL = 'https://ssl.yes24.com';
82var PC_HTTPS_URL = 'https://www.yes24.com';
83var isPaymentSite = false;
84var doroCnt = 0;
85var jibunCnt = 0;
86// 도로명 / 지번 주소 선택시 마지막 선택값
87var selectedAddrItem = null;
88
89// 모바일 웹인지 결재웹인지 체크
90var href = document.location.href.toLowerCase();
91
92if (href.indexOf('?') > 0)
93    href = href.substring(0, href.indexOf('?'));
94
95
96if (href.indexOf(PAYMENT_HTTP_URL.replace('http://', '').replace('https://', '').toLowerCase()) > 0
97    || href.indexOf('ssl.yes24.com') > 0) {
98    isPaymentSite = true;
99} // 모바일 모모 웹인지 체크 
100
101if (href.indexOf('https://') >= 0) {
102    _PC_URL = PC_HTTPS_URL;
103}
104
105var isDetailFirstAlert = true;
106var isDoro = false;
107var _useSaseham = true;
108
109// 상세주소 사서함 문구 체크
110function bindDetailEvent() {
111
112    function check() {
113        if (isDoro) {
114            var value = $(this).val();
115
116            if (isDetailFirstAlert) {
117                if (!validate_saseham(value, true)) {
118                    isDetailFirstAlert = false;
119                }
120            }
121
122            if (value == '') {
123                isDetailFirstAlert = true;
124            }
125        }
126    }
127
128    $('#txtAddAddr').bind('keyup', check);
129}
130
131// 도로명 시/군/구 Ajax값 Display 처리
132function SetSubAdddress(subAddress) {
133    var tarOpt = $('#sAddress2 option').eq(0);
134    $('#sAddress2 option').not(tarOpt).remove();
135
136    if (subAddress == null || (subAddress.length == 1 && ( subAddress[0] == null || subAddress[0] == ""))) {
137        $('<option selected>시/군/구 없음</option>').appendTo('#sAddress2');
138    }
139    else {
140        for (var i = 0; i < subAddress.length; i++) {
141            $('<option>' + subAddress[i] + '</option>').appendTo('#sAddress2');
142        }
143    }
144}
145
146// 레이어 창 띄우기
147function PostalCodeCheckWindow(eventJson, url, obj, useSaseham) {
148
149    if (useSaseham != undefined && useSaseham != null) {
150        _useSaseham = useSaseham
151    }
152
153    // 변수 초기화
154    isDetailFirstAlert = true;
155    isDoro = false;
156
157    EventJson = eventJson;
158    var _url = _PC_URL + '/24/Address/FindAddress';
159    //ajaxNoCache();
160    if (url != undefined && url != null) {
161        if (url.indexOf('http') != 0)
162            _url = _PC_URL + '/' + url;
163        else
164            _url = url;
165    }
166
167    // 생성된 창이 잇으면 취소
168    if ($('#addr_plyr').length > 0)
169        return false;
170
171    if (!isPaymentSite || !(url == null || url == undefined || url == ''))
172        loadAddressLayer(obj, _url, SetAddressUI);
173    else {
174        // UI 코드 ssl.yes24.com 에서 사용 되어질 템플릿 html
175        // UI 관리는 PC에서 하기 위해 제공
176        var templateHtml = '';
177
178        //templateHtml += '<link rel="stylesheet" type="text/css" href="https://www.yes24.com/resource/css/order.css">';
179        templateHtml += '<link rel="stylesheet" type="text/css" href="https://www.yes24.com/24/Content/Common/https_address.css?v=23121124" />';
180
181        templateHtml += '<div id="addr_plyr" class="plyr">';
182        templateHtml += '	<div class="plyr_w">';
183        templateHtml += '		<div class="cock"></div>';
184        templateHtml += '		<h3 class="plyr_t">주소 찾기</h3>';
185        templateHtml += '		<div class="plyr_c" style="width:470px;">';
186        templateHtml += '			<div class="popTabLi">';
187        templateHtml += '				<ul id="ulTab" class="tabLi">';
188        templateHtml += '					<li class="on lastLi"><a href="javascript:void(0)">
188도로명주소로 찾기</a></li>';
189        templateHtml += '					<li class=""><a href="javascript:void(0)">지번주소로 찾기</a></li>';
190        templateHtml += '				</ul>';
191        templateHtml += '			</div>';
192        templateHtml += '			<div class="cmtPostTxt">';
193        templateHtml += '				<span class="txt_tit jibunMain" style="display:none;"><strong>지번주소의 읍/면/동을 입력하세요.</strong></span>';
194        templateHtml += '				<span class="txt_tit doroMain"><strong>시/도 + 시/군/구 + 도로명을 입력해주세요.</strong></span>';
195        templateHtml += '				<span class="txt_cmt doroMain"><em>건물번호</em> 입력 시, 상세 검색 가능 </span>';
196        templateHtml += '			</div>';
197        templateHtml += '			<div class="boxPostSch">';
198        templateHtml += '				<div class="boxPostSchCon">';
199        templateHtml += '					<div class="boxPostSchSel doroMain">';
200        templateHtml += '						<select id="sAddress1" title="시/도 선택">';
201        templateHtml += '							<option selected>시/도 선택</option>';
202        templateHtml += '                            <option>서울특별시</option>';
203        templateHtml += '                            <option>부산광역시</option>';
204        templateHtml += '                            <option>대구광역시</option>';
205        templateHtml += '                            <option>인천광역시</option>';
206        templateHtml += '                            <option>광주광역시</option>';
207        templateHtml += '                            <option>대전광역시</option>';
208        templateHtml += '                            <option>울산광역시</option>';
209        templateHtml += '                            <option>세종특별자치시</option>';
210        templateHtml += '                            <option>경기도</option>';
211        templateHtml += '                            <option>강원도</option>';
212        templateHtml += '                            <option>충청북도</option>';
213        templateHtml += '                            <option>충청남도</option>';
214        templateHtml += '                            <option>전라북도</option>';
215        templateHtml += '                            <option>전라남도</option>';
216        templateHtml += '                            <option>경상북도</option>';
217        templateHtml += '                            <option>경상남도</option>';
218        templateHtml += '                            <option>제주특별자치도</option>';
219        templateHtml += '						</select>';
220        templateHtml += '						<select id="sAddress2" title="시/군/구 선택">';
221        templateHtml += '							<option>시/군/구 선택</option>';
222        templateHtml += '						</select>';
223        templateHtml += '					</div>';
224        templateHtml += '					<div class="mgt5 doroMain">';
225        templateHtml += '						<input type="text" id="txtStNm" title="도로명, ex) 중앙로"/>';
226        templateHtml += '						<input type="text" id="stBuMainNo" title="건물번호(선택입력), ex) 11"/>';
227        templateHtml += '						<a href="javascript:void(0)" id="aDoroSearch" class="bw btnBoxPostSch">검색</a>';
228        templateHtml += '					</div>';
229        templateHtml += '                    <div class="mgt5 ac jibunMain" style="display:none;">';
230        templateHtml += '						<input type="text" id="txtJibunNm" maxlength="100" title="ex) 여의도동 15-15"/>';
231        templateHtml += '						<a href="javascript:void(0)" id="aJibunSearch" class="bw btnBoxPostSch">검색</a>';
232        templateHtml += '					</div>';
233        templateHtml += '				</div>';
234        templateHtml += '			</div>';
235        templateHtml += '			<div class="postSchTbTotArea" style="position:relative;">';
236        templateHtml += '			    <div class="postSchTbArea">';
237        templateHtml += '			    	<table cellpadding="0" cellspacing="0" border="0" width="470" class="tb_postSchLi">';
238        templateHtml += '			    		<colgroup>';
239        templateHtml += '			    			<col width="80"/>';
240        templateHtml += '			    			<col width="390"/>';
241        templateHtml += '			    		</colgroup>';
242        templateHtml += '			    		<thead>';
243        templateHtml += '			    			<tr>';
244        templateHtml += '			    				<th class="titPdLft">우편번호</th>';
245        templateHtml += '			    				<th>주소</th>';
246        templateHtml += '			    			</tr>';
247        templateHtml += '			    		</thead>';
248        templateHtml += '			    		<tbody id="tbAddressList">';
249        templateHtml += '			    			<tr>';
250        templateHtml += '			    				<td colspan="2" class="noData">';
251        templateHtml += '			    					<strong class="noData_tit">검색된 주소가 없습니다.</strong>';
252        templateHtml += '			    					<p class="noData_cmt">';
253        templateHtml += '			    						도로명주소가 검색되지 않을 경우<br>';
254        templateHtml += '			    						새주소 안내시스템 (<a href="http://www.epost.go.kr/search.RetrieveIntegrationNewZipCdList.comm" target="_blank">http://www.epost.go.kr/</a>)을<br />';
255        templateHtml += '			    						통해 정확한 주소를 확인해 주세요.';
256        templateHtml += '			    					</p>';
257        templateHtml += '			    				</td>';
258        templateHtml += '			    			</tr>';
259        templateHtml += '			    		</tbody>';
260        templateHtml += '			    	</table>';
261        templateHtml += '                    <input type="hidden" id="hdPopupZipCD" value=""/>';
262        templateHtml += '                    <input type="hidden" id="hdPopupZipSEQ" value="" />';
263        templateHtml += '                    <input type="hidden" id="hdPopupAddr1" value="" />';
264        templateHtml += '                    <input type="hidden" id="hdPopupAddr2" value="" />';
265        templateHtml += '                    <input type="hidden" id="hdPopupAddr3" value="" />';
266        templateHtml += '                    <input type="hidden" id="hdPopupAddr4" value="" />';
267        templateHtml += '			    </div>';
268        templateHtml += '			    <div id="postSchAlert" class="postSchAlertArea" style="visibility: hidden;">';
269        templateHtml += '				    <div class="postSchAlertDl">';
270        templateHtml += '					    <dl>';
271        templateHtml += '						    <dt>안내</dt>';
272        templateHtml += '						    <dd>';
273        templateHtml += '							    <p>총 검색결과 중, <u>500건</u>만 보여집니다.</p>';
274        templateHtml += '							    <p class="mgt10 txC_gray">';
275        templateHtml += '								    정확하고  빠른 검색을 위해, "지번 또는 건물명"과 <br/>';
276        templateHtml += '								    같은 추가 정보를 입력해 주세요. ';
277        templateHtml += '							    </p>';
278        templateHtml += '							    <div class="mgt10">';
279        templateHtml += '								    <a href="javascript:showAddressInfo(false);" class="btn_postAlertConfirm imgAlt">확인</a>';
280        templateHtml += '							    </div>';
281        templateHtml += '							    <a href="javascript:showAddressInfo(false);" title="닫기" class="btn_postAlertClose">닫기</a>';
282        templateHtml += '						    </dd>';
283        templateHtml += '					    </dl>';
284        templateHtml += '				    </div>';
285        templateHtml += '				    <div class="postSchAlertMask">&nbsp;</div>';
286        templateHtml += '			    </div>';
287        templateHtml += '			</div>';
288        templateHtml += '			<div class="postDetailArea">';
289        templateHtml += '				<div class="postDetailCon">';
290        templateHtml += '					<ul>';
291        templateHtml += '						<li><strong>지번주소</strong><input type="text" id="txtDetailJibun" readonly="readonly" value="" style="color:#999;background-color:#f5f5f5;" /></li>';
292        templateHtml += '						<li><strong>도로명주소</strong><input type="text" id="txtDetailDoro" value="" /></li>';
293        templateHtml += '						<li><strong>상세주소</strong><input type="text" id="txtAddAddr" title="* 층 / 동 / 호" /></li>';
294        templateHtml += '					</ul>';
295        templateHtml += '				</div>';
296        templateHtml += '			</div>';
297        templateHtml += '			<div class="btn_area_p"><a href="javascript:void(0)" id="aOK" class="btnPutAddr imgAlt">주소 입력</a> <a href="javascript:void(0)" id="btnCancel" class="bw cnl" title="취소">취소</a></div>';
298        templateHtml += '			<p class="noti mgt10">사서함 및 군부대는 [지번주소로 찾기]를 통해 <strong>사서함 우편번호</strong>를 이용해주세요.';
299        templateHtml += '			사서함 주소지가 검색 되지 않는 경우 반드시 고객센터(1544-3800)로 전화, <br/>';
300        templateHtml += '			또는 1:1게시판으로 문의 하여 주소지 안내를 받으신 후 이용해주시기 바랍니다.</p>';
301        templateHtml += '		</div>';
302        templateHtml += '		<div><a href="javascript:void(0)" id="addressClose" title="닫기" class="close">닫기</a></div>';
303        templateHtml += '	</div>';
304        templateHtml += '</div>';
305
306
307        popupShowByString(templateHtml, obj, SetAddressUI)
308    }
309}
310
311// 기본 주소레이어 이벤트 바인딩
312function SetAddressUI() {
313
314    // tab
315    $('#ulTab a').bind('click', function () {
316        $('#ulTab li').attr('class', '');
317        $(this).parent().attr('class', 'on');
318
319        if ($('#ulTab li a').index($(this)) == 0) {
320            $('.jibunMain').css('display', 'none');
321            $('.jibun').css('display', 'none');
322
323            $('.doroMain').css('display', '');
324
325            if ($('#ulAddressList li').length > 0)
326                $('#ulAddressList').css('display', '');
327
328            $('.doro').css('display', '');
329            $('#txtAddAddr').attr('title', '* 층 / 동 / 호');
330            isDoro = true;
331            if (doroCnt == 0) {
332                setEmptyDoro();
333            }
334        }
335        else {
336            $('.doroMain').css('display', 'none');
337            $('.doro').css('display', 'none');
338
339            $('.jibunMain').css('display', '');
340
341            $('.jibun').css('display', '');
342            $('.jibunDetail').css('display', '');
343            $('#txtAddAddr').attr('title', '* 층 / 동 / 호');
344
345            isDoro = false;
346            if (jibunCnt == 0) {
347                setEmptyJibun();
348            }
349        }
350
351        // 선택값 초기화
352        $('#txtDetailDoro').val('');
353        $('#txtDetailJibun').val('');
354        $('#hdPopupZipCD').val('');
355        $('#hdPopupZipSEQ').val('');
356        $('#hdPopupAddr1').val('');
357        $('#hdPopupAddr2').val('');
358        $('#hdPopupAddr3').val('');
359        $('#hdPopupAddr4').val('');
360        $('.txt_wSizeF textarea').val('');
361        $('#txtStNm').phVal('');
362        $('#txtJibunNm').phVal('');
363        $('#stBuMainNo').phVal('');
364        $('#txtAddAddr').phVal('');
365    });
366
367    // doro
368    $('#sAddress1').bind('change', function () {
369        var addr1 = $('#sAddress1').val();
370        $.ajax({
371            url: _PC_URL + '/24/Address/FindSubAddress/?addr1=' + escape(addr1),
372            contentType: 'application/x-www-form-urlencoded; charset=utf-8',
373            dataType: 'jsonp',
374            success: function (data, stateus, errorcode) {
375                SetSubAdddress(data);
376            }
377        });
378    });
379
380    $('#aDoroSearch').bind('click', function () {
381        SearchAddress();
382    });
383    $('#txtStNm, #stBuMainNo').bind('keyup', function (e) {
384        if (isEnteryKey(e))
385            SearchAddress();
386    });
387
388    // jibun
389    $('#aJibunSearch').bind('click', function (e) {
390        jibunSearch();
391    });
392    $('#txtJibunNm').bind('keyup', function (e) {
393        if (isEnteryKey(e)) {
394            jibunSearch();
395        }
396    });
397
398    // 주소확인
399    $('#aOK').bind('click', function (e) {
400        var detailDoro = $('#txtDetailDoro').val();
401        var detailJibun = $('#txtDetailJibun').val();
402        var zipCd = $('#hdPopupZipCD').val(); //.replace(/-/g, "");
403        var addAddress = $('#txtAddAddr').phVal();
404        var zipSeq = $('#hdPopupZipSEQ').val();
405        var addr1 = $('#hdPopupAddr1').val();
406        var addr2 = $('#hdPopupAddr2').val();
407        var addr3 = $('#hdPopupAddr3').val();
408        var addr4 = $('#hdPopupAddr4').val();
409
410        if (isDoro) {
411            if (detailDoro == '' || detailDoro == '&nbsp;') {
412                alert('검색 후 해당하는 주소를 선택해주세요.');
413                return false;
414            }
415        }
416        else {
417            if (detailJibun == '' || detailJibun == '&nbsp;') {
418                alert('검색 후 해당하는 주소를 선택해주세요.');
419                return false;
420            }
421
422            if (trim(addAddress) == '') {
423                alert('상세주소를 입력 하세요.');
424                return false;
425            }
426        }
427
428        if (EventJson != null && EventJson.AddressOK != undefined)
429            EventJson.AddressOK(zipCd, zipSeq, addr1, addr3, addr4, addAddress, detailJibun, selectedAddrItem, EventJson);
430
431
432        closeAddressUI();
433    });
434
435    $('#addressClose, #btnCancel').bind('click', function () { closeAddressUI(); });
436
437    // 도로명 상세주소 입력시
438    bindDetailEvent();
439
440    // placeholder 값 채우기
441    $('#txtStNm, #txtJibunNm, #stBuMainNo, #txtAddAddr').placeHolder();
442}
443
444// list ui event setting
445function listLiEventSetting() {
446    $('#postNumLi').find('li').bind('mouseover', function () {
447        $(this).css("background-color", "#f8f8f8");
448    });
449
450    $('#postNumLi').find('li').bind('mouseleave', function () {
451        if ($(this).attr("class") != "post_li clkLi") {
452            $(this).css("background-color", "");
453        }
454    });
455
456    $('#postNumLi').find('li').bind('click', function () {
457        $(this).parent().find('li').attr("class", "post_li"); // 초기화
458        $(this).parent().find('li').css("background-color", ""); // 초기화
459
460        $(this).attr("class", "post_li clkLi");
461        $(this).css("background-color", "#f8f8f8");
462    });
463}
464
465// 창닫기
466function closeAddressUI() {
467    $('#addr_plyr').remove();
468}
469
470// 도로명 주소 검색
471function SearchAddress() {
472    var addr1 = $('#sAddress1').val();
473    var addr2 = $('#sAddress2').val();
474    var st_nm = $('#txtStNm').phVal();
475    var bu_main_no = $('#stBuMainNo').phVal();
476    var tmp_bu_nos = bu_main_no.split('-');
477    var bu_sub_no = '';
478
479    if (tmp_bu_nos.length > 1) {
480        bu_main_no = tmp_bu_nos[0];
481        bu_sub_no = tmp_bu_nos[1];
482    }
483    else
484        bu_sub_no = '';
485
486    if ($('#sAddress1 option').index($('#sAddress1 option:selected')) == 0) {
487        alert('\'시/도\'를 선택해주세요.');
488        return false;
489    }
490
491    if ($('#sAddress2 option').index($('#sAddress2 option:selected')) == 0) {
492        alert('\'시/군/구\'를 선택해주세요.');
493        return false;
494    }
495
496    if (st_nm == '') {
497        alert('\'도로명\'을 입력해주세요.');
498        return false;
499    }
500    else if (st_nm.length < 2) {
501        alert('\'도로명\'에는 최소 2글자 이상 입력해주세요.');
502        return false;
503    }
504
505    if (addr1 == '세종특별자치시')
506        addr2 = '';
507
508    $.ajax(
509            {
510                url: _PC_URL + '/24/Address/FindAddressByParams/?addr1=' + escape(addr1) + '&addr2=' + escape(addr2) + '&st_nm=' + escape(st_nm) + '&bu_main_no=' 
510+ escape(bu_main_no) + '&bu_sub_no=' + bu_sub_no,
511                contentType: 'application/x-www-form-urlencoded; charset=utf-8',
512                dataType: 'jsonp',
513                success: function (data) {
514                    var html = '';
515                    $('#ulAddressList').html('');
516
517                    if (data == null || data == undefined || data.length == 0) {
518                        setEmptyDoro();
519                    }
520                    else {
521                        var ul = getListContainerUlElement();
522
523                        var containerTR = getListContainerElement();
524
525                        if (data.length >= 100) {
526                            //showAddressInfo(treu);
527                            $('#postSchAlert').css('visibility', 'visible');
528                        }
529
530                        for (var i = 0; i < data.length; i++) {
531                            html = '           <li class="post_li" onclick="SetAddress(this, \'' + data[i].ADDR1 + '\',\'' + data[i].ADDR2 + '\',\'' + data[i].ADDR3 + '\',\'' + DoroDongCityCheck(data[i].DONG_NM, scriptStringCheck(data[i].CITY_BU_NM), false) + '\',\'' + data[i].ST_NM + '\',\'' + data[i].ZIP_SEQ + '\',\'' + data[i].ZIP_CD + '\',\'' + scriptStringCheck(GetSimpleDoroName(data[i])) + '\',\'' + scriptStringCheck(GetFullDoroName(data[i])) + '\', \'' + scriptStringCheck(GetJibuName(data[i])) + '\');">';
532                            html += '           	<span class="item_post_poNum">';
533                            html += '                   ' + data[i].ZIP_CD;
534                            html += '               </span>';
535                            html += '           	<span class="item_post_poAddr">';
536                            html += '           		' + GetFullDoroName(data[i]) + '<br>';
537                            html += '           		<em class="poTxtGray">[지번주소] ' + GetJibuName(data[i]) + '</em>';
538                            html += '           	</span>';
539                            html += '           </li>';
540
541                            var li = $(html).data('data', data[i]);
542                            li.appendTo(ul);
543                        }
544
545                        ul.appendTo(containerTR.find('div'));
546                        $('#tbAddressList').empty();
547                        containerTR.appendTo('#tbAddressList');
548
549                        $('.doro').css('display', '');
550
551                        listLiEventSetting();
552                    }
553
554                }
555            }
556        );
557}
558
559/* 화면에 주소명 표시 기능 시작 */
560function ValueCheck(str) {
561    return (str != '' && str != null && str != 'null') ? ' ' + str : '';
562}
563
564function BuNoCheck(str) {
565    return (str == undefined || str == 'null' || str == '' || str == '0') ? '' : '-' + str;
566}
567
568function DoroDongCityCheck(dong, city, isUsePrefix) {
569    var ret = '';
570    var beginPrefix = '(';
571    var endPrefix = ')';
572
573    if (!isUsePrefix) {
574        beginPrefix = '';
575        endPrefix = '';
576    }
577
578    if (( dong == null || dong == '' ) && ( city == null || city == '') )
579        return '';
580    else if (dong == null || dong == '')
581        return beginPrefix + city + endPrefix;
582    else if (city == null || city == '')
583        return beginPrefix + dong + endPrefix;
584    else
585        return beginPrefix + dong + ',' + city + endPrefix;
586}
587
588function GetJihaDesc(gb) {
589    var where = '';
590    //0=지상, 1=지하, 2=공중, 없음=등록안된상태
591    switch (gb) {
592        case '0':
593            where = '';
594            break;
595        case '1':
596            where = '지하';
597            break;
598        case '2':
599            break;
600        default:
601            break;
602    }
603
604    return where;
605}
606
607function GetSimpleDoroName(data) {
608
609    return data.ADDR1 + ValueCheck(data.ADDR2) + ValueCheck(data.ADDR3) + ValueCheck(data.ST_NM) + ValueCheck(GetJihaDesc(data.BF_GB)) + ValueCheck(data.BU_MAIN_NO) + BuNoCheck(data.BU_SUB_NO);
610}
611
612function GetFullDoroName(data, detailAddress) {
613    var tempDetailAddress = '';
614
615    if (detailAddress != undefined)
616        tempDetailAddress = ', ' + detailAddress;
617
618    return GetSimpleDoroName(data) + tempDetailAddress + DoroDongCityCheck(data.DONG_NM, data.CITY_BU_NM, true);
619}
620
621function GetJibuName(data) {
622    return data.ADDR1 + ValueCheck(data.ADDR2) + ValueCheck(data.DONG_NM)
623        + ValueCheck(data.SAN_GB == '0' ? '' : '산') + ValueCheck(data.JIBUN_MAIN_NO) + BuNoCheck(data.JIBUN_SUB_NO) + ValueCheck(data.CITY_BU_NM);
624}
625
626/* 화면에 주소명 표시 기능 끝 */
627
628// 상세주소 사서함 / 우체국 문자 체크
629function validate_saseham(doro, isDetail) {
630
631    if (_useSaseham && (doro.indexOf('사서함') >= 0 || doro.indexOf('우체국') >= 0)) {
632        alertSaseham(isDetail);
633        return false;
634    }
635
636    return true;
637}
638
639function alertSaseham(isDetail) {
640    alert('사서함 및 군부대는 [지번주소로 찾기]를 통해\n사서함 우편번호를 이용해주세요.');
641
642    if (isDetail) {
643        $('#txtAddAddr').focus();
644    }
645}
646
647function SetAddress(obj, addr1, addr2, addr3, addr4, stName, zipSeq, zipcd, simpleDoro, doro, jibun) {
648    if (isDoro)
649        validate_saseham(doro, false);
650
651    var data = $(obj).data('data');
652    selectedAddrItem = data;
653    var tempAddr1 = '';
654
655    // 지번일때 체크
656    if (!isDoro)
657        tempAddr1 = getCityName(data.areaGb);
658
659    if (tempAddr1 != '') {
660        addr1 = tempAddr1;
661    }
662
663    $('#hdPopupZipCD').val(zipcd);
664    $('#hdPopupZipSEQ').val(zipSeq);
665    $('#hdPopupAddr1').val(jibun);
666    $('#hdPopupAddr2').val('');
667    $('#hdPopupAddr3').val(simpleDoro);
668    $('#hdPopupAddr4').val(addr4);
669
670    if (doro != '')
671        $('#txtDetailDoro').val(doro);
672    if (jibun != '')
673        $('#txtDetailJibun').val(jibun);
674
675    if (EventJson != null && EventJson.SetAddress != undefined)
676        EventJson.SetAddress(obj, addr1, addr2, addr3, addr4, stName, zipSeq, zipcd, simpleDoro, doro, jibun, data, EventJson);
677}
678
679function getCityName(code) {
680    var str = '';
681
682    switch (code) {
683        case '01': str = '서울특별시'; break;
684        case '02': str = '부산광역시'; break;
685        case '03': str = '대구광역시'; break;
686        case '04': str = '대전광역시'; break;
687        case '05': str = '인천광역시'; break;
688        case '06': str = '광주광역시'; break;
689        case '07': str = '울산광역시'; break;
690        case '08': str = '경기도'; break;
691        case '09': str = '강원도'; break;
692        case '10': str = '충청북도'; break;
693        case '11': str = '충청남도'; break;
694        case '12': str = '전라북도'; break;
695        case '13': str = '전라남도'; break;
696        case '14': str = '경상북도'; break;
697        case '15': str = '경상남도'; break;
698        case '16': str = '제주특별자치도'; break;
699        case '17': str = '세종특별자치시'; break;
700    }
701    return str;
702}
703
704function jibunSearch() {
705    var addr = $('#txtJibunNm').phVal();
706
707    if (addr.length == 0) {
708        alert('\'동(읍/면/동)\'을 입력해주세요');
709        $("#sch_deliAddr").focus();
710        return false;
711    }
712    else if (addr.length < 2) {
713        alert('\'동(읍/면/동)\'에는 최소 2글자 이상 입력해주세요');
714        $("#sch_deliAddr").focus();
715        return false;
716    }
717
718    var url = _PC_URL + '/24/Address/SearchZipCode?addr=' + escape(addr);
719
720    $.ajax(
721            {
722                url: url,
723                dataType: 'jsonp',
724                contentType: 'application/x-www-form-urlencoded; charset=utf-8',
725                success: function (data, status, xhr) {
726                    var result = '';
727                    $('#ulJibunAddressList').empty();
728
729                    if (data == undefined || data == null || data.length == 0) {
730                        setEmptyJibun();
731                    }
732                    else {
733                        $('#tbAddressList').empty();
734
735                        var ul = getListContainerUlElement();
736                        var containerTR = getListContainerElement();
737
738                        //console.log(data);
739                        if (data.length >= 100) {
740                            //console.log(data);
741                            //showAddressInfo(true);
742                            $('#postSchAlert').css('visibility', 'visible');
743                        }
744
745                        for (var i = 0; i < data.length; i++) {
746                            result = '           <li class="post_li" onclick="SetAddress(this, \'' + data[i].ADDR1 + '\',\'' + data[i].ADDR2 + '\',\'' + data[i].ADDR3 + '\',\'' + DoroDongCityCheck(data[i].DONG_NM, scriptStringCheck(data[i].CITY_BU_NM), false) + '\',\'' + data[i].ST_NM + '\',\'' + data[i].ZIP_SEQ + '\',\'' + data[i].ZIP_CD + '\',\'' + scriptStringCheck(GetSimpleDoroName(data[i])) + '\',\'' + scriptStringCheck(GetFullDoroName(data[i])) + '\', \'' + scriptStringCheck(GetJibuName(data[i])) + '\');">';
747                            result += '           	<span class="item_post_poNum">';
748                            result += '                   ' + data[i].ZIP_CD;
749                            result += '               </span>';
750                            result += '           	<span class="item_post_poAddr">';
751                            result += '           		<em class="poTxtGray">' + GetFullDoroName(data[i]) + '</em><br>';
752                            result += '           		[지번주소] ' + GetJibuName(data[i]) + '';
753                            result += '           	</span>';
754                            result += '           </li>';
755
756                            var li = $(result).data('data', data[i]);
757                            li.appendTo(ul);
758                        }
759
760                        ul.appendTo(containerTR.find('div'));
761                        $('#tbAddressList').empty();
762                        containerTR.appendTo('#tbAddressList');
763                        //                        $('.jibunDetail').css('display', '');
764                        listLiEventSetting();
765                    }
766
767                    //$("#ulJibunAddressList").html(result);
768                    //                    $('.yesDialogPopArea .doro').css('display', 'none');
769                    //                    $("#ulJibunAddressList").css('display', '');
770                    //                    $('.yesDialogPopArea .jibun').css('display', '');
771                    //                    $(this).blockOverlayResize();
772                }
773            });
774}
775
776function getListContainerElement() {
777
778    html = '<tr>';
779    html += '	<td colspan="2" style="padding:0;">';
780    html += '       <div class="ulScrollY" style="width:470px;">';
781    html += '       </div>';
782    html += '   </td>';
783    html += '</tr>';
784
785    return $(html);
786}
787
788function getListContainerUlElement() {
789    return $('<ul id="postNumLi" class="post_l clearfix"></ul>');
790}
791
792function loadAddressLayer(obj, url, afterAction) {
793
794    $.get(url, function (data, textStatus) {
795        popupShowByString(data, obj, afterAction);
796    });
797}
798
799function popupShowByString(data, obj, afterAction) {
800
801    var addressUI = $(data);
802    if (isPaymentSite)
803        addressUI.appendTo('body');
804    else
805        addressUI.appendTo('#wrapperContent');
806
807    addressUI.css('position', 'absolute');
808    addressUI.css('z-index', '9999');
809
810    var targetPosition = $(obj).offset();
811    var targetSize = { Height: $(obj).outerHeight(), Width: $(obj).outerWidth() };
812    var popupSize = { Height: addressUI.find('.plyr_w').height(), Width: addressUI.find('.plyr_w').width() };
813
814    var popupTopPosition = (targetPosition.top + targetSize.Height) + 2;
815
816    addressUI.css('left', (targetPosition.left + (targetSize.Width / 2) - (popupSize.Width / 2)) + 'px');
817    addressUI.css('top', popupTopPosition + 'px');
818
819    if (afterAction != undefined && afterAction != null) {
820        afterAction(data);
821    }
822
823    var windowH = $(window).height();
824    var sY = 0;
825
826    try{
827        sY = scrollY;
828    }
829    catch(e){
830        sY = document.documentElement.scrollTop;
831    }
832
833    var postionH = popupTopPosition - (popupSize.Height / 2);
834    scroll(0, postionH);
835}
836
837function setEmptyJibun() {
838    setEmptyDoro();
839}
840
841function setEmptyDoro() {
842    var html = '<tr>';
843    html += '	<td colspan="2" class="noData">';
844    html += '		<strong class="noData_tit">검색된 주소가 없습니다.</strong>';
845    html += '		<p class="noData_cmt">';
846    html += '			도로명주소가 검색되지 않을 경우<br/>';
847    html += '			새주소 안내시스템 (<a href="http://www.epost.go.kr/search.RetrieveIntegrationNewZipCdList.comm" target="_blank">http://www.epost.go.kr/</a>)을<br/>';
848    html += '			통해 정확한 주소를 확인해 주세요.';
849    html += '		</p>';
850    html += '	</td>';
851    html += '</tr>';
852
853    var tr = $(html);
854    $('#tbAddressList').empty();
855    tr.appendTo('#tbAddressList');
856}
857
858
859// 스크립트 문자 체크
860function scriptStringCheck(str) {
861    var replaceStr = str;
862
863    if (str != undefined && str != '' && typeof (str) == 'string') {
864        replaceStr = replaceAll(replaceStr, '\'', '\\\'');
865        replaceStr = replaceAll(replaceStr, '"', '\\"');
866        replaceStr = replaceAll(replaceStr, '\r', '');
867        replaceStr = replaceAll(replaceStr, '\n', '');
868    }
869
870    return replaceStr;
871}
872
873// 전체 텍스에서 일치하는 데이터 변경
874function replaceAll(inputString, target, replacement) {
875    var regE = new RegExp(target, 'g');
876    var ret = inputString.replace(regE, replacement);
877
878    return ret;
879}
880
881
882function compareKey(event, compareKeycode) {
883    var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
884
885    if (keyCode == compareKeycode)
886        return true;
887    else
888        return false;
889}
890
891function isEnteryKey(e) {
892    return compareKey(e, 13);
893}
894
895function trim(str) {
896    return str.replace(/(^\s*)|(\s*$)/gi, '');
897}
898
899function showAddressInfo(visible) {
900    if (visible) {
901        $('#postSchAlert').css('visibility', 'visible');
902    } else {
903        $('#postSchAlert').css('visibility', 'hidden');
904    }
905}

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.