PageSourceSearch

https://paycar.co.kr/js/common.js?ver=2304171

js paycar.co.kr collected 2026-10-02 01:59:21 UTC 47,016 bytes, 1,461 lines download raw bytes

1// 전역 변수
2var errmsg = "";
3var errfld = null;
4
5// 필드 검사
6function check_field(fld, msg)
7{
8    if ((fld.value = trim(fld.value)) == "")
9        error_field(fld, msg);
10    else
11        clear_field(fld);
12    return;
13}
14
15// 필드 오류 표시
16function error_field(fld, msg)
17{
18    if (msg != "")
19        errmsg += msg + "\n";
20    if (!errfld) errfld = fld;
21    fld.style.background = "#BDDEF7";
22}
23
24// 필드를 깨끗하게
25function clear_field(fld)
26{
27    fld.style.background = "#FFFFFF";
28}
29
30function trim(s)
31{
32    var t = "";
33    var from_pos = to_pos = 0;
34
35    for (i=0; i<s.length; i++)
36    {
37        if (s.charAt(i) == ' ')
38            continue;
39        else
40        {
41            from_pos = i;
42            break;
43        }
44    }
45
46    for (i=s.length; i>=0; i--)
47    {
48        if (s.charAt(i-1) == ' ')
49            continue;
50        else
51        {
52            to_pos = i;
53            break;
54        }
55    }
56
57    t = s.substring(from_pos, to_pos);
58    //				alert(from_pos + ',' + to_pos + ',' + t+'.');
59    return t;
60}
61
62// 자바스크립트로 PHP의 number_format 흉내를 냄
63// 숫자에 , 를 출력
64function number_format(data)
65{
66
67    var tmp = '';
68    var number = '';
69    var cutlen = 3;
70    var comma = ',';
71    var i;
72    
73    data = data + '';
74
75    var sign = data.match(/^[\+\-]/);
76    if(sign) {
77        data = data.replace(/^[\+\-]/, "");
78    }
79
80    len = data.length;
81    mod = (len % cutlen);
82    k = cutlen - mod;
83    for (i=0; i<data.length; i++)
84    {
85        number = number + data.charAt(i);
86
87        if (i < data.length - 1)
88        {
89            k++;
90            if ((k % cutlen) == 0)
91            {
92                number = number + comma;
93                k = 0;
94            }
95        }
96    }
97
98    if(sign != null)
99        number = sign+number;
100
101    return number;
102}
103
104// 새 창
105function popup_window(url, winname, opt)
106{
107    window.open(url, winname, opt);
108}
109
110
111// 폼메일 창
112function popup_formmail(url)
113{
114    opt = 'scrollbars=yes,width=417,height=385,top=10,left=20';
115    popup_window(url, "wformmail", opt);
116}
117
118// , 를 없앤다.
119function no_comma(data)
120{
121    var tmp = '';
122    var comma = ',';
123    var i;
124
125    for (i=0; i<data.length; i++)
126    {
127        if (data.charAt(i) != comma)
128            tmp += data.charAt(i);
129    }
130    return tmp;
131}
132
133// 삭제 검사 확인
134function del(href)
135{
136    if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
137        document.location.href = href;
138    }
139}
140
141// 쿠키 입력
142function set_cookie(name, value, expirehours, domain)
143{
144    var today = new Date();
145    today.setTime(today.getTime() + (60*60*1000*expirehours));
146    document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";";
147    if (domain) {
148        document.cookie += "domain=" + domain + ";";
149    }
150}
151
152// 쿠키 얻음
153function get_cookie(name)
154{
155	var match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
156	if (match) return unescape(match[2]);
157	return "";
158}
159
160// 쿠키 지움
161function delete_cookie(name)
162{
163    var today = new Date();
164
165    today.setTime(today.getTime() - 1);
166    var value = get_cookie(name);
167    if(value != "")
168        document.cookie = name + "=" + value + "; path=/; expires=" + today.toGMTString();
169}
170
171var last_id = null;
172function menu(id)
173{
174    if (id != last_id)
175    {
176        if (last_id != null)
177            document.getElementById(last_id).style.display = "none";
178        document.getElementById(id).style.display = "block";
179        last_id = id;
180    }
181    else
182    {
183        document.getElementById(id).style.display = "none";
184        last_id = null;
185    }
186}
187
188function textarea_decrease(id, row)
189{
190    if (document.getElementById(id).rows - row > 0)
191        document.getElementById(id).rows -= row;
192}
193
194function textarea_original(id, row)
195{
196    document.getElementById(id).rows = row;
197}
198
199function textarea_increase(id, row)
200{
201    document.getElementById(id).rows += row;
202}
203
204// 글숫자 검사
205function check_byte(content, target)
206{
207    var i = 0;
208    var cnt = 0;
209    var ch = '';
210    var cont = document.getElementById(content).value;
211
212    for (i=0; i<cont.length; i++) {
213        ch = cont.charAt(i);
214        if (escape(ch).length > 4) {
215            cnt += 2;
216        } else {
217            cnt += 1;
218        }
219    }
220    // 숫자를 출력
221    document.getElementById(target).innerHTML = cnt;
222
223    return cnt;
224}
225
226// 브라우저에서 오브젝트의 왼쪽 좌표
227function get_left_pos(obj)
228{
229    var parentObj = null;
230    var clientObj = obj;
231    //var left = obj.offsetLeft + document.body.clientLeft;
232    var left = obj.offsetLeft;
233
234    while((parentObj=clientObj.offsetParent) != null)
235    {
236        left = left + parentObj.offsetLeft;
237        clientObj = parentObj;
238    }
239
240    return left;
241}
242
243// 브라우저에서 오브젝트의 상단 좌표
244function get_top_pos(obj)
245{
246    var parentObj = null;
247    var clientObj = obj;
248    //var top = obj.offsetTop + document.body.clientTop;
249    var top = obj.offsetTop;
250
251    while((parentObj=clientObj.offsetParent) != null)
252    {
253        top = top + parentObj.offsetTop;
254        clientObj = parentObj;
255    }
256
257    return top;
258}
259
260function flash_movie(src, ids, width, height, wmode)
261{
262    var wh = "";
263    if (parseInt(width) && parseInt(height))
264        wh = " width='"+width+"' height='"+height+"' ";
265    return "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' "+wh+" id="+ids+"><param name=wmode value="+wmode+"><param name=movie value="+src+"><param name=quality value=high><embed src="+src+" quality=high wmode="+wmode+" type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' "+wh+"></embed></object>";
266}
267
268function obj_movie(src, ids, width, height, autostart)
269{
270    var wh = "";
271    if (parseInt(width) && parseInt(height))
272        wh = " width='"+width+"' height='"+height+"' ";
273    if (!autostart) autostart = false;
274    return "<embed src='"+src+"' "+wh+" autostart='"+autostart+"'></embed>";
275}
276
277function doc_write(cont)
278{
279    document.write(cont);
280}
281
282var win_password_lost = function(href) {
283    window.open(href, "win_password_lost", "left=50, top=50, width=617, height=330, scrollbars=1");
284}
285
286$(document).ready(function(){
287    $("#login_password_lost, #ol_password_lost").click(function(){
288        win_password_lost(this.href);
289        return false;
290    });
291});
292
293/**
294 * 포인트 창
295 **/
296var win_point = function(href) {
297    var new_win = window.open(href, 'win_point', 'left=100,top=100,width=600, height=600, scrollbars=1');
298    new_win.focus();
299}
300
301/**
302 * 쪽지 창
303 **/
304var win_memo = function(href) {
305    var new_win = window.open(href, 'win_memo', 'left=100,top=100,width=620,height=500,scrollbars=1');
306    new_win.focus();
307}
308
309/**
310 * 쪽지 창
311 **/
312var check_goto_new = function(href, event) {
313    if( !(typeof g5_is_mobile != "undefined" && g5_is_mobile) ){
314        if (window.opener && window.opener.document && window.opener.document.getElementById) {
315            event.preventDefault ? event.preventDefault() : (event.returnValue = false);
316            window.open(href);
317            //window.opener.document.location.href = href;
318        }
319    }
320}
321
322/**
323 * 메일 창
324 **/
325var win_email = function(href) {
326    var new_win = window.open(href, 'win_email', 'left=100,top=100,width=600,height=580,scrollbars=1');
327    new_win.focus();
328}
329
330/**
331 * 자기소개 창
332 **/
333var win_profile = function(href) {
334    var new_win = window.open(href, 'win_profile', 'left=100,top=100,width=620,height=510,scrollbars=1');
335    new_win.focus();
336}
337
338/**
339 * 스크랩 창
340 **/
341var win_scrap = function(href) {
342    var new_win = window.open(href, 'win_scrap', 'left=100,top=100,width=600,height=600,scrollbars=1');
343    new_win.focus();
344}
345
346/**
347 * 홈페이지 창
348 **/
349var win_homepage = function(href) {
350    var new_win = window.open(href, 'win_homepage', '');
351    new_win.focus();
352}
353
354/**
355 * 우편번호 창
356 **/
357var win_zip = function(frm_name, frm_zip, frm_addr1, frm_addr2, frm_addr3, frm_jibeon) {
358    if(typeof daum === "undefined"){
359        alert("KAKAO 우편번호 서비스 postcode.v2.js 파일이 로드되지 않았습니다.");
360        return false;
361    }
362
363    // 핀치 줌 현상 제거
364    var vContent = "width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10";
365    $("#meta_viewport").attr("content", vContent + ",user-scalable=no");
366
367    var zip_case = 1;   //0이면 레이어, 1이면 페이지에 끼워 넣기, 2이면 새창
368
369    var complete_fn = function(data){
370        // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
371
372        // 각 주소의 노출 규칙에 따라 주소를 조합한다.
373        // 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
374        var fullAddr = ''; // 최종 주소 변수
375        var extraAddr = ''; // 조합형 주소 변수
376
377        // 사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다.
378        if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우
379            fullAddr = data.roadAddress;
380
381        } else { // 사용자가 지번 주소를 선택했을 경우(J)
382            fullAddr = data.jibunAddress;
383        }
384
385        // 사용자가 선택한 주소가 도로명 타입일때 조합한다.
386        if(data.userSelectedType === 'R'){
387            //법정동명이 있을 경우 추가한다.
388            if(data.bname !== ''){
389                extraAddr += data.bname;
390            }
391            // 건물명이 있을 경우 추가한다.
392            if(data.buildingName !== ''){
393                extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName);
394            }
395            // 조합형주소의 유무에 따라 양쪽에 괄호를 추가하여 최종 주소를 만든다.
396            extraAddr = (extraAddr !== '' ? ' ('+ extraAddr +')' : '');
397        }
398
399        // 우편번호와 주소 정보를 해당 필드에 넣고, 커서를 상세주소 필드로 이동한다.
400        var of = document[frm_name];
401
402        of[frm_zip].value = data.zonecode;
403
404        of[frm_addr1].value = fullAddr;
405        of[frm_addr3].value = extraAddr;
406
407        if(of[frm_jibeon] !== undefined){
408            of[frm_jibeon].value = data.userSelectedType;
409        }
410        
411        setTimeout(function(){
412            $("#meta_viewport").attr("content", vContent);
413            of[frm_addr2].focus();
414        } , 100);
415    };
416
417    switch(zip_case) {
418        case 1 :    //iframe을 이용하여 페이지에 끼워 넣기
419            var daum_pape_id = 'daum_juso_page'+frm_zip,
420                element_wrap = document.getElementById(daum_pape_id),
421                currentScroll = Math.max(document.body.scrollTop, document.documentElement.scrollTop);
422            if (element_wrap == null) {
423                element_wrap = document.createElement("div");
424                element_wrap.setAttribute("id", daum_pape_id);
425                element_wrap.style.cssText = 'display:none;border:1px solid;left:0;width:100%;height:300px;margin:5px 0;position:relative;-webkit-overflow-scrolling:touch;';
426                element_wrap.innerHTML = '<img src="//t1.daumcdn.net/
426postcode/resource/images/close.png" id="btnFoldWrap" style="cursor:pointer;position:absolute;right:0px;top:-21px;z-index:1" class="close_daum_juso" alt="접기 버튼">';
427                jQuery('form[name="'+frm_name+'"]').find('input[name="'+frm_addr1+'"]').before(element_wrap);
428                jQuery("#"+daum_pape_id).off("click", ".close_daum_juso").on("click", ".close_daum_juso", function(e){
429                    e.preventDefault();
430                    $("#meta_viewport").attr("content", vContent);
431                    jQuery(this).parent().hide();
432                });
433            }
434
435            new daum.Postcode({
436                oncomplete: function(data) {
437                    complete_fn(data);
438                    // iframe을 넣은 element를 안보이게 한다.
439                    element_wrap.style.display = 'none';
440                    // 우편번호 찾기 화면이 보이기 이전으로 scroll 위치를 되돌린다.
441                    document.body.scrollTop = currentScroll;
442                },
443                // 우편번호 찾기 화면 크기가 조정되었을때 실행할 코드를 작성하는 부분.
444                // iframe을 넣은 element의 높이값을 조정한다.
445                onresize : function(size) {
446                    element_wrap.style.height = size.height + "px";
447                },
448                maxSuggestItems : g5_is_mobile ? 6 : 10,
449                width : '100%',
450                height : '100%'
451            }).embed(element_wrap);
452
453            // iframe을 넣은 element를 보이게 한다.
454            element_wrap.style.display = 'block';
455            break;
456        case 2 :    //새창으로 띄우기
457            new daum.Postcode({
458                oncomplete: function(data) {
459                    complete_fn(data);
460                }
461            }).open();
462            break;
463        default :   //iframe을 이용하여 레이어 띄우기
464            var rayer_id = 'daum_juso_rayer'+frm_zip,
465                element_layer = document.getElementById(rayer_id);
466            if (element_layer == null) {
467                element_layer = document.createElement("div");
468                element_layer.setAttribute("id", rayer_id);
469                element_layer.style.cssText = 'display:none;border:5px solid;position:fixed;width:300px;height:460px;left:50%;margin-left:-155px;top:50%;margin-top:-235px;overflow:hidden;-webkit-overflow-scrolling:touch;z-index:10000';
470                element_layer.innerHTML = '<img src="//i1.daumcdn.net/localimg/localimages/07/postcode/320/close.png" id="btnCloseLayer" style="cursor:pointer;position:absolute;right:-3px;top:-3px;z-index:1" class="close_daum_juso" alt="닫기 버튼">';
471                document.body.appendChild(element_layer);
472                jQuery("#"+rayer_id).off("click", ".close_daum_juso").on("click", ".close_daum_juso", function(e){
473                    e.preventDefault();
474                    $("#meta_viewport").attr("content", vContent);
475                    jQuery(this).parent().hide();
476                });
477            }
478
479            new daum.Postcode({
480                oncomplete: function(data) {
481                    complete_fn(data);
482                    // iframe을 넣은 element를 안보이게 한다.
483                    element_layer.style.display = 'none';
484                },
485                maxSuggestItems : g5_is_mobile ? 6 : 10,
486                width : '100%',
487                height : '100%'
488            }).embed(element_layer);
489
490            // iframe을 넣은 element를 보이게 한다.
491            element_layer.style.display = 'block';
492    }
493}
494
495/**
496 * 새로운 비밀번호 분실 창 : 101123
497 **/
498win_password_lost = function(href)
499{
500    var new_win = window.open(href, 'win_password_lost', 'width=617, height=330, scrollbars=1');
501    new_win.focus();
502}
503
504/**
505 * 설문조사 결과
506 **/
507var win_poll = function(href) {
508    var new_win = window.open(href, 'win_poll', 'width=616, height=500, scrollbars=1');
509    new_win.focus();
510}
511
512/**
513 * 쿠폰
514 **/
515var win_coupon = function(href) {
516    var new_win = window.open(href, "win_coupon", "left=100,top=100,width=700, height=600, scrollbars=1");
517    new_win.focus();
518}
519
520
521/**
522 * 스크린리더 미사용자를 위한 스크립트 - 지운아빠 2013-04-22
523 * alt 값만 갖는 그래픽 링크에 마우스오버 시 title 값 부여, 마우스아웃 시 title 값 제거
524 **/
525$(function() {
526    $('a img').mouseover(function() {
527        $a_img_title = $(this).attr('alt');
528        $(this).attr('title', $a_img_title);
529    }).mouseout(function() {
530        $(this).attr('title', '');
531    });
532});
533
534/**
535 * 텍스트 리사이즈
536**/
537function font_resize(id, rmv_class, add_class, othis)
538{
539    var $el = $("#"+id);
540
541	if((typeof rmv_class !== "undefined" && rmv_class) || (typeof add_class !== "undefined" && add_class)){
542		$el.removeClass(rmv_class).addClass(add_class);
543
544		set_cookie("ck_font_resize_rmv_class", rmv_class, 1, g5_cookie_domain);
545		set_cookie("ck_font_resize_add_class", add_class, 1, g5_cookie_domain);
546	}
547
548    if(typeof othis !== "undefined"){
549        $(othis).addClass('select').siblings().removeClass('select');
550    }
551}
552
553/**
554 * 댓글 수정 토큰
555**/
556function set_comment_token(f)
557{
558    if(typeof f.token === "undefined")
559        $(f).prepend('<input type="hidden" name="token" value="">');
560
561    $.ajax({
562        url: g5_bbs_url+"/ajax.comment_token.php",
563        type: "GET",
564        dataType: "json",
565        async: false,
566        cache: false,
567        success: function(data, textStatus) {
568            f.token.value = data.token;
569        }
570    });
571}
572
573$(function(){
574    $(".win_point").click(function() {
575        win_point(this.href);
576        return false;
577    });
578
579    $(".win_memo").click(function() {
580        win_memo(this.href);
581        return false;
582    });
583
584    $(".win_email").click(function() {
585        win_email(this.href);
586        return false;
587    });
588
589    $(".win_scrap").click(function() {
590        win_scrap(this.href);
591        return false;
592    });
593
594    $(".win_profile").click(function() {
595        win_profile(this.href);
596        return false;
597    });
598
599    $(".win_homepage").click(function() {
600        win_homepage(this.href);
601        return false;
602    });
603
604    $(".win_password_lost").click(function() {
605        win_password_lost(this.href);
606        return false;
607    });
608
609    /*
610    $(".win_poll").click(function() {
611        win_poll(this.href);
612        return false;
613    });
614    */
615
616    $(".win_coupon").click(function() {
617        win_coupon(this.href);
618        return false;
619    });
620
621    // 사이드뷰
622    var sv_hide = false;
623    $(".sv_member, .sv_guest").click(function() {
624        $(".sv").removeClass("sv_on");
625        $(this).closest(".sv_wrap").find(".sv").addClass("sv_on");
626    });
627
628    $(".sv, .sv_wrap").hover(
629        function() {
630            sv_hide = false;
631        },
632        function() {
633            sv_hide = true;
634        }
635    );
636
637    $(".sv_member, .sv_guest").focusin(function() {
638        sv_hide = false;
639        $(".sv").removeClass("sv_on");
640        $(this).closest(".sv_wrap").find(".sv").addClass("sv_on");
641    });
642
643    $(".sv a").focusin(function() {
644        sv_hide = false;
645    });
646
647    $(".sv a").focusout(function() {
648        sv_hide = true;
649    });
650
651    // 셀렉트 ul
652    var sel_hide = false;
653    $('.sel_btn').click(function() {
654        $('.sel_ul').removeClass('sel_on');
655        $(this).siblings('.sel_ul').addClass('sel_on');
656    });
657
658    $(".sel_wrap").hover(
659        function() {
660            sel_hide = false;
661        },
662        function() {
663            sel_hide = true;
664        }
665    );
666
667    $('.sel_a').focusin(function() {
668        sel_hide = false;
669    });
670
671    $('.sel_a').focusout(function() {
672        sel_hide = true;
673    });
674
675    $(document).click(function() {
676        if(sv_hide) { // 사이드뷰 해제
677            $(".sv").removeClass("sv_on");
678        }
679        if (sel_hide) { // 셀렉트 ul 해제
680            $('.sel_ul').removeClass('sel_on');
681        }
682    });
683
684    $(document).focusin(function() {
685        if(sv_hide) { // 사이드뷰 해제
686            $(".sv").removeClass("sv_on");
687        }
688        if (sel_hide) { // 셀렉트 ul 해제
689            $('.sel_ul').removeClass('sel_on');
690        }
691    });
692
693    $(document).on( "keyup change", "textarea#wr_content[maxlength]", function(){
694        var str = $(this).val();
695        var mx = parseInt($(this).attr("maxlength"));
696        if (str.length > mx) {
697            $(this).val(str.substr(0, mx));
698            return false;
699        }
700    });
701});
702
703function get_write_token(bo_table)
704{
705    var token = "";
706
707    $.ajax({
708        type: "POST",
709        url: g5_bbs_url+"/write_token.php",
710        data: { bo_table: bo_table },
711        cache: false,
712        async: false,
713        dataType: "json",
714        success: function(data) {
715            if(data.error) {
716                alert(data.error);
717                if(data.url)
718                    document.location.href = data.url;
719
720                return false;
721            }
722
723            token = data.token;
724        }
725    });
726
727    return token;
728}
729
730$(function() {
731    $(document).on("click", "form[name=fwrite] input:submit, form[name=fwrite] button:submit, form[name=fwrite] input:image", function() {
732        var f = this.form;
733
734        if (typeof(f.bo_table) == "undefined") {
735            return;
736        }
737
738        var bo_table = f.bo_table.value;
739        var token = get_write_token(bo_table);
740
741        if(!token) {
742            alert("토큰 정보가 올바르지 않습니다.");
743            return false;
744        }
745
746        var $f = $(f);
747
748        if(typeof f.token === "undefined")
749            $f.prepend('<input type="hidden" name="token" value="">');
750
751        $f.find("input[name=token]").val(token);
752
753        return true;
754    });
755});
756
757// 견적요청 스크립트
758
759function addComma(value){
760    value = value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
761    return value; 
762}
763
764$(document).on("click", ".phase input[type='checkbox']", function()
765{
766    var _name = $(this).attr("name");
767    var _target = $("input[name='" + _name + "']");
768    var _opList = "";
769    var _price = _totalPrice = _count = 0;
770
771    $.each(_target, function(index, item)
772    {
773        if($(item).is(":checked") === true)
774        {
775            _price = addComma($(this).data("op-price"));
776            _opList += '<li>';
777            _opList += '<p>' + $(item).data("op-name") + '</p>';
778            _opList += '<span>' + _price + ' 원</span>';
779            _opList += '</li>';
780
781            _count++;
782
783            _totalPrice += parseInt($(this).data("op-price"));
784        }
785    });
786
787    $(".optionList").empty().append(_opList);
788
789    if(_count > 0)
790    {
791        $(".listBox.chkInput.last").addClass("pb15vh");
792        $(".hideOption").addClass("active");
793    }
794    else
795    {
796        $(".listBox.chkInput.last").removeClass("pb15vh");
797        $(".hideOption").removeClass("active");        
798    }
799
800    $(".optionTotal").html(addComma(_totalPrice) + " 원");
801    $(".allTotal").html(addComma(_totalPrice + 123123123) + " 원");
802});
803
804$(document).on("click", ".expectWrap h4", function()
805{
806    $(".totalWrap").toggleClass("active");
807    $(".listBox.chkInput.last").toggleClass("pb55vh");
808});
809
810$(document).on("click", ".commentWrap dt", function()
811{
812    var _target = $(this).parent(".comment");
813    _target.children("dd").toggleClass("active");
814});
815
816// active 공통 사용을 위한 function
817$(document).on("click", "[data-active]", function(e)
818{
819    e.stopPropagation();
820
821    var $_trigger = $(this);
822    var $_parent = $_trigger.closest("[data-active='parent']");
823    var $_target = $_parent.find("[data-active='target']");
824    var $_arrow = $_parent.find("[data-active='arrow']");
825
826    if($_arrow)
827    {
828        $_arrow.toggleClass("arrow-spin");
829    }
830    
831    $_target.toggleClass("active");
832});
833
834function stage_ajax(f)
835{
836    $.ajax({
837        url : g5_url + "/ajax/stage.ajax.php",
838        cache : false,
839        type : 'post',
840        data : {
841            'form' : f
842        },
843        success : function(data)
844        {
845            // console.log(data);
846            if(data === '1')
847            {
848                $("#stageForm").submit();
849            }
850        },
851        error : function(request, status, error)
852        {
853            console.log("request : " + request + " <br />status : " + status + " <br />error : " + error);
854        }
855    });
856}
857
858$(document).on("click", "#header #slideBtn", function(e)
859{
860    e.preventDefault();
861    $("#slideMenu, #slideBg").addClass("active");
862});
863
864$(document).on("click", "#slideMenu .info .close-anchor", function(e)
865{
866    e.preventDefault();
867    $("#slideMenu, #slideBg").removeClass("active");
868});
869
870visual = {
871    'init' : function() {
872        this.action();
873    },
874    'action' : function() {
875        var $ele = {
876            'main' : $('.mainSlide .roll'),
877            'menu' : $('#slideMenu .banner .roll'),
878            'chart' : $('.mainChart .roll'),
879            'ranking' : $('.mainRanking .roll'),
880            'mypage' : $('.mypageSlide .roll'),
881            'event' : $('.eventVisual .roll'),
882            'montly_rental' : $(".slideWrap .slide-common .roll"),
883            'sibling' : $(".slideWrap .sibling .roll"),
884        }
885
886        var rolling = function() {
887            $ele.main.slick({
888                'initialSlide': 0,        // 초기 슬라이드
889                'dots': true,            // 현재 슬라이드 표시 점
890                'fade': false,            // 페이드 활성화
891                'infinite': true,         // 무한 루핑
892                'slidesToShow': 1,        // 한번에 표시할 슬라이드 수
893                'slidesToScroll': 1,      // 한번에 스크롤할 슬라이드 수
894                'arrows': false,          // 화살표 표기
895                'swipe': true,           // 터치 슬라이드
896                // 'speed': 3000,            // 전환 속도 1000 = 1초
897                'autoplay': true,        // 슬라이드 자동 전환
898                'autoplaySpeed': 3000,    // 자동 전환 속도 1000 = 1초
899                'centerMode': false,      // 중앙 보기 활성화. 홀수 번호의 SlidesToShow 개수와 함께 사용
900                'centerPadding': 0,       // 중앙 보기 일 때, 측면 패딩 값
901                // 'cssEase': 'ease',        // css 모션 함수
902                'zIndex' : 80,
903                'customPaging' : function(slider,i){
904                    $('#mainDot #totalDot').text("/ " + slider.slideCount);
905				},
906                'focusOnSelect': false,   // click 선택 요소에 포커스 활성화
907                // 반응형 일 때 사용
908                // 'responsive': [{
909                //     'breakpoint': 1400,
910                //     'settings': {
911                //         'slidesToShow': 3,
912                //         'infinite': true
913                //     }
914                // }]
915            });
916
917            $ele.menu.slick({
918                'initialSlide': 0,        // 초기 슬라이드
919                'dots': false,            // 현재 슬라이드 표시 점
920                'fade': false,            // 페이드 활성화
921                'infinite': true,         // 무한 루핑
922                'slidesToShow': 1,        // 한번에 표시할 슬라이드 수
923                'slidesToScroll': 1,      // 한번에 스크롤할 슬라이드 수
924                'arrows': false,          // 화살표 표기
925                'swipe': true,           // 터치 슬라이드
926                // 'speed': 3000,            // 전환 속도 1000 = 1초
927                'autoplay': true,        // 슬라이드 자동 전환
928                'autoplaySpeed': 3000,    // 자동 전환 속도 1000 = 1초
929                'centerMode': false,      // 중앙 보기 활성화. 홀수 번호의 SlidesToShow 개수와 함께 사용
930                'centerPadding': 0,       // 중앙 보기 일 때, 측면 패딩 값
931                // 'cssEase': 'ease',        // css 모션 함수
932                'zIndex' : 80,
933                'focusOnSelect': false,   // click 선택 요소에 포커스 활성화
934                // 반응형 일 때 사용
935                // 'responsive': [{
936                //     'breakpoint': 1400,
937                //     'settings': {
938                //         'slidesToShow': 3,
939                //         'infinite': true
940                //     }
941                // }]
942            });
943
944            $ele.chart.slick({
945                'vertical': true,         // 슬라이드를 수직 방향으로 넘긴다.
946                'initialSlide': 0,        // 초기 슬라이드
947                'dots': false,            // 현재 슬라이드 표시 점
948                'fade': false,            // 페이드 활성화
949                'infinite': true,         // 무한 루핑
950                'slidesToShow': 1,        // 한번에 표시할 슬라이드 수
951                'slidesToScroll': 1,      // 한번에 스크롤할 슬라이드 수
952                'arrows': false,          // 화살표 표기
953                'swipe': true,           // 터치 슬라이드
954                // 'speed': 3000,            // 전환 속도 1000 = 1초
955                'autoplay': true,        // 슬라이드 자동 전환
956                'autoplaySpeed': 3000,    // 자동 전환 속도 1000 = 1초
957                'centerMode': false,      // 중앙 보기 활성화. 홀수 번호의 SlidesToShow 개수와 함께 사용
958                'centerPadding': 0,       // 중앙 보기 일 때, 측면 패딩 값
959                // 'cssEase': 'ease',        // css 모션 함수
960                'zIndex' : 80,
961                'focusOnSelect': false,   // click 선택 요소에 포커스 활성화
962                // 반응형 일 때 사용
963                // 'responsive': [{
964                //     'breakpoint': 1400,
965                //     'settings': {
966                //         'slidesToShow': 3,
967                //         'infinite': true
968                //     }
969                // }]
970            });
971
972            $ele.ranking.slick({
973                'vertical': false,         // 슬라이드를 수직 방향으로 넘긴다.
974                'initialSlide': 0,        // 초기 슬라이드
975                'dots': false,            // 현재 슬라이드 표시 점
976                'fade': false,            // 페이드 활성화
977                'infinite': true,         // 무한 루핑
978                'slidesToShow': 3,        // 한번에 표시할 슬라이드 수
979                'slidesToScroll': 1,      // 한번에 스크롤할 슬라이드 수
980                'arrows': false,          // 화살표 표기
981                'swipe': true,           // 터치 슬라이드
982                // 'speed': 3000,            // 전환 속도 1000 = 1초
983                'autoplay': true,        // 슬라이드 자동 전환
984                'autoplaySpeed': 3000,    // 자동 전환 속도 1000 = 1초
985                'centerMode': false,      // 중앙 보기 활성화. 홀수 번호의 SlidesToShow 개수와 함께 사용
986                'centerPadding': 0,       // 중앙 보기 일 때, 측면 패딩 값
987                // 'cssEase': 'ease',        // css 모션 함수
988                'zIndex' : 80,
989                'focusOnSelect': false,   // click 선택 요소에 포커스 활성화
990                // 반응형 일 때 사용
991                // 'responsive': [{
992                //     'breakpoint': 1400,
993                //     'settings': {
994                //         'slidesToShow': 3,
995                //         'infinite': true
996                //     }
997                // }]
998            });
999
1000            $ele.mypage.slick({
1001                'initialSlide': 0,        // 초기 슬라이드
1002                'dots': false,            // 현재 슬라이드 표시 점
1003                'fade': false,            // 페이드 활성화
1004                'infinite': true,         // 무한 루핑
1005                'slidesToShow': 1,        // 한번에 표시할 슬라이드 수
1006                'slidesToScroll': 1,      // 한번에 스크롤할 슬라이드 수
1007                'arrows': false,          // 화살표 표기
1008                'swipe': true,           // 터치 슬라이드
1009                // 'speed': 3000,            // 전환 속도 1000 = 1초
1010                'autoplay': true,        // 슬라이드 자동 전환
1011                'autoplaySpeed': 3000,    // 자동 전환 속도 1000 = 1초
1012                'centerMode': false,      // 중앙 보기 활성화. 홀수 번호의 SlidesToShow 개수와 함께 사용
1013                'centerPadding': 0,       // 중앙 보기 일 때, 측면 패딩 값
1014                // 'cssEase': 'ease',        // css 모션 함수
1015                'zIndex' : 80,
1016                // 'customPaging' : function(slider,i){
1017                //     $('#mainDot #totalDot').text("/ " + slider.slideCount);
1018				// },
1019                'focusOnSelect': false,   // click 선택 요소에 포커스 활성화
1020                // 반응형 일 때 사용
1021                // 'responsive': [{
1022                //     'breakpoint': 1400,
1023                //     'settings': {
1024                //         'slidesToShow': 3,
1025                //         'infinite': true
1026                //     }
1027                // }]
1028            });
1029
1030            $ele.event.slick({
1031                'initialSlide': 0,        // 초기 슬라이드
1032                'dots': false,            // 현재 슬라이드 표시 점
1033                'fade': false,            // 페이드 활성화
1034                'infinite': true,         // 무한 루핑
1035                'slidesToShow': 1,        // 한번에 표시할 슬라이드 수
1036                'slidesToScroll': 1,      // 한번에 스크롤할 슬라이드 수
1037                'arrows': false,          // 화살표 표기
1038                'swipe': true,           // 터치 슬라이드
1039                // 'speed': 3000,            // 전환 속도 1000 = 1초
1040                'autoplay': true,        // 슬라이드 자동 전환
1041                'autoplaySpeed': 3000,    // 자동 전환 속도 1000 = 1초
1042                'centerMode': false,      // 중앙 보기 활성화. 홀수 번호의 SlidesToShow 개수와 함께 사용
1043                'centerPadding': 0,       // 중앙 보기 일 때, 측면 패딩 값
1044                // 'cssEase': 'ease',        // css 모션 함수
1045                'zIndex' : 80,
1046                'focusOnSelect': false,   // click 선택 요소에 포커스 활성화
1047                // 반응형 일 때 사용
1048                // 'responsive': [{
1049                //     'breakpoint': 1400,
1050                //     'settings': {
1051                //         'slidesToShow': 3,
1052                //         'infinite': true
1053                //     }
1054                // }]
1055            });
1056
1057            $ele.montly_rental.slick({
1058                'initialSlide': 0,        // 초기 슬라이드
1059                'dots': true,            // 현재 슬라이드 표시 점
1060                'appendDots' : $(".slideWrap .navWrap"),
1061                'customPaging' : function (slider, i) {
1062                    var thumb = $(slider.$slides[i]).data();
1063                    if (i == '0') {
1064                      i = "<span></span><p>견적요청</p>";
1065                    } else if (i == '1') {
1066                      i = "<span></span>
1066<p>댓글 확인</p>";
1067                    } else if (i == '2') {
1068                      i = "<span></span><p>페이카 신청</p>";
1069                    } else if (i == '3') {
1070                      i = "<span></span><p>신청현황</p>";
1071                    }
1072                    return i;
1073                },
1074                'fade': false,            // 페이드 활성화
1075                'infinite': true,         // 무한 루핑
1076                'slidesToShow': 1,        // 한번에 표시할 슬라이드 수
1077                'slidesToScroll': 1,      // 한번에 스크롤할 슬라이드 수
1078                'arrows': false,          // 화살표 표기
1079                'swipe': true,           // 터치 슬라이드
1080                // 'speed': 3000,            // 전환 속도 1000 = 1초
1081                'autoplay': true,        // 슬라이드 자동 전환
1082                'autoplaySpeed': 5000,    // 자동 전환 속도 1000 = 1초
1083                'centerMode': false,      // 중앙 보기 활성화. 홀수 번호의 SlidesToShow 개수와 함께 사용
1084                'centerPadding': 0,       // 중앙 보기 일 때, 측면 패딩 값
1085                'asNavFor' : '.sibling .roll',
1086                // 'cssEase': 'ease',        // css 모션 함수
1087                'zIndex' : 80,
1088                'focusOnSelect': false,   // click 선택 요소에 포커스 활성화
1089                // 반응형 일 때 사용
1090                // 'responsive': [{
1091                //     'breakpoint': 1400,
1092                //     'settings': {
1093                //         'slidesToShow': 3,
1094                //         'infinite': true
1095                //     }
1096                // }]
1097            });
1098
1099            $ele.sibling.slick({
1100                'initialSlide': 0,        // 초기 슬라이드
1101                'dots': false,            // 현재 슬라이드 표시 점
1102                'fade': false,            // 페이드 활성화
1103                'infinite': true,         // 무한 루핑
1104                'slidesToShow': 1,        // 한번에 표시할 슬라이드 수
1105                'slidesToScroll': 1,      // 한번에 스크롤할 슬라이드 수
1106                'arrows': false,          // 화살표 표기
1107                'swipe': true,           // 터치 슬라이드
1108                // 'speed': 3000,            // 전환 속도 1000 = 1초
1109                'autoplay': true,        // 슬라이드 자동 전환
1110                'autoplaySpeed': 3000,    // 자동 전환 속도 1000 = 1초
1111                'centerMode': false,      // 중앙 보기 활성화. 홀수 번호의 SlidesToShow 개수와 함께 사용
1112                'centerPadding': 0,       // 중앙 보기 일 때, 측면 패딩 값
1113                // 'cssEase': 'ease',        // css 모션 함수
1114                'asNavFor' : '.slide-common .roll',
1115                'zIndex' : 80,
1116                'focusOnSelect': false,   // click 선택 요소에 포커스 활성화
1117                // 반응형 일 때 사용
1118                // 'responsive': [{
1119                //     'breakpoint': 1400,
1120                //     'settings': {
1121                //         'slidesToShow': 3,
1122                //         'infinite': true
1123                //     }
1124                // }]
1125            });
1126
1127            $ele.main.on('afterChange', function(event, slick, currentSlide, nextSlide) {
1128                var idx = currentSlide + 1;
1129
1130                $('.mainSlide #mainDot #nowDot').text(idx);
1131            });
1132        }
1133
1134        rolling();
1135    }
1136}
1137
1138ajaxpop = {
1139	'init' : function(){
1140		this.action();
1141	},
1142	'action' : function(){
1143		var $ele = {
1144			'btn' : $('*[data-ajaxpop]'),
1145			'pop' : $('<div id="rgpopup"></div>'),
1146			'bg' : $('<div id="popupBG"></div>')
1147		}
1148        //open
1149		$ele.btn.on({
1150			'click' : function(e){
1151				e.preventDefault();
1152                var src = $(this).data('ajaxpop');
1153				$('body')
1154                .append($ele.bg)
1155                .append($ele.pop);
1156                $('#rgpopup').load(src,function(){
1157                    $('#rgpopup').addClass('on');
1158                    $('#popupBG').addClass('on');
1159                });
1160			}
1161		});
1162        
1163        //close
1164        $(document).on('click','#rgpopup .anchor-close, #popupBG',function(e){
1165            e.preventDefault();
1166            $('#rgpopup').removeClass('on').remove();
1167            $('#popupBG').removeClass('on').remove();
1168        })
1169
1170	}
1171}
1172
1173$(function(){
1174    ajaxpop.init();
1175})
1176
1177
1178
1179function checkEmail()
1180{
1181    var regexp = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
1182    let _parent = $("#email"),
1183        _input = $("#reg_mb_id");
1184
1185    if(!regexp.test(_input.val()))
1186    {
1187        _parent.find(".notify-fail").html("이메일 형식에 맞ê²
1187Œ 입력해주세요.");
1188        _parent.find(".notify-fail").addClass("active");
1189
1190        return false;
1191    }
1192    else
1193    {
1194        if(ajaxCall("email", _input.val()) == "ok")
1195        {
1196            _input.addClass("readonly");
1197            _parent.find(".notify-fail").removeClass("active");
1198
1199            return true;
1200        }
1201        else
1202        {
1203            _parent.find(".notify-fail").html("중복된 아이디 입니다.");
1204            _parent.find(".notify-fail").addClass("active");
1205
1206            return false;
1207        }
1208    }
1209}
1210
1211function checkPassword()
1212{
1213    let pwd1 = $("input[name='mb_password']"),
1214        pwd2 = $("input[name='mb_password_re']");
1215
1216    if(!/^[a-zA-Z0-9!@#$%^&*()?_~]{8,20}$/.test(pwd1.val()))
1217    {
1218        $("#password .first .notify").removeClass("active");
1219        $("#password .first .notify-fail").addClass("active");
1220        return false;
1221    }
1222    else if(!/^[a-zA-Z0-9!@#$%^&*()?_~]{8,20}$/.test(pwd2.val()))
1223    {
1224        $("#password .second .notify").removeClass("active");
1225        $("#password .second .notify-fail").html("8~20자의 영문, 숫자, 특수문자를 두가지 이상 조합해 주세요.");
1226        $("#password .second .notify-fail").addClass("active");
1227        return false;
1228    }
1229    else if(pwd1.val() != pwd2.val())
1230    {
1231        $("#password .second").find(".notify-fail").html("비밀번호가 다릅니다.");
1232        $("#password .second").find(".notify-fail").addClass("active");
1233        return false;
1234    }
1235
1236    var chk = 0;
1237    if(pwd1.val().search(/[0-9]/g) != -1) chk ++;
1238	if(pwd1.val().search(/[a-z]/ig) != -1) chk ++;
1239	if(pwd1.val().search(/[!@#$%^&*()?_~]/g) != -1) chk ++;
1240
1241    var chk2 = 0;
1242    if(pwd2.val().search(/[0-9]/g) != -1) chk2++;
1243	if(pwd2.val().search(/[a-z]/ig) != -1) chk2++;
1244	if(pwd2.val().search(/[!@#$%^&*()?_~]/g) != -1) chk2++;
1245
1246	if(chk < 2)
1247    { 
1248		$("#password .first .notify").removeClass("active");
1249        $("#password .first .notify-fail").html("8~20자의 영문, 숫자, 특수문자를 두가지 이상 조합해 주세요.");
1250        $("#password .first .notify-fail").addClass("active");
1251
1252        return false;
1253	}
1254	else if(chk2 < 2)
1255    { 
1256		$("#password .second .notify").removeClass("active");
1257        $("#password .second .notify-fail").html("8~20자의 영문, 숫자, 특수문자를 두가지 이상 조합해 주세요.");
1258        $("#password .second .notify-fail").addClass("active");
1259
1260        return false;
1261	}
1262    else if(pwd1.val() == pwd2.val())
1263    {
1264        $("#password .first, #password .second").find(".notify-fail").removeClass("active");
1265        $("input[name='mb_password'], input[name='mb_password_re']").addClass("readonly");
1266        return true;
1267    }
1268}
1269
1270function checkName()
1271{
1272    var regexp = /^[가-힣]+$/; //한글
1273    let name = $("input[name='mb_name']");
1274    
1275    if(!regexp.test(name.val()))
1276    {
1277        $("#name .notify-fail").html("이름은 한글로 입력해주세요.");
1278        $("#name .notify-fail").addClass("active");
1279
1280        return false;
1281    }
1282    else
1283    {
1284        $("#name .notify-fail").removeClass("active");
1285        name.addClass("readonly");
1286
1287        return true;
1288    }
1289}
1290
1291function checkNickname()
1292{
1293    var regexp = /^[가-힣a-zA-Z0-9]+$/; //한글+영문+숫자
1294    let nick = $("input[name='mb_nick']");
1295    
1296    if(!regexp.test(nick.val()))
1297    {
1298        $("#nick .notify-fail").html("한글, 영문, 숫자 조합만 사용 가능합니다.");
1299        $("#nick .notify-fail").addClass("active");
1300
1301        return false;
1302    }
1303    else
1304    {
1305        if(ajaxCall("nick", nick.val()) == "ok")
1306        {
1307            nick.addClass("readonly");
1308            $("#nick .notify-fail").removeClass("active");
1309
1310            return true;
1311        }
1312        else
1313        {
1314            $("#nick .notify-fail").html("중복된 닉네임 입니다.");
1315            $("#nick .notify-fail").addClass("active");
1316
1317            return false;
1318        }
1319    }
1320}
1321
1322function checkBirth()
1323{
1324    var regexp = /^[0-9]+$/; //숫자
1325    let birth = $("input[name='birth']"),
1326        gender = $("input[name='gender']");
1327    
1328    if(!regexp.test(birth.val()) || !regexp.test(gender.val()))
1329    {
1330        $("#idnum .notify-fail").html("숫자만 입력해주세요.");
1331        $("#idnum .notify-fail").addClass("active");
1332        return false;
1333    }
1334    else
1335    {
1336        birth.addClass("readonly");
1337        gender.addClass("readonly");
1338        $("#idnum .notify-fail").removeClass("active");
1339
1340        return true;
1341    }
1342}
1343
1344function checkPhone()
1345{
1346    var regexp = /^[가-힣a-zA-Z0-9]+$/; //한글+영문+숫자
1347    let hp = $("input[name='mb_hp']"),
1348        confirmNum = $("#confirmNum"),
1349        confirm = $("#SMSconfirm").val();
1350
1351    if(hp.val() == "")
1352    {
1353        $("#phone .first .notify-fail").html("휴대폰 번호를 입력해주세요.");
1354        $("#phone .first .notify-fail").addClass("active");
1355    }
1356    else if(!regexp.test(hp.val()))
1357    {
1358        $("#phone .first .notify-fail").html("숫자만 입력해주세요.");
1359        $("#phone .first .notify-fail").addClass("active");
1360
1361        return false;
1362    }
1363    else if(confirmNum.val() == "")
1364    {
1365        $("#phone .second .notify-fail").html("인증번호를 입력해주세요.");
1366        $("#phone .second .notify-fail").addClass("active");
1367    }
1368    else if(!regexp.test(confirmNum.val()))
1369    {
1370        $("#phone .second .notify-fail").html("숫자만 입력해주세요.");
1371        $("#phone .second .notify-fail").addClass("active");
1372        
1373        return false;
1374    }
1375    else if(confirm == 0)
1376    {
1377        $("#phone .first .notify-fail").html("휴대폰을 인증해주세요.");
1378        $("#phone .first .notify-fail").addClass("active");
1379
1380        return false;
1381    }
1382    else if(confirm == 1)
1383    {
1384        if(ajaxCall("phone", confirmNum.val(), hp.val()) == "fail")
1385        {
1386            $("#phone .second .notify-fail").html("인증번호가 다릅니다.");
1387            $("#phone .second .notify-fail").addClass("active");
1388
1389            return false;
1390        }
1391        else if(ajaxCall("phone", confirmNum.val(), hp.val()) == "ok")
1392        {
1393            $("#reg_mb_hp, #confirmNum").addClass("readonly");
1394            $("#phone .second .notify-fail").removeClass("active");
1395
1396            $("#fregisterform").submit();
1397
1398            return true;
1399        }
1400    }
1401}
1402
1403function checkCompany()
1404{
1405    if($("#reg_mb_grade").val() == "")
1406    {
1407        $("#company .wrap .ipnWrap:eq(0) .notify-fail").addClass("active");
1408        return false;
1409    }
1410    else
1411    {
1412        $("#company .wrap .ipnWrap:eq(0) .notify-fail").removeClass("active");
1413    }
1414
1415    if($("#reg_mb_brand").val() == "")
1416    {
1417        $("#company .wrap .ipnWrap:eq(1) .notify-fail").addClass("active");
1418        return false;
1419    }
1420    else
1421    {
1422        $("#company .wrap .ipnWrap:eq(1) .notify-fail").removeClass("active");
1423    }
1424
1425    $(".basic_grade, .basic_brand").addClass("readonly");
1426
1427    return true;
1428}
1429
1430function PMT(i, n, p) {
1431    return i * -p * Math.pow((1 + i), n) / (1 - Math.pow((1 + i), n));
1432}
1433
1434function activeSwitch($this, $parent, $target)
1435{
1436    var toggleTarget = $($this).closest("." + $parent).find("." + $target);
1437
1438    $($this).toggleClass("active");
1439
1440    toggleTarget.toggleClass("active");
1441}
1442
1443
1444// 광고 클릭 insert
1445function insertAD(insertType, Position, Target)
1446{
1447    $.ajax({
1448        url: g5_url+"/ajax/clickAD.ajax.php",
1449        type: "GET",
1450        data : {
1451            'insertType' : insertType,
1452            'Position' : Position,
1453            'Target' : Target
1454        },
1455        async: false,
1456        cache: false,
1457        success: function(data) {
1458            console.log(data);
1459        }
1460    });
1461}

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.