PageSourceSearch

https://m.thankqcamping.com/js/m_com.js?version=20261001-1

js thankqcamping.com collected 2026-10-01 15:27:14 UTC 45,995 bytes, 1,597 lines download raw bytes

1
2function go_main() {
3		let grandParent = opener?.opener;
4    let parent = opener;
5    if (grandParent) {
6        grandParent.location.href = "/main.hbb";
7        try { parent.close(); } catch (e) {} // 부모창 닫기 시도
8        self.close();
9    } else if (parent) {
10        parent.location.href = "/main.hbb";
11        self.close();
12    } else {
13        location.href = "/main.hbb";
14    }
15}
16
17//히든값 체크
18function ckItemHid(frm,txt) {	
19	if (frm.value == '') {
20		alert(txt)
21		return false
22	}	
23}
24
25//텍스트 체크
26function ckItemTxt(frm,txt) {	
27	if (frm.value == '') {
28		alert(txt)
29		frm.focus()
30		return false
31	}	
32}
33
34//셀렉트 체크
35function ckItemSel(frm,txt) {	
36	if (frm.value == '') {
37		alert(txt)
38		frm.focus()
39		return false;
40	}	
41}
42
43//URL 숨기기
44function hideURLbar() {
45	window.scrollTo(0, 1);
46}
47
48// 포스트
49function goPost(frm,url) {
50	frm.method = "post";
51	frm.action = url;
52	frm.target = "_self"
53	frm.submit();
54}
55
56// 포스트
57function goGet(frm,url) {
58	frm.method = "get";
59	frm.action = url;
60	frm.target = "_self"
61	frm.submit();
62}
63
64//포탈 검색
65function goPortal(purl,id) {
66	alert(purl)
67}
68
69//넘버 체크
70function ck_number() {
71	if ((event.keyCode<48)||(event.keyCode>57)) {
72		event.returnValue=false;
73		}
74	}
75
76//넘버
77function CheckNumber(fl) {
78
79	t = fl.value ;
80	for(i=0;i<t.length;i++) 
81	if (t.charAt(i)<'0' || t.charAt(i)>'9') {
82		alert("숫자만 입력해주세요.") ;
83		fl.value="0";
84		if (fl.disabled == false) {
85			fl.focus() ;
86			}
87		return false ;
88		}
89	}
90	
91//넘버
92function CheckNumber_(fl) {
93
94	t = fl.value ;
95	for(i=0;i<t.length;i++) 
96	if (t.charAt(i)<'0' || t.charAt(i)>'9' || t.charAt(i)!='-') {
97		alert("숫자와 - 만 입력해주세요.") ;
98		fl.value="0";
99		if (fl.disabled == false) {
100			fl.focus() ;
101			}
102		return false ;
103		}
104	}
105	
106//컴마처리
107function Comma(tmp_num) { 
108
109	var Num = tmp_num.value.replace(/,/g,"")
110	
111	tmp_num.value = tmp_num.value.replace(/,/g,"")
112	if ( CheckNumber(tmp_num) == false ) {
113		return false;
114		}
115		
116	Num = (Num+"")
117		
118	var commaFlag = Num.length%3
119	if(commaFlag) {
120		var out = Num.substring(0, commaFlag) 
121		if (Num.length > 3) out += ","
122		}
123	else var out = ""
124
125	for (var i=commaFlag; i < Num.length; i+=3) {
126		out += Num.substring(i, i+3) 
127		if( i < Num.length-3) out += ","
128		}
129	tmp_num.value = out;	
130	}
131
132//컴마처리(입력)
133function CommaSpn(Num) { 
134	Num = Num.toString();		
135	var commaFlag = Num.length%3
136
137	if(commaFlag) {
138		var out = Num.substring(0, commaFlag) 
139		if (Num.length > 3) out += ","
140		}
141	else var out = ""
142
143	for (var i=commaFlag; i < Num.length; i+=3) {
144		out += Num.substring(i, i+3) 
145		if( i < Num.length-3) out += ","
146		}
147	
148	return out;	
149}
150
151//컴마넣기
152function CommaIns(tmp_num) {
153  var out = "";
154  cnt = 0;
155  tmp_num = tmp_num+""
156  i = tmp_num.length;
157  if(tmp_num.length > 0) {
158     while(i > 0) {
159        if(tmp_num.substr((i-1),1) != ",") {
160           if(cnt == 3) {
161              out = "," + out;
162              cnt = 0;
163           } else {
164              out = tmp_num.substr((i-1),1) + out;
165              cnt++;
166              i--;
167           }
168        } else {
169           i--;
170        }
171     }
172  }
173  return out;
174}
175
176// 아이프레임 창조절
177function frmReSize(ifrm){
178	var objBody = eval(ifrm).document.body;
179	var objFrame = document.getElementById(ifrm);
180	objFrame.style.height = 40
181	objFrame.style.width = 100
182		objFrame.style.height = objFrame.contentWindow.document.body.scrollHeight;
183	objFrame.style.width = objBody.scrollWidth + (objBody.offsetWidth - objBody.clientWidth)
184}	
185
186//오름(내림)
187function serFilAp(tmp_item) {
188	var frm = document.form;
189	frm.ser_item.value = tmp_item
190	frm.page_num.value = 1
191	frm.target = "_self"
192	frm.submit();	
193}	
194
195//이미지 파일여부 확인
196function chkImgExt(img) {
197	var img_Format = "\.(bmp|gif|jpg|jpeg|png)$"
198	if((new RegExp(img_Format,"i")).test(img)) {
199		return true
200	} else {
201		alert("이미지 파일만 첨부하실 수 있습니다. (bmp|gif|jpg|jpeg|png)")
202		return false
203	}
204}
205
206// 이미지 등록 적용
207function SetImage(filetype,filepath,fileurl,strname,strext,filesize,imgw,imgh,imgalign,key) {
208	var frm = document.form
209  var obj = frm.filelist;
210	// 파일리스트에 파일목록 표시
211	text = strname+"."+strext+ " [" + parseInt(parseInt(filesize)/1024) + "KB]"
212	value = filetype+"^"+filepath+"^"+fileurl+"^"+strname+"^"+strext+"^"+filesize+"^"+imgw+"^"+imgh+"^"+imgalign+"^"+key;
213	obj[obj.length] = new Option(text, value);
214	// 총 파일용량계산
215	var attachAllrealsize = frm.attachAllrealsize.value;
216	attachAllrealsize = parseInt(attachAllrealsize) + parseInt(filesize);
217	frm.attachAllrealsize.value = attachAllrealsize;
218}
219
220//글자수 자르기
221function strCut(str,maxlen) {
222	var msglen = maxlen
223	tmpstr = ""
224	txtlen = str.length
225	if(txtlen>0) {
226		for(k=0;k<txtlen;k++) {
227			temp = str.charAt(k)
228			if(escape(temp).length > 4) {
229				msglen-=2
230			} else {
231				msglen--
232			}
233			if(msglen<=0) break;
234			if(k<txtlen) tmpstr = ".."
235		}
236		return str.substr(0,k) + tmpstr
237	}
238}
239//SNS 연동
240function goSns(stp,id) {
241	var actUrl = ""
242	var entryUrl = document.getElementById("DivSnsUrl"+id).innerHTML
243	var entryTitle = document.getElementById("DivSnsTit"+id).innerHTML
244	var entryTitle1 = document.getElementById("DivSnsTit"+id).innerHTML
245	var entryDesc = document.getElementById("DivSnsDesc"+id).innerHTML
246	var entryImg	= document.getElementById("DivSnsImg"+id).innerHTML
247
248	switch(stp) {
249		case "0" : //twitter
250			actUrl = "http://twitter.com/share?url="+entryUrl+"&text="+encodeURL(entryTitle);
251			break;
252		case "1" : //facebook
253			actUrl = "http://www.facebook.com/sharer.php?u="+entryUrl+"&t="+encodeURL(entryTitle)+"&src=sp";
254			break;
255		case "2" : //me2day
256			actUrl = "http://me2day.net/posts/new?new_post[body]=\""+encodeURL(entryTitle)+"\":"+entryUrl;
257			break;
258		case "3" : //yozm
259			actUrl = "http://yozm.daum.net/api/popup/prePost?prefix="+encodeURL(entryTitle)+"&link="+entryUrl;
260			break;
261		case "4" : //cyworld
262			actUrl = "http://csp.cyworld.com/bi/bi_recommend_pop.php?url="+entryUrl+"&title="+encodeURL(entryTitle);
263			break;
264		case "5" : //kakao			
265			kakao.link("talk").send({        
266				msg : entryTitle1 +' '+ entryDesc,        
267				url : entryUrl,				
268				appid : "mtest.camperstory.com",        
269				appver : "2.0",        
270				appname : "캠퍼스토리",        
271				type : "link"    
272			});
273			
274			
275			break;
276		case "6" : //kakao story			
277				var popupStyle = ""                                    
278				var opSNS = window.open('/inc/inc_kakaos.hbb?entryUrl='+entryUrl+'&entryTitle='+entryTitle+'&entryDesc='+entryDesc+'&entryImg='+entryImg,'csSns',popupStyle);//	kakao.link("story").send({           
279				opSNS.focus();                                     //		post : entryUrl,        
280				
281				
282		//		appid : "mtest.camperstory.com",       
283		//	  appver : "1.0",       
284		//		appname : "캠퍼스토리",        
285		//		urlinfo : JSON.stringify({title:entryTitle, desc:entryDesc, imageurl:[entryImg], type:"article"})
286		//	});
287						
288			break;
289	}
290
291	if (parseInt(stp) < 5) {
292		var popupStyle = ""
293		var opSNS = window.open(actUrl,'csSns',popupStyle);
294		opSNS.focus();
295	}
296}
297
298//추천하기
299function goReco() {
300	var entryTitle = "캠핑커뮤니티 - [캠퍼스토리]에 초대합니다."
301	var entryUrl = "http://m.camperstory.com/JoinLink.hbb"
302	
303	kakao.link("talk").send({        
304				msg : entryTitle,
305				url : entryUrl,				
306				appid : "m.camperstory.com",        
307				appver : "2.0",        
308				appname : "캠퍼스토리",        
309				type : "link"    
310	});
311		
312}
313//Url Encode
314function encodeURL(str){
315    var s0, i, s, u;
316    s0 = "";                // encoded str
317    for (i = 0; i < str.length; i++){   // scan the source
318        s = str.charAt(i);
319        u = str.charCodeAt(i);          // get unicode of the char
320        if (s == " "){s0 += "+";}       // SP should be converted to "+"
321        else {
322            if ( u == 0x2a || u == 0x2d || u == 0x2e || u == 0x5f || ((u >= 0x30) && (u <= 0x39)) || ((u >= 0x41) && (u <= 0x5a)) || ((u >= 0x61) && (u <= 0x7a))){       // check for escape
323                s0 = s0 + s;            // don't escape
324            }
325            else {                  // escape
326                if ((u >= 0x0) && (u <= 0x7f)){     // single byte format
327                    s = "0"+u.toString(16);
328                    s0 += "%"+ s.substr(s.length-2);
329                }
330                else if (u > 0x1fffff){     // quaternary byte format (extended)
331                    s0 += "%" + (oxf0 + ((u & 0x1c0000) >> 18)).toString(16);
332                    s0 += "%" + (0x80 + ((u & 0x3f000) >> 12)).toString(16);
333                    s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);
334                    s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
335                }
336                else if (u > 0x7ff){        // triple byte format
337                    s0 += "%" + (0xe0 + ((u & 0xf000) >> 12)).toString(16);
338                    s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);
339                    s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
340                }
341                else {                      // double byte format
342                    s0 += "%" + (0xc0 + ((u & 0x7c0) >> 6)).toString(16);
343                    s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
344                }
345            }
346        }
347    }
348
349    return s0;
350}
351//Url Decode
352function decodeURL(str){
353    var s0, i, j, s, ss, u, n, f;
354    s0 = "";                // decoded str
355    for (i = 0; i < str.length; i++){   // scan the source str
356        s = str.charAt(i);
357        if (s == "+"){s0 += " ";}       // "+" should be changed to SP
358        else {
359            if (s != "%"){s0 += s;}     // add an unescaped char
360            else{               // escape sequence decoding
361                u = 0;          // unicode of the character
362                f = 1;          // escape flag, zero means end of this sequence
363                while (true) {
364                    ss = "";        // local str to parse as int
365                        for (j = 0; j < 2; j++ ) {  // get two maximum hex characters for parse
366                            sss = str.charAt(++i);
367                            if (((sss >= "0") && (sss <= "9")) || ((sss >= "a") && (sss <= "f"))  || ((sss >= "A") && (sss <= "F"))) {
368                                ss += sss;      // if hex, add the hex character
369                            } else {--i; break;}    // not a hex char., exit the loop
370                        }
371                    n = parseInt(ss, 16);           // parse the hex str as byte
372                    if (n <= 0x7f){u = n; f = 1;}   // single byte format
373                    if ((n >= 0xc0) && (n <= 0xdf)){u = n & 0x1f; f = 2;}   // double byte format
374                    if ((n >= 0xe0) && (n <= 0xef)){u = n & 0x0f; f = 3;}   // triple byte format
375                    if ((n >= 0xf0) && (n <= 0xf7)){u = n & 0x07; f = 4;}   // quaternary byte format (extended)
376                    if ((n >= 0x80) && (n <= 0xbf)){u = (u << 6) + (n & 0x3f); --f;}         // not a first, shift and add 6 lower bits
377                    if (f <= 1){break;}         // end of the utf byte sequence
378                    if (str.charAt(i + 1) == "%"){ i++ ;}                   // test for the next shift byte
379                    else {break;}                   // abnormal, format error
380                }
381            s0 += String.fromCharCode(u);           // add the escaped character
382            }
383        }
384    }
385
386    return s0;
387}
388
389
390//아이폰 체크
391function ckIphone() {
392	if(navigator.userAgent.match(/iPhone|iPad/) != null) {
393		return true
394	} else {
395		return false
396	}
397}
398
399//안드로이드 체키
400function ckAndroid() {
401		if(navigator.userAgent.match(/Android/) != null) {
402		return true
403	} else {
404		return false
405	}
406}
407
408//날짜 1자루 채우기
409function filldate(val) {
410	var str = val+""
411	if(str.length == 1) { str = "0"+val; } else { str = val }
412	return str;
413}
414
415
416//radio 처리
417function rdoClk(obj,nm,frm,ctl,vlu) {
418	for(i=0; i < eval(frm+"."+nm).length; i++) {
419		eval(frm+"."+nm)[i].src = '/image/checkbox.png'
420	}
421	obj.src = '/image/checkboxOn.png'
422	eval(frm+"."+ctl).value = vlu
423}
424
425//checkbox 처리
426function chkClk(obj,frm,vlu) {
427	if (obj.src.indexOf("On") > -1) {
428			obj.src = '/image/checkbox.png'
429			arr_camp_ground	= frm.value.split(',')
430			frm.value = '';
431			for(i=0; i < arr_camp_ground.length; i++) {
432				if (arr_camp_ground[i] != vlu) {
433					if (frm.value == '') {
434						frm.value = arr_camp_ground[i]
435					}
436					else {
437						frm.value = frm.value+','+arr_camp_ground[i]
438					}
439				}
440			}
441	}
442	else {
443		obj.src = '/image/checkboxOn.png'
444		if (frm.value == '') {
445			frm.value = vlu
446		}
447		else {
448			frm.value = frm.value+','+vlu
449		}
450	}		
451	
452}
453
454
455//checkbox2 처리
456function chkClk2(obj,frm) {
457	if (obj.src.indexOf("On") > -1) {
458			obj.src = '/image/checkbox.png'
459			frm.value = "N"
460	}	else {
461		obj.src = '/image/checkboxOn.png'
462		frm.value = "Y"
463	}		
464	
465}
466
467//위치정보
468function showPosition(position) {
469	var url = "/inc/axLocation.hbb"
470	var param = "?myHloc="+position.coords.latitude+"&myWloc="+position.coords.longitude
471  var myAjax = new Ajax.Request(url,{method: 'post', parameters: param , onComplete: cb_showPosition });	
472}
473
474
475//위치정보 적용
476function cb_showPosition(reqResult) {
477	return;
478}
479
480 
481//위치정보 에러처리
482function showError(error) {
483		switch(error.code) {
484	  		case error.PERMISSION_DENIED:
485		       	//alert("사용자가 위치 기능 사용을 거부했습니다.")
486	       		break;
487	     	case error.POSITION_UNAVAILABLE:
488	          //alert("위치를 구할 수 없습니다.")
489						break;
490	     	case error.TIMEOUT:
491	          alert("시간을 초과했습니다.")
492						break;
493	      case error.UNKNOWN_ERROR:
494						alert("알 수 없는 에러가 발생하였습니다.")
495	       		break;
496		}
497}
498
499
500
501//사진등록
502function SavFileUpload() {
503	var frm = document.form
504	var fname = frm.upimg.value
505	if(!chkImgExt(fname)) return;
506	document.getElementById("picPhoto").src = "/image/pic_load.gif"
507	document.getElementById("roundLine").style.display = "";
508	frm.encoding = "multipart/form-data"
509	frm.action = "/inc/fileUploadOk.hbb"
510	frm.target = "job"
511	frm.submit();		
512}
513
514
515//팝업
516function goPop(url) {
517	var newWin = window.open(url,'csPop','');
518}
519
520
521//KB에스크로 이체 인증마크 적용 시작
522function onPopKBAuthMark()
523{
524window.open('','KB_AUTHMARK','height=604, width=648, status=yes, toolbar=no, menubar=no, location=no');
525document.KB_AUTHMARK_FORM.action='http://escrow1.kbstar.com/quics';
526document.KB_AUTHMARK_FORM.target='KB_AUTHMARK';
527document.KB_AUTHMARK_FORM.submit();
528}
529
530//이미지 사이즈
531function imgSize(obj,psrc) {
532	var objBody = document.body;
533	var nimg 	= new Image();
534	nimg.src = psrc
535	
536	obj.height = (objBody.offsetWidth - 20)/5
537	
538}
539
540//페이지 이동
541function goList(form,url,tmp_page,tmp_page_k) {
542	form.action = url + '?page_num=' + tmp_page + '&page_k_num=' + tmp_page_k
543	form.target = "_self"
544	form.submit();
545}
546
547//달력 가져오기
548function loadCal(dt,rdt) {
549	$.ajax({
550		type: "POST",
551    url: "/inc/ax_calendar.hbb",
552    data:{ yy:dt.substring(0,4), mm:dt.substring(4,6), dd:dt.substring(6,8), res_dt:rdt },
553    success: onSuccess,
554    error: onError
555	});
556	function onSuccess(dataobj) {
557		document.getElementById("Div_Cal").innerHTML = dataobj
558  }
559  function onError() {
560		//alert("오류가 발생하였습니다.");
561	}	
562}
563
564//달력이동
565function goMon(tp) {
566	var frm = document.ser_form
567	var intThisYear = parseInt(frm.yy.value)
568	var intThisMonth = parseInt(frm.mm.value)
569	if(tp == "P") {
570		if(intThisMonth == 1) {
571			nYear = intThisYear-1
572			nMonth = 12
573		} else {
574			nYear = intThisYear
575			nMonth = intThisMonth-1			
576		}
577	} else {
578		if(intThisMonth == 12) {
579			nYear = intThisYear+1
580			nMonth = 1
581		} else {
582			nYear = intThisYear
583			nMonth = intThisMonth+1			
584		}
585	}
586	var dt = nYear + ((nMonth<10)?"0":"")+nMonth + "01"
587	var rdt = frm.res_dt.value
588	loadCal(dt,rdt)
589}
590
591//달력선택
592function clkCalendar(dt) {
593	var frm = document.ser_form
594	if (frm.p_date.value.replace(/-/gi,'') > dt.replace(/-/gi,'')) {
595		alert("예약가능할 날짜가 아닙니다.")
596		return
597	} else {
598		for(i=1;i<=parseInt(frm.lastDt.value);i++) {
599			var rdt = frm.thisMonth.value + filldate(i)
600			
601			if (frm.p_date.value.replace(/-/gi,'') > rdt.replace(/-/gi,'')) {
602				$("#CalTr"+rdt).attr("class","CalN")
603			} else {
604				$("#CalTr"+rdt).attr("class","CalB")
605			}
606		}
607		$("#CalTr"+dt).attr("class","CalS")
608		frm.res_dt.value = dt
609	}	
610}
611
612
613//조건검색
614/*
615function goResSer() {
616	var frm = document.form
617	if (frm.thankq_app.value=="Y") {
618		getResList(frm.res_dt.value,frm.region.value,frm.site_tp.value,'1','0');
619		triggerImg()
620	} else {
621		frm.action = "main.hbb"
622		frm.submit()
623	}
624}
625*/
626//메세지알림 설정변경
627function SavPushYn() {
628	var frm = document.ser_form
629	$.ajax({
630		type: "POST",
631    url: "/inc/push_loc_ok.hbb",
632    data:{ tp: 'push', yn: frm.tq_push_yn.value },
633    success: onSuccess,
634    error: onError
635	});
636	function onSuccess(dataobj) {
637		
638  }
639  function onError() {
640		//alert("오류가 발생하였습니다.");
641	}	
642}
643
644//위치공유 설정변경
645function SavLocYn() {
646	var frm = document.ser_form
647	$.ajax({
648		type: "POST",
649    url: "/inc/push_loc_ok.hbb",
650    data:{ tp: 'loc', yn: frm.tq_loc_yn.value },
651    success: onSuccess,
652    error: onError
653	});
654	function onSuccess(dataobj) {
655		
656  }
657  function onError() {
658		//alert("오류가 발생하였습니다.");
659	}	
660}
661
662//팝업창 
663function winOpen(url,chk,ment) {
664	var mywin = open(url,'','')
665	if (mywin==null && chk==1) {
666		//if (ment.length > 0) alert(ment)
667		location.href = url
668	}
669}
670
671//팝업창 
672function winOpenPost(pnm,chk,ment) {
673	var mywin = open('',pnm,'')
674	if (mywin==null && chk==1) {
675		//if (ment.length > 0) alert(ment)
676		location.href = url
677	}
678}
679
680//어플평점 알림여부
681function appMarkYn() {
682	$.ajax({
683		type: "POST",
684    url: "/inc/axAppMarkYn.hbb",
685    success: onSuccess,
686    error: onError
687	});
688	function onSuccess(dataobj) {
689		window.Android.appMarkYn(dataobj);
690  }
691  function onError() {
692		//alert("오류가 발생하였습니다.");
693	}	
694}
695
696//어플평점알림창
697function appMarkPop(tp) {
698		//어플 평점주기 팝업창 띄우기
699		//location.href = "/inc/incAppMark.hbb"
700		//미오픈으로 창닫기
701		window.Android.thankqFinish();
702		//광고창열기
703		//location.href = "/inc/incExitBn.hbb"
704}
705
706//어플평점팝업창 선택
707function ClkAppMark(tp) {
708	$.ajax({
709		type: "POST",
710    url: "/inc/axAppMarkOk.hbb",
711    data:{tp : tp},
712    success: onSuccess,
713    error: onError
714	});
715	function onSuccess(dataobj) {
716		if(dataobj=="Y") {
717			location.href = "market://details?id=com.habb.thankq";
718		}
719		window.Android.thankqFinish();	
720  }
721  function onError() {
722		//alert("오류가 발생하였습니다.");
723	}	
724}
725
726function rgb2hex(rgb) {
727     if (  rgb.search("rgb") == -1 ) {
728          return rgb;
729     } else {
730          rgb = rgb.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/);
731          function hex(x) {
732               return ("0" + parseInt(x).toString(16)).slice(-2);
733          }
734          return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]); 
735     }
736}
737
738//checkbox 처리
739function chkClkRadio(frm,obj,mid,tar,vlu,cnt) {
740	for (i=1;i<=cnt;i++) {
741		document.getElementById(mid+i).src = '/image/checknBox.png'		
742	}
743	if (obj.src.indexOf("On") > -1) {
744		obj.src = '/image/checknBox.png'
745	}
746	else {
747		obj.src = '/image/checknBoxOn.png'
748	}
749	tar.value = vlu		
750}
751
752//결제방법 선택시
753function ClkCashGb(gb,gb2,cd) {
754	var frm = document.form
755	frm.use_cash_gb.value = gb
756	frm.pay_method.value=gb2
757	frm.PayMethod.value=gb
758	frm.cash_gb.value=cd
759}
760//결제방법 선택시
761function ClkCashGbFrm(frm,gb,gb2,cd) {
762	frm.use_cash_gb.value = gb
763	//frm.pay_method.value=gb2
764	frm.PayMethod.value=gb
765	frm.cash_gb.value=cd
766}
767
768//어플배너창 확인
769function appBnChk() {
770	$.ajax({
771		type: "POST",
772    url: "/inc/axAppBnChk.hbb",
773    success: onSuccess,
774    error: onError
775	});
776	function onSuccess(dataobj) {
777		if(dataobj=="MARK") {
778			txt = "<div class=\"pop_conts\">"
779			txt += "	<p class=\"txt1\">땡큐캠핑 이용이 즐거우셨나요?</p>"
780			txt += "	<p class=\"txt2\">평점을 남겨 주세요.</p>"
781			txt += "</div>"
782			txt += "<span href=\"#\" class=\"sprite btn_layerClose2\" onclick=\"ClkAppMark('N');\"></span>"
783			txt += "<button type=\"button\" class=\"btn\" onClick=\"ClkAppMark('Y');\">평점남기기</button>"
784			$('#divMainNoti').html(txt);
785			ly_open();
786			//location.href = "/inc/incAppMark.hbb"
787		} else
788		if(dataobj.indexOf('BN') > -1) {
789			location.href = "/inc/incExitBn.hbb?bannerseq="+dataobj.split('$')[1]
790		} else {
791			window.Android.thankqFinish();
792		}
793  }
794  function onError() {
795		window.Android.thankqFinish();
796	}	
797}
798
799//어플배너창 확인
800function appBnClose() {
801	window.Android.thankqFinish();
802}
803
804//해시
805function putHash(txt) {
806	document.location.hash = "#" + txt;
807}
808
809//두 날짜 차이
810function diff_date(pdt,ndt) {
811	var dt1 = new Date(pdt.substr(0,4),parseInt(pdt.substr(4,2))-1,parseInt(pdt.substr(6,2)))
812	var dt2 = new Date(ndt.substr(0,4),parseInt(ndt.substr(4,2))-1,parseInt(ndt.substr(6,2)))
813	var diff = dt2 - dt1
814	var day = 1000 * 60 * 60 * 24
815	return parseInt(diff/day)
816}
817
818//현위치정보
819function geoFindMe() {
820	if(navigator.geolocation){                                                                                                               
821		navigator.geolocation.getCurrentPosition(onGeoSuccess, onGeoError, {                                                                         
822			enableHighAccuracy : true,                                                                                                           
823			maximumAge :0,                                                                                                                       
824			timeout:30000                                                                                                                        
825		});                                                                                                                                    
826	} else {                                                                                                                                           
827		alert("현재 브라우저는 GeoLocation을 지원하지 않습니다!!!");                                                                           
828	}                                                                                                                                        
829}
830//위치정보 성공시
831function onGeoSuccess(position) {
832	var frm = document.form
833  var latitude  = position.coords.latitude;
834  var longitude = position.coords.longitude;
835  frm.mem_lat.value = latitude
836  frm.mem_lng.value = longitude
837}
838//위치정보 실패시
839function onGeoError() {
840  alert("위치 정보 확인이 되지않아 이용하실 수 없습니다.")
841  $('input:radio[name="ser_sort"]').filter('[value="R"]').prop('checked', true);
842}
843
844//내주변검색
845function nearBySer() {
846	if(app_yn=='Y' && app_os=='android') {
847		window.Android.getLocation();
848	} else {
849		if(navigator.geolocation){                                                                                                               
850			navigator.geolocation.getCurrentPosition(onNearBySer, onNearByError, {                                                                         
851				enableHighAccuracy : true,                                                                                                           
852				maximumAge :0,                                                                                                                       
853				timeout:30000                                                                                                                        
854			});                                                                                                                                    
855		} else {                                                                                                                                           
856			alert("현재 브라우저는 GeoLocation을 지원하지 않습니다!!!");                                                                           
857		}  
858	}
859}
860//거리순 선택
861function clkSortDist() {
862	if(app_yn=='Y' && app_os=='android') {
863		window.Android.getLocation2();
864	} else {
865		if(navigator.geolocation){                                                                                                               
866			navigator.geolocation.getCurrentPosition(onNearBySer2, onNearByError, {                                                                         
867				enableHighAccuracy : true,                                                                                                           
868				maximumAge :0,                                                                                                                       
869				timeout:30000                                                                                                                        
870			});                                                                                                                                    
871		} else {                                                                                                                                           
872			alert("현재 브라우저는 GeoLocation을 지원하지 않습니다!!!");                                                                           
873		}  
874	}
875}
876//내주변검색 성공시
877function onNearBySer(position) {
878  var latitude  = position.coords.latitude;
879  var longitude = position.coords.longitude;
880  var frm = document.nearbyform
881  frm.mem_lat.value = latitude
882  frm.mem_lng.value = longitude
883  var param = $('form[name="nearbyform"]').serialize();
884  goUrl("/resv/list.hbb?"+param,"Y","pop")
885  //frm.action = "/resv/list.hbb"
886  //frm.submit()
887}
888//내주변검색 성공시
889function onNearBySer2(position) {
890  var latitude  = position.coords.latitude;
891  var longitude = position.coords.longitude;
892  var frm = document.form
893  frm.mem_lat.value = latitude
894  frm.mem_lng.value = longitude
895  getResList(1);
896}
897//내주변검색 실패시
898function onNearByError() {
899  alert("위치 정보 확인이 되지않아 이용하실 수 없습니다.")
900}
901//어플내주변검색 성공시
902function onNearBySerApp(position) {
903  var latitude	= position.split(",")[0];
904  var longitude	= position.split(",")[1];
905  var frm = document.nearbyform
906  frm.mem_lat.value = latitude
907  frm.mem_lng.value = longitude
908  var param = $('form[name="nearbyform"]').serialize();
909  goUrl("/resv/list.hbb?"+param,"Y","pop")
910  //frm.action = "/resv/list.hbb"
911  //frm.submit()
912}
913//어플내주변검색 성공시
914function onNearBySerApp2(position) {
915  var latitude	= position.split(",")[0];
916  var longitude	= position.split(",")[1];
917  var frm = document.form
918  frm.mem_lat.value = latitude
919  frm.mem_lng.value = longitude
920	getResList(1);
921}
922//팝업창닫기
923function popClose(go_url) {
924	//history.back();
925	if (go_url=='') {
926		if(app_yn=='Y' && (app_os=='android' && parseInt(app_ver) < 49)) {
927			/* 백페이지가 있을경우 */
928	    var hasHistory = false; 
929	    window.history.back();
930	    jQuery(window).on('beforeunload', function(event) {
931	        hasHistory = true;
932	    }); 
933	    setTimeout(function() {
934	        if (!hasHistory) {
935	        	if(opener) {
936							//if(document.referrer.indexOf('thankqcamping.com') >= 0) {
937								window.close()
938							//} else {
939							//	location.href = "/main.hbb"
940							//}
941						} else {
942							if(app_os=='android') {
943								location.href="close:";
944							} else {
945								location.href = "/main.hbb"
946							}
947						}
948	        }//location.href="close:";
949	    }, 200);
950	    /* 백페이지가 있을경우 */
951	    /*
952	    location.href="close:";
953	    */
954		} else {
955			/* 백페이지가 있을경우 */
956	    var hasHistory = false; 
957	    window.history.back();
958	    if(go_url!="/main.hbb") {
959		    jQuery(window).on('beforeunload', function(event) {
960		        hasHistory = true;
961		    });
962		  }
963	    setTimeout(function() {
964	    		if (!hasHistory) {
965	        	if(opener) {
966	        		//if(document.referrer.indexOf('thankqcamping.com') >= 0) {
967								window.close()
968							//} else {
969							//	location.href = "/main.hbb"
970							//}
971						} else {
972							location.href = "/main.hbb"
973						}
974	        }//window.close();
975	    }, 200);
976	    /* 백페이지가 있을경우 */
977		}
978	} else {
979	    setTimeout(function() {
980	    	if(go_url=='reload') {
981	    		if(opener) {
982	    			window.close()
983	    			opener.location.reload()
984	    		} else {
985	    			location.reload()
986	    		}
987	    	} else
988	    	if(go_url=='close') {
989	    		//if(opener) {
990	    			window.close()
991	    		//} else {
992	    		//	location.replace("/main.hbb")
993	    		//}
994	    	} else {
995	      	if(opener) {
996						//if(document.referrer.indexOf('thankqcamping.com') >= 0) {
997							window.close()
998						//} else {
999						//	location.href = go_url
1000						//}
1001					} else {
1002						location.href = go_url
1003					}
1004				}
1005	    }, 200);
1006	}
1007}
1008
1009//우편번호찾기
1010function goZipSer(tp) {
1011	if(tp==true) {
1012		//$('#loading').show();
1013		$.ajax({
1014			type: "POST",
1015	    url: "/inc/incZipAddr.hbb",
1016	    data:{},
1017	    success: onSuccess,
1018	    error: onError
1019		});
1020		function onSuccess(dataobj) {
1021			//$('#loading').hide();
1022			$('.pop_con').html(dataobj);
1023			openLayer('pop_date_sel')
1024	  }
1025	  function onError() {}
1026	} else {
1027		closeLayer('pop_date_sel')
1028	}
1029}
1030
1031//글자수확인
1032function cal_len(obj,prtobj) {
1033	var max_mlen 	= 100;		//장문 max 길이
1034	msgLen				= obj.value.length;		//snd_msg 길이 체크
1035	prtobj.html(msgLen)
1036}
1037
1038//글자수제한
1039function cal_len_cut(obj,prtobj,max_len) {
1040	msgLen				= obj.value.length;		//snd_msg 길이 체크
1041	if(max_len < msgLen) {
1042		txt = obj.value
1043		alert("최대 " + max_len + "자까지 입력하실 수 있습니다.")
1044		obj.value = txt.substring(0,max_len)
1045		prtobj.html(obj.value.length)
1046		return;
1047	}
1048	prtobj.html(msgLen)
1049}
1050
1051//쿠키생성
1052function setCookie(name, value, expires) {
1053 	if (!expires||expires!='') {
1054		var expiredate = new Date (); 
1055		expiredate.setTime(expiredate.getTime() + (1000 * 60 * 60 * 24 * parseInt(expires))); 
1056 	} 
1057	document.cookie = name + "=" + escape(value) + "; expires=" + expiredate + "; path=/";
1058}
1059
1060//쿠키값
1061function get_cookie (cookie_name) {
1062   var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );
1063   if (results) {
1064     	return ( unescape ( results[2] ) );
1065   }else{
1066   		return null;
1067   }
1068}
1069
1070//결제방법 선택시
1071function chgCashGb(obj) {
1072	var frm = document.form
1073	if(obj!='') {
1074		if (obj.split('|')[0]=='M') {
1075			frm.cash_gb.value = obj.split('|')[0]
1076		} else {
1077			frm.PayMethod.value=obj.split('|')[1]
1078			frm.cash_gb.value=obj.split('|')[0]
1079		}
1080	}
1081	chkVBank(obj.split('|')[0])
1082}
1083//가상계좌관련
1084function chkVBank(tp) {
1085	var frm = document.form
1086	if(tp=="V") {
1087		$("#divVBank").show();
1088		if(frm.h_telno1) $("#ReceiptTypeNo1").val(frm.h_telno1.value+frm.h_telno2.value+frm.h_telno3.value)
1089	} else {
1090		$("#divVBank").hide();
1091	}
1092}
1093
1094//모바일 체크
1095function ckMobile() {
1096	if (window.navigator.userAgent.search("/app") > -1) {
1097		return true
1098	} else {
1099		if (navigator.userAgent.match(/iPad/) == null && navigator.userAgent.match(/iPhone|Mobile|UP.Browser|Android|BlackBerry|Windows CE|Nokia|webOS|Opera Mini|SonyEricsson|opera mobi|Windows Phone|IEMobile|POLARIS/) != null) {
1100			return true
1101		} else {
1102			return false
1103		}
1104	}
1105}
1106
1107//로딩표시
1108function loading_show() {
1109	$('#loading').show();
1110}	
1111//로딩표시
1112function loading_hide() {
1113	$('#loading').hide();
1114}	
1115
1116//아이폰관련
1117function goIosAp(tp,val) {
1118	var arr = new Array();
1119	arr[0] = tp
1120	arr[1] = val
1121	window.webkit.messageHandlers.thankq.postMessage(arr);	
1122}
1123
1124//쿠키
1125function GetCookie(sName) {
1126  var aCookie = document.cookie.split("; ");
1127  for (var i=0; i < aCookie.length; i++) {
1128    var aCrumb = aCookie[i].split("=");
1129    if (sName == aCrumb[0]) {
1130        return unescape(aCrumb[1]);
1131    }
1132  }
1133  return null;
1134}
1135
1136//배너 출력
1137function ax_tq_bn(tp,loc,div) {
1138	$.ajax({
1139		type: "POST",
1140    url: "/inc/axBn.hbb",
1141    data:{tp:tp,loc:loc},
1142    success: onSuccess,
1143    error: onError
1144	});
1145	function onSuccess(dataobj) {
1146		if (dataobj!='') {
1147			$('#'+div).html(dataobj)
1148			if (loc=='RS') {
1149				$('#fixed_btn').height('108px');
1150			}
1151			if (loc=='RV') {
1152				openLayer('pop_ad')
1153			}
1154		}
1155  }
1156  function onError() {}
1157}
1158
1159//디지털캠프배너
1160function ax_bn_chk(mc,w,h,tp,loc) {
1161	var url = 'https://tracker.digitalcamp.co.kr/dcamp_load_V2.php?mc='+mc+'&t=script&w='+w+'&h='+h+'&url=' + encodeURIComponent($('#site_url').html()+'/inc/axBn.hbb?tp='+tp+'&loc='+loc);
1162	$.getScript(url);
1163	setTimeout(function() {
1164		if($('.tq_bn').html().length==0) {
1165			$('.tq_bn').hide();
1166		} else {
1167			if($('.tq_bn').find('span').html().length==0 && $('.tq_bn').find('iframe').get(0).contentWindow.document.body.innerHTML.indexOf('img') < 0) {
1168				$('.tq_bn').hide();
1169			} else {
1170				$('.tq_bn_div').show();
1171				if (loc=='RS') {
1172					$('#fixed_btn').height('108px');
1173				}
1174			}
1175		}
1176	}, 1000);
1177}
1178
1179//레이어 온오프
1180function divOnOff(obj) {
1181	if (obj.css('display') === 'none') {
1182		obj.show();
1183	} else {
1184		obj.hide();
1185	}
1186}
1187
1188function copyText(addr){
1189  var tempElem = document.createElement('textarea');
1190  tempElem.value = addr;  
1191  document.body.appendChild(tempElem);
1192
1193  tempElem.select();
1194  document.execCommand("copy");
1195  document.body.removeChild(tempElem);
1196  alert("클립보드에 복사 되었습니다!");
1197}
1198
1199	//checkbox 처리
1200	function chkClk(obj,frm,vlu) {
1201		if (obj.src.indexOf("On") > -1) {
1202				obj.src = '/image/checkbox.png'
1203				arr_camp_ground	= frm.value.split(',')
1204				frm.value = '';
1205				for(i=0; i < arr_camp_ground.length; i++) {
1206					if (arr_camp_ground[i] != vlu) {
1207						if (frm.value == '') {
1208							frm.value = arr_camp_ground[i]
1209						}
1210						else {
1211							frm.value = frm.value+','+arr_camp_ground[i]
1212						}
1213					}
1214				}
1215		}
1216		else {
1217			obj.src = '/image/checkboxOn.png'
1218			if (frm.value == '') {
1219				frm.value = vlu
1220			}
1221			else {
1222				frm.value = frm.value+','+vlu
1223			}
1224		}		
1225		return;
1226	}
1227
1228	//checkbox 처리
1229	function chkClkOnly(obj,frm,vlu) {
1230		if (obj.src.indexOf("On") > -1) {
1231				obj.src = '/image/checkbox.png'
1232				frm.value = '';
1233		}
1234		else {
1235			obj.src = '/image/checkboxOn.png'
1236			frm.value = vlu
1237		}		
1238	}
1239	
1240//배너로그
1241function axMainBnLog(gb,info) {
1242	if(info.split('$')[2]=='Y') {
1243		$.ajax({
1244			type: "POST",
1245	    url: "/inc/axBnLog.hbb",
1246	    data:{gb:gb,bn_info:info},
1247	    success: onSuccess,
1248	    error: onError
1249		});
1250		function onSuccess(dataobj) {		
1251			$("#divNearbyPlace").html(dataobj);
1252	  }
1253	  function onError() {}
1254	}
1255}
1256/*
1257$(function(){
1258	$(document).ready(function() {
1259		$(document).on('click', '.toast_btn_close', function(e) {
1260			var $ToastShow = $(".ToastShow");
1261			$ToastShow.hide();
1262		});		
1263	});
1264});
1265*/
1266//토스트알림
1267function ToastShow(tp) {
1268	var $ToastShow = $(".ToastShow");
1269	var speed = 2000;
1270	var tit 	= ""
1271	var ment 	= ""
1272	switch(tp) {
1273		case "appView" : 
1274			tit = "땡큐캠핑앱으로 보기"
1275			ment = "앱으로 로그인시 캠핑장 빈자리 알림 신청이 가능합니다."
1276			break;
1277	}
1278	$('#Toast_tit').html(tit)
1279	$('#Toast_ment').html(ment)
1280	$('#Toast_act').attr("onClick","ToastClick('"+tp+"');")
1281	setTimeout(function(){
1282	  $ToastShow.slideDown();
1283	  $ToastShow.css("position","fixed")
1284	},speed);
1285	setTimeout(function(){
1286	  $('.toast_btn_close').click()
1287	},speed*4);
1288}
1289
1290function ToastClick(tp) {
1291	switch(tp) {
1292		case "appView" : 
1293			goAppStart()
1294			break;
1295	}
1296	$('.toast_btn_close').click()
1297}
1298
1299// 어플 실행
1300function goAppStart() {
1301
1302	var openAt = new Date,
1303	    uagentLow = navigator.userAgent.toLocaleLowerCase(),
1304	    chrome25,
1305	    kitkatWebview;
1306	 
1307	$("body").append("<iframe id='____thankqlink____' width='0' height='0'></iframe>");
1308	$("#____thankqlink____").hide();
1309	 
1310	setTimeout( function() {
1311	    if (new Date - openAt < 4000) {
1312	        if (uagentLow.search("android") > -1) {
1313	            $("#____thankqlink____").attr("src","market://details?id=com.habb.thankq");
1314	        } else if (uagentLow.search("iphone") > -1) {
1315	            location.replace("https://apps.apple.com/kr/app/%EB%96%99%ED%81%90%EC%BA%A0%ED%95%91/id1527733782");
1316	        }
1317	    }
1318	}, 2000);
1319	if(uagentLow.search("android") > -1){
1320	    chrome25 = uagentLow.search("chrome") > -1 && navigator.appVersion.match(/Chrome\/\d+.\d+/)[0].split("/")[1] > 25;
1321	    kitkatWebview = uagentLow.indexOf("naver") != -1 || uagentLow.indexOf("daum") != -1;
1322	     
1323	    if (chrome25 && !kitkatWebview){
1324	        document.location.href = "intent://action#Intent;scheme=thankq;package=com.habb.thankq;end";
1325	    } else{
1326	        $("#____thankqlink____").attr("src", 'thankq://action');
1327	    }
1328	}
1329	else if(uagentLow.search("iphone") > -1){
1330			location.href='thankq://action';
1331	}
1332	
1333}
1334
1335//결제방법 선택시
1336function ClkPayMethod(gb,gb2,cd,obj) {
1337	document.form.PayMethod.value=gb
1338	document.form.pay_method.value=gb
1339	document.form.cash_gb.value=cd
1340}
1341
1342//땡큐캠핑 페이지로 이동
1343function go_thankq_return(url) {
1344	if(app_os=='android') {
1345		window.Android.go_thankq_return(url)
1346	} else {
1347		location.href = url
1348	}
1349}
1350
1351//동의팝업창
1352function popAgreeLayer(obj,lyr) {
1353	var cnt = 2
1354	for (i=1;i<=cnt;i++) {
1355		$("#div_agree"+i).hide();
1356	}		
1357	$("#div_agree"+lyr).show();
1358	if(!$("#pop_date_sel").hasClass("on")) openLayer('pop_date_sel');
1359	obj.checked=(obj.checked==true) ? false : true
1360}
1361
1362//팝업창에서 동의클릭
1363function clkAgree(obj,lyr) {
1364	$("#agree_r"+lyr).prop("checked",obj.checked);
1365	var cnt = 2
1366	if(lyr+1 <= cnt) {
1367		popAgreeLayer($("#agree_r"+lyr+1),lyr+1)
1368	} else {
1369		closeLayer('pop_date_sel');
1370	}
1371}
1372
1373//토클Onoff버튼
1374function toggleOnoff(obj) {
1375	if(obj.hasClass('on')){
1376		obj.removeClass('on');
1377	}else{
1378		obj.addClass('on');
1379	}
1380}
1381
1382//alert, confirm
1383var action_popup = {
1384    timer: 500,
1385    confirm: function(txt, callback) {
1386        if (txt == null || txt.trim() == "") {
1387            console.warn("confirm message is empty.");
1388            return;
1389        } else if (callback == null || typeof callback != 'function') {
1390            console.warn("callback is null or not function.");
1391            return;
1392        } else {
1393            $(".btn_confirm_ok").off("click").on("click", function() {
1394                callback(true);
1395                //action_popup.close(this);
1396            });
1397            $(".btn_cancel").off("click").on("click", function() {
1398                callback='';
1399                //action_popup.close(this);
1400            });
1401            this.open("popup_confirm", txt);
1402        }
1403    },
1404    alert: function(txt, callback) {
1405        if (txt == null || txt.trim() == "") {
1406            console.warn("confirm message is empty.");
1407            return;
1408        } else {
1409            this.open("popup_alert", txt);
1410            $(".btn_ok").off("click").on("click", function() {
1411                if (callback != '' && callback != undefined) callback.call();
1412            });
1413        }
1414    },
1415    succ_alert: function(tit, txt, callback) {
1416        if (txt == null || txt.trim() == "") {
1417            console.warn("confirm message is empty.");
1418            return;
1419        } else {
1420            this.succ_open("popup_succ_alert", tit, txt);
1421            $(".btn_succ_ok").off("click").on("click", function() {
1422                if (callback != '' && callback != undefined) callback.call();
1423            });
1424        }
1425    },
1426    noti: function(tit, txt, callback) {
1427        if (txt == null || txt.trim() == "") {
1428            console.warn("confirm message is empty.");
1429            return;
1430        } else {
1431            this.noti_open("pop_ad_notice", tit, txt);
1432            $(".btn_gray").off("click").on("click", function() {
1433                if (callback != '' && callback != undefined) callback.call();
1434            });
1435        }
1436    },
1437    popup : function(txt) {
1438        if (txt == null || txt.trim() == "") {
1439            console.warn("confirm message is empty.");
1440            return;
1441        } else {
1442            this.modal_open("popup_modal", txt);
1443            $(".btn_gray").off("click").on("click", function() {
1444                if (callback != '' && callback != undefined) callback.call();
1445            });
1446        }
1447    },
1448    noti_open: function(type, tit, txt) {
1449        var popup = $("#" + type);
1450        popup.find(".tit").html(tit);
1451        popup.find(".btm_border").html(txt);
1452        popup.show();
1453    },
1454    modal_open: function(type, txt) {
1455        var popup = $("#" + type);
1456        popup.find("p").html(txt);
1457        popup.show();
1458    },
1459    open: function(type, txt) {
1460        var popup = $("#" + type);
1461        popup.find("p").html(txt);
1462        popup.show();
1463    },
1464    succ_open: function(type, tit, txt) {
1465        var popup = $("#" + type);
1466        popup.find("#succ_alert_tit").html(tit);
1467        popup.find("#succ_alert_cont").html(txt);
1468        popup.show();
1469    },
1470
1471    close: function(target) {
1472        $(target).hide();
1473    }
1474};
1475
1476
1477function toast_noti(txt) {
1478	openLayer('pop_toast_noti');
1479	$('#toast_txt').html(txt)
1480	setTimeout("closeLayer('pop_toast_noti')",1500);
1481}
1482
1483// 플로팅버튼
1484function floating_noti(txt, onClick) {
1485	openLayer('pop_floating_noti');
1486
1487	const $btn = $('#floating_txt');
1488	$btn.html(txt);
1489	
1490	// 기존 바인딩 제거 후 재바인딩 (중복방지)
1491	$btn.off('click').on('click', function(e){
1492		e.preventDefault();
1493		try { if (typeof onClick === 'function') onClick(); } catch(e){}
1494		closeLayer('pop_floating_noti');
1495	});
1496
1497	// 스크롤 내리면 1회성으로 자동 미노출
1498	// 최초 진입 위치 기준으로 살짝만 내려도 숨김
1499	const startTop = $(window).scrollTop();
1500	$(window).off('scroll.floatingNoti').on('scroll.floatingNoti', function(){
1501		if ($(this).scrollTop() > startTop + 100) {
1502			closeLayer('pop_floating_noti');
1503		}
1504	});
1505	
1506}
1507
1508//인앱리뷰오픈
1509function inAppReviewOpen(ptn_cd,isInit) {
1510	if (app_yn == "Y") {		
1511		$.ajax({
1512			type: "POST",
1513	    url: "/inc/axInAppReviewPattern.hbb",
1514	    data:{ptn_cd:ptn_cd,isInit:isInit,app_os:app_os},
1515	    async: false,
1516	    success: onSuccess,
1517	    error: onError
1518		});
1519		function onSuccess(dataobj) {
1520			if(dataobj.split('@')[0]=='Y') {
1521				if (app_os == "android") {
1522					window.Android.inAppReview()
1523				} else
1524				if (app_os == "ios") {
1525					goIosAp('inAppReview')
1526				}
1527			}
1528			console.log(dataobj)
1529	  }
1530	  function onError() {}
1531	}
1532}
1533
1534//전화번호입력
1535function TelNoComma(tmp_num) { 
1536
1537	var Num = tmp_num.value.replace(/-/g,"")
1538	var out = ""
1539	tmp_num.value = tmp_num.value.replace(/-/g,"")
1540	
1541	if ( CheckNumber(tmp_num) == false ) {
1542		return false;
1543		}
1544		
1545	Num = (Num+"")
1546		
1547	for (var i=0; i < Num.length; i++) {
1548		if(out.substr(0,3)=='010' && (out.length==3 || out.length==8)) {
1549			out += "-"
1550		} else
1551		if((out.substr(0,2)=='15' || out.substr(0,2)=='16' || out.substr(0,2)=='18') && (out.length==4)) {
1552			out += "-"
1553		} else
1554		if(out.substr(0,1)=='0' && out.substr(0,3)!='010' && out.substr(0,2)!='02' && (out.length==3 || out.length==7)) {
1555			out += "-"
1556		} else
1557		if(out.substr(0,2)=='02' && (out.length==2 || out.length==6)) {
1558			out += "-"
1559		} else
1560		if(out.substr(0,3)!='010' && out.substr(0,2)!='02' && out.substr(0,2)!='15' && out.substr(0,2)!='16' && out.substr(0,2)!='18' && (out.length==3 || out.length==8)) {
1561			out += "-"
1562		}
1563		if(out.substr(0,2)=='02' && out.length==11) {
1564			out2 = out.replace(/-/g,"")
1565			out = ""
1566			for (var j=0; j < out2.length; j++) {
1567				out += out2.substring(j, j+1)
1568				if(out.length==2 || out.length==7) out += "-"
1569			}
1570		}
1571		if(out.substr(0,3)!='010' && out.substr(0,2)!='02' && out.substr(0,2)!='15' && out.substr(0,2)!='16' && out.substr(0,2)!='18' && out.length==12) {
1572			out2 = out.replace(/-/g,"")
1573			out = ""
1574			for (var j=0; j < out2.length; j++) {
1575				out += out2.substring(j, j+1)
1576				if(out.length==3 || out.length==8) out += "-"
1577			}
1578		}
1579		if(out.substr(0,3)!='010' && out.substr(0,2)!='02' && out.substr(0,2)!='15' && out.substr(0,2)!='16' && out.substr(0,2)!='18' && out.length==13) {
1580			out2 = out.replace(/-/g,"")
1581			out = ""
1582			for (var j=0; j < out2.length; j++) {
1583				out += out2.substring(j, j+1)
1584				if(out.length==4 || out.length==9) out += "-"
1585			}
1586		}
1587		if(out.substr(0,3)=='010' && out.length==13) break
1588		if((out.substr(0,2)=='15' || out.substr(0,2)=='16' || out.substr(0,2)=='18') && out.length==9) break
1589		if(out.substr(0,2)=='02' && out.length==12) break
1590		if(out.length==13) {
1591			action_popup.alert("발신번호의 전체 번호수는 8~11자리까지만 입력하실 수 있습니다.")
1592			break
1593		}
1594		out += Num.substring(i, i+1)
1595	}
1596	tmp_num.value = out;	
1597}

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.