PageSourceSearch

https://air.priviatravel.com/script/front/travel/quickSearchHistory.js

js priviatravel.com collected 2026-10-01 16:12:16 UTC 53,918 bytes, 1,236 lines download raw bytes

1function getHisCookie(name){
2 	var arg = name + "=";
3 	var alen = arg.length;
4 	var clen = document.cookie.length;
5 	var i = 0;
6 	while(i < clen){
7 		var j = i + alen;
8 		if(document.cookie.substring(i, j) == arg)
9 		{
10 			var end = document.cookie.indexOf(";", j);
11
12 			if(end == -1) {
13 			    end = document.cookie.length;
14 			}
15 			return document.cookie.substring(j, end);
16 		}
17 		i = document.cookie.indexOf(" ", i) + 1;
18 		if(i == 0) break;
19 	}
20 	return null;
21}
22
23function setHisCookie( name, value, expiredays ){
24	var todayDate = new Date();
25	todayDate.setDate( todayDate.getDate()+ expiredays );
26	document.cookie = name + "=" +  value + "; path=/; expires=" + todayDate.toGMTString() + "; domain=.priviatravel.com; secure; samesite=None";//#45808 [공통 요청] 크롬 브라우저 쿠키 정책 변경 조치 요청
27}
28
29function setMakeIntAirHistory(formName){
30	var serializeForm = $("#"+formName).serialize();
31	var saveCookie = getHisCookie("INT_AIR_SEARCH1") == null ? "" : getHisCookie("INT_AIR_SEARCH1").split("|");
32	var maxSize = 3;
33	var historyCookie = "";
34	if(saveCookie.length < maxSize){
35		maxSize = saveCookie.length;
36	}
37	for(var i = 0; i < maxSize; i++){
38		historyCookie += saveCookie[i] + "|";
39	}
40	serializeForm += "|" + historyCookie;
41	setHisCookie('INT_AIR_SEARCH1', serializeForm, 1);
42	
43}
44
45function getIntAirHistory(sId){
46	//INT_AIR_SEARCH
47	var INT_COOKIE = getHisCookie("INT_AIR_SEARCH1") == null ? getHisCookie("INT_AIR_SEARCH1") : getHisCookie("INT_AIR_SEARCH1").replace(/\+/g, '%20');
48	var INT_AIR_SEARCH = decodeURIComponent(INT_COOKIE).split("|");
49	var cnt = 0;
50	var innerHtml = "";
51	for(var i = 0; i < INT_AIR_SEARCH.length -1; i++){
52		if(cnt == 4 || INT_AIR_SEARCH[i] == "") break;
53		innerHtml += "<li>";
54		var arrayCookie = INT_AIR_SEARCH[i].split("&");
55		var paramValue = new Object();
56		for(var j = 0; j < arrayCookie.length; j++){
57			var paramKeyVal = arrayCookie[j].split("=");
58			paramValue[paramKeyVal[0]] = paramKeyVal[1];
59		}
60		innerHtml += "<a href=\"#\" onclick=\""+sId+".setIntAirHistory('"+INT_AIR_SEARCH[i]+"'); return false;\">";
61		innerHtml +=  paramValue["dep0_text"] +"->"+paramValue["arr0_text"]+" | "+paramValue["depdate0"].substring(4,6)+"/"+paramValue["depdate0"].substring(6,8)+"<br />";
62		if(paramValue["trip"] == "RT"){
63			innerHtml +=  paramValue["dep1_text"] +"->"+paramValue["arr1_text"]+" | ";
64			if(paramValue["returnUnfix"] != "" && typeof(paramValue["returnUnfix"]) != "undefined"){
65				innerHtml += paramValue["val_nm"]+"<br />";
66			}else{
67				innerHtml += paramValue["retdate"].substring(4,6)+"/"+paramValue["retdate"].substring(6,8)+"<br />";
68			}
69		}
70		if(paramValue["trip"] == "MD"){
71			innerHtml +=  paramValue["dep1_text"] +"->"+paramValue["arr1_text"]+" | "+paramValue["depdate1"].substring(4,6)+"/"+paramValue["depdate1"].substring(6,8)+"<br />";
72			if(paramValue["dep2_text"] != ""){
73				innerHtml +=  paramValue["dep2_text"] +"->"+paramValue["arr2_text"]+" | "+paramValue["depdate2"].substring(4,6)+"/"+paramValue["depdate2"].substring(6,8)+"<br />";
74			}
75			if(paramValue["dep3_text"] != ""){
76				innerHtml +=  paramValue["dep3_text"] +"->"+paramValue["arr3_text"]+" | "+paramValue["depdate3"].substring(4,6)+"/"+paramValue["depdate3"].substring(6,8)+"<br />";
77			}
78		}
79		innerHtml += "성인"+paramValue["adt"]+", 아동"+paramValue["chd"]+", 유아"+paramValue["inf"]+" | "+paramValue["comp_nm"]+"</a>";
80		
81		innerHtml += "</li>";
82		cnt++;
83	}
84	if(sId == "airQuickSearch"){
85		//퀵서치
86		$("#QS-AIR").find(".INT_AIR_historyList").html(innerHtml);	 
87	}else{
88		//리스트 재검색
89		$(".sub-quick").find(".INT_AIR_historyList").html(innerHtml);
90	}
91	
92}
93
94function setMakeDomAirHistory(formName){
95	var serializeForm = $("#"+formName).serialize();
96	var saveCookie = getHisCookie("DOM_AIR_SEARCH1") == null ? "" : getHisCookie("DOM_AIR_SEARCH1").split("|");
97	var maxSize = 3;
98	var historyCookie = "";
99	if(saveCookie.length < maxSize){
100		maxSize = saveCookie.length;
101	}
102	for(var i = 0; i < maxSize; i++){
103		historyCookie += saveCookie[i] + "|";
104	}
105	serializeForm += "|" + historyCookie;
106	setHisCookie('DOM_AIR_SEARCH1', serializeForm, 1);
107	
108}
109
110function getDomAirHistory(){
111	//DOM_AIR_SEARCH
112	
113	var DOM_AIR_SEARCH = decodeURIComponent(getHisCookie("DOM_AIR_SEARCH1")).split("|");
114	var cnt = 0;
115	var innerHtml = "";
116	for(var i = 0; i < DOM_AIR_SEARCH.length -1; i++){
117		if(cnt == 4 || DOM_AIR_SEARCH[i] == "") break;
118		innerHtml += "<li>";
119		var arrayCookie = DOM_AIR_SEARCH[i].split("&");
120		var paramValue = new Object();
121		for(var j = 0; j < arrayCookie.length; j++){
122			var paramKeyVal = arrayCookie[j].split("=");
123			paramValue[paramKeyVal[0]] = paramKeyVal[1];
124		}
125		innerHtml += "<a href=\"#\" onclick=\"airQuickSearch.setDomAirHistory('"+(cnt+1)+"'); return false;\">";
126		innerHtml +=  paramValue["depDesc0"] +"->"+paramValue["arrDesc0"]+" | "+paramValue["depdate0"].substring(4,6)+"/"+paramValue["depdate0"].substring(6,8)+"<br />";
127		if(paramValue["trip"] == "RT"){
128			innerHtml +=  paramValue["depDesc1"] +"->"+paramValue["arrDesc1"]+" | " + paramValue["depdate1"].substring(4,6)+"/"+paramValue["depdate1"].substring(6,8)+"<br />";
129		}
130		innerHtml += "성인"+paramValue["adt"]+", 아동"+paramValue["chd"]+", 유아"+paramValue["inf"]+"</a>";
131		innerHtml += "</li>";
132		innerHtml += "<form id=\"historyForm_"+(cnt+1)+"\" name=\"historyForm_"+(cnt+1)+"\" method=\"get\">";
133		innerHtml += "<input type=\"hidden\" name=\"trip\" id=\"domHisTrip_"+(cnt+1)+"\" value=\""+paramValue["trip"]+"\"/>";
134		innerHtml += "<input type=\"hidden\" name=\"dep0\" id=\"domHisDep0_"+(cnt+1)+"\" value=\""+paramValue["dep0"]+"\"/>";
135		innerHtml += "<input type=\"hidden\" name=\"arr0\" id=\"domHisArr0_"+(cnt+1)+"\" value=\""+paramValue["arr0"]+"\"/>";
136		innerHtml += "<input type=\"hidden\" name=\"depDesc0\" id=\"domHisDepDesc0_"+(cnt+1)+"\" value=\""+paramValue["depDesc0"]+"\"/>";
137		innerHtml += "<input type=\"hidden\" name=\"arrDesc0\" id=\"domHisArrDesc0_"+(cnt+1)+"\" value=\""+paramValue["arrDesc0"]+"\"/>";
138		innerHtml += "<input type=\"hidden\" name=\"depdate0\" id=\"domHisDepDate0_"+(cnt+1)+"\" value=\""+paramValue["depdate0"]+"\"/>";
139		innerHtml += "<input type=\"hidden\" name=\"adt\" id=\"domHisAdt_"+(cnt+1)+"\" value=\""+paramValue["adt"]+"\"/>";
140		innerHtml += "<input type=\"hidden\" name=\"chd\" id=\"domHisChd_"+(cnt+1)+"\" value=\""+paramValue["chd"]+"\"/>";
141		innerHtml += "<input type=\"hidden\" name=\"inf\" id=\"domHisInf_"+(cnt+1)+"\" value=\""+paramValue["inf"]+"\"/>";
142		if(paramValue["trip"] == "RT"){
143		    innerHtml += "<input type=\"hidden\" name=\"dep1\" id=\"domHisDep1_"+(cnt+1)+"\" value=\""+paramValue["dep1"]+"\"/>";
144		    innerHtml += "<input type=\"hidden\" name=\"arr1\" id=\"domHisArr1_"+(cnt+1)+"\" value=\""+paramValue["arr1"]+"\"/>";
145		    innerHtml += "<input type=\"hidden\" name=\"depDesc1\" id=\"domHisDepDesc1_"+(cnt+1)+"\" value=\""+paramValue["depDesc1"]+"\"/>";
146		    innerHtml += "<input type=\"hidden\" name=\"arrDesc1\" id=\"domHisArrDesc1_"+(cnt+1)+"\" value=\""+paramValue["arrDesc1"]+"\"/>";
147		    innerHtml += "<input type=\"hidden\" name=\"depdate1\" id=\"domHisDepDate1_"+(cnt+1)+"\" value=\""+paramValue["depdate1"]+"\"/>";
148		}
149		innerHtml +="</form>";
150		cnt++;
151		//#18922 국내선 퀵서치 도착도시 선택 개선
152		if (i == 0) {
153			dep0 = paramValue["dep0"];
154			trip = paramValue["trip"];
155
156		}
157		
158	}
159	
160	if (DOM_AIR_SEARCH == "null" || DOM_AIR_SEARCH.length == 1) {
161		dep0 = "GMP";
162		trip = "RT";
163	}
164
165	//#18922 국내선 퀵서치 도착도시 선택 개선
166	$("#DOM_AIR_historyList").html(innerHtml);
167
168	var quickSearch = $("#quick-search").html();
169	if ( !quickSearch ) {
170		setDomArrData(dep0, trip);
171	}
172}
173
174function setDprsHistory(formName){
175	var serializeForm = $("#"+formName).serialize();
176	var saveCookie = getHisCookie("FREETOUR_SEARCH1") == null ? "" : getHisCookie("FREETOUR_SEARCH1").split("|");
177	var maxSize = 3;
178	var historyCookie = "";
179	if(saveCookie.length < maxSize){
180		maxSize = saveCookie.length;
181	}
182	for(var i = 0; i < maxSize; i++){
183		historyCookie += saveCookie[i] + "|";
184	}
185	serializeForm += "|" + historyCookie;
186	setHisCookie('FREETOUR_SEARCH1', serializeForm, 1);
187	
188}
189
190function getDprsHistory(){
191	//FREETOUR_SEARCH
192	
193	var FREETOUR_SEARCH = decodeURIComponent(getHisCookie("FREETOUR_SEARCH1")).split("|");
194	var cnt = 0;
195	var innerHtml = "";
196	for(var i = 0; i < FREETOUR_SEARCH.length -1; i++){
197		if(cnt == 4 || FREETOUR_SEARCH[i] == "") break;
198		innerHtml += "<li>";
199		var arrayCookie = FREETOUR_SEARCH[i].split("&");
200		var paramValue = new Object();
201		for(var j = 0; j < arrayCookie.length; j++){
202			var paramKeyVal = arrayCookie[j].split("=");
203			paramValue[paramKeyVal[0]] = paramKeyVal[1];
204		}
205		innerHtml += "<a href=\"#\" onclick=\"dprsQuickSearch.setHistory('"+(cnt+1)+"'); return false;\">";
206		innerHtml +=  paramValue["dep0_text"] +"->"+paramValue["arr0_text"]+" | "+paramValue["depdate0"].substring(5,11)+"<br />";
207		innerHtml +=  paramValue["arr0_text"] +"->"+paramValue["dep0_text"]+" | "+paramValue["retdate"].substring(5,11)+"<br />";
208		innerHtml += "성인"+paramValue["adt"]+", 아동"+paramValue["chd"]+", 유아"+paramValue["inf"]+"<br />";
209		if(paramValue["htl_room1"] == "SG"){
210		    innerHtml += "객실1 | 1인실 <br />";
211		}else if(paramValue["htl_room1"] == "DB"){
212		    innerHtml += "객실1 | 2인실(더블요청) <br />";
213		}else if(paramValue["htl_room1"] == "TW"){
214		    innerHtml += "객실1 | 2인실(트윈요청) <br />";
215		}else if(paramValue["htl_room1"] == "TR"){
216		    innerHtml += "객실1 | 3인실 <br />";
217		}
218		if(paramValue["htl_room2"] == "SG"){
219		    innerHtml += "객실2 | 1인실 <br />";
220		}else if(paramValue["htl_room2"] == "DB"){
221		    innerHtml += "객실2 | 2인실(더블요청) <br />";
222		}else if(paramValue["htl_room2"] == "TW"){
223		    innerHtml += "객실2 | 2인실(트윈요청) <br />";
224		}else if(paramValue["htl_room2"] == "TR"){
225		    innerHtml += "객실2 | 3인실 <br />";
226		}
227		if(paramValue["htl_room3"] == "SG"){
228		    innerHtml += "객실3 | 1인실 <br />";
229		}else if(paramValue["htl_room3"] == "DB"){
230		    innerHtml += "객실3 | 2인실(더블요청) <br />";
231		}else if(paramValue["htl_room3"] == "TW"){
232		    innerHtml += "객실3 | 2인실(트윈요청) <br />";
233		}else if(paramValue["htl_room3"] == "TR"){
234		    innerHtml += "객실3 | 3인실 <br />";
235		}
236		innerHtml += "</a>";
237		innerHtml += "<input type=\"hidden\" name=\"prd_code\" id=\"prd_code_"+(cnt+1)+"\" value=\""+paramValue["prd_code"]+"\"/>";
238		innerHtml += "<input type=\"hidden\" name=\"dep0\" id=\"dep0_"+(cnt+1)+"\" value=\""+paramValue["dep0"]+"\"/>";
239		innerHtml += "<input type=\"hidden\" name=\"dep0_text\" id=\"dep0_text_"+(cnt+1)+"\" value=\""+paramValue["dep0_text"]+"\"/>";
240		innerHtml += "<input type=\"hidden\" name=\"arr0\" id=\"arr0_"+(cnt+1)+"\" value=\""+paramValue["arr0"]+"\"/>";
241		innerHtml += "<input type=\"hidden\" name=\"arr0_text\" id=\"arr0_text_"+(cnt+1)+"\" value=\""+paramValue["arr0_text"]+"\"/>";
242		innerHtml += "<input type=\"hidden\" name=\"depdate0\" id=\"depdate0_"+(cnt+1)+"\" value=\""+paramValue["depdate0"]+"\"/>";
243		innerHtml += "<input type=\"hidden\" name=\"retdate\" id=\"retdate_"+(cnt+1)+"\" value=\""+paramValue["retdate"]+"\"/>";
244		innerHtml += "<input type=\"hidden\" name=\"adt\" id=\"adt_"+(cnt+1)+"\" value=\""+paramValue["adt"]+"\"/>";
245		innerHtml += "<input type=\"hidden\" name=\"chd\" id=\"chd_"+(cnt+1)+"\" value=\""+paramValue["chd"]+"\"/>";
246		innerHtml += "<input type=\"hidden\" name=\"inf\" id=\"inf_"+(cnt+1)+"\" value=\""+paramValue["inf"]+"\"/>";
247	    innerHtml += "<input type=\"hidden\" name=\"htl_room_cnt\" id=\"htl_room_cnt_"+(cnt+1)+"\" value=\""+paramValue["htl_room_cnt"]+"\"/>";
248	    innerHtml += "<input type=\"hidden\" name=\"htl_room1\" id=\"htl_room1_"+(cnt+1)+"\" value=\""+paramValue["htl_room1"]+"\"/>";
249	    innerHtml += "<input type=\"hidden\" name=\"htl_room2\" id=\"htl_room2_"+(cnt+1)+"\" value=\""+paramValue["htl_room2"]+"\"/>";
250	    innerHtml += "<input type=\"hidden\" name=\"htl_room3\" id=\"htl_room3_"+(cnt+1)+"\" value=\""+paramValue["htl_room3"]+"\"/>";
251		innerHtml += "</li>";
252		cnt++;
253	}
254	$("#dprs_historyList").html(innerHtml);	 
255}
256
257var vDprsItemSeparate = "^!$$!^";
258//[단품-공통]
259function setDprsItemHistory( formName, idCookie ){
260	//console.log("called setDprsItemHistory - formName : ["+ formName +"], idCookie : ["+ idCookie +"]");
261	var serializeForm = $('#'+formName).serialize();
262	//console.log("$('#'+formName).serialize() : ["+ ( $('#'+formName).serialize() ) +"]");
263	//var vDecodeSerializeForm = unescape((serializeForm + '').replace(/\+/g, '%20'));//공백이 '+'으로 자동치환되어 강제로 변환함.
264	//console.log("(serializeForm + '').replace(/\+/g, '%20');//공백이 '+'으로 자동치환되어 강제로 변환함. : ["+ ( vDecodeSerializeForm ) +"]");
265	//var vDecodeSerializeForm = unescape( serializeForm );
266	//console.log("unescape( serializeForm ) : ["+ ( vDecodeSerializeForm ) +"]");
267	var vDecodeSerializeForm = decodeURIComponent((serializeForm + '').replace(/\+/g, '%20'));//공백이 '+'으로 자동치환되어 강제로 변환함.
268	//console.log("decodeURIComponent((serializeForm + '').replace(/\+/g, '%20'));//공백이 '+'으로 자동치환되어 강제로 변환함. : ["+ ( vDecodeSerializeForm ) +"]");
269	
270	var saveCookie = getHisCookie( idCookie ) == null ? "" : getHisCookie( idCookie ).split(vDprsItemSeparate);
271	var maxSize = 4;	//5개로 제한 하기 위해 설정된 값으로 4로 처리한 이유는 현재 추가할 쿠키가 1개 이기 때문임.
272	var historyCookie = "";
273
274	vDecodeSerializeForm = escape( vDecodeSerializeForm );
275	
276	//렌터카만 쿠키 개수를 3개로 제한함(저장된건은 2개까지만 사용하고 현재 조회값을)
277	if( "VCL_ITEM_SEARCH1" == idCookie ){
278		maxSize = 2;
279	}
280
281	if(saveCookie.length < maxSize){
282		maxSize = saveCookie.length;
283	}
284	
285	//console.log("쿠키 중복여부 확인 escape( vDecodeSerializeForm ) : ["+ ( vDecodeSerializeForm) +"]");
286	var lvCntCookie = 0;
287	for(var i = 0; i < saveCookie.length; i++){
288		//console.log("쿠키 중복여부 && !emtpy && 0 < length : ["+ (vDecodeSerializeForm != saveCookie[i] && "" != saveCookie[i] && 0 != saveCookie[i].length ) +"]");
289		//console.log("쿠키 saveCookie["+ i +"] : ["+ saveCookie[i]+"]");
290		//중복값 제외처리
291		if( vDecodeSerializeForm != saveCookie[i] && "" != saveCookie[i] && 0 != saveCookie[i].length ){
292			//console.log("		["+ i +"] 번째 쿠키 중복되지 않아 추가함.");
293			historyCookie += vDprsItemSeparate + saveCookie[i];
294			lvCntCookie++;
295		}
296		
297		if( maxSize == lvCntCookie ){
298			break;
299		}
300	}
301	
302	//쿠키가 null일때도 카운트가 1로 계산되어 for(var i = 0; i < VCL_ITEM_SEARCH.length -1; i++){ 처리중이라서 쿠키 맨앞에 구분자를 추가함
303	vDecodeSerializeForm += historyCookie ;
304	//console.log("셋팅하는 쿠키 확인 vDecodeSerializeForm : ["+ ( vDecodeSerializeForm) +"]");
305	setHisCookie( idCookie , vDecodeSerializeForm, 1);
306}
307
308//[단품-해외렌터카]
309function setDprsItemRentcarHistory( formName ){
310	//필수값 확인후 쿠키생성
311	var lvCheckVal = $("#"+formName).find("input[name=rent_country]").val();
312	//console.log("쿠키 필수값 확인 lvCheckVal : ["+ lvCheckVal +"]");
313	
314	if( '' != lvCheckVal ){
315		setDprsItemHistory( formName, "VCL_ITEM_SEARCH1" );
316	}
317}
318
319//[단품-현지투어]
320function setDprsItemDaytourHistory( formName ){
321	//필수값 확인후 쿠키생성
322	var lvCheckVal = $("#"+formName).find("input[name=daytourLocCode1]").val();
323	//console.log("쿠키 필수값 확인 lvCheckVal : ["+ lvCheckVal +"]");
324	
325	if( '' != lvCheckVal ){
326		setDprsItemHistory( formName, "DAY_ITEM_SEARCH1" );
327	}
328}
329
330//[단품-공항픽업]
331function setDprsItemPickupHistory( formName ){
332	//필수값 확인후 쿠키생성
333	var lvCheckVal = $("#"+formName).find("input[name=pickup_country_code]").val();
334	//console.log("쿠키 필수값 확인 lvCheckVal : ["+ lvCheckVal +"]");
335	
336	if( '' != lvCheckVal ){
337		setDprsItemHistory( formName, "PIC_ITEM_SEARCH1" );
338	}
339}
340
341//[단품-교통패스]
342function setDprsItemPassHistory( formName ){
343	//필수값 확인후 쿠키생성
344	var lvCheckVal = $("#"+formName).find("input[name=pass_loc_code1]").val();
345	//console.log("쿠키 필수값 확인 lvCheckVal : ["+ lvCheckVal +"]");
346	
347	if( '' != lvCheckVal ){
348		setDprsItemHistory( formName, "PAS_ITEM_SEARCH1" );
349	}
350}
351
352//[단품-해외입장권]
353function setDprsItemTicketHistory( formName ){
354	//필수값 확인후 쿠키생성
355	var lvCheckVal = $("#"+formName).find("input[name=enter_loc_code1]").val();
356	//console.log("쿠키 필수값 확인 lvCheckVal : ["+ lvCheckVal +"]");
357	
358	if( '' != lvCheckVal ){
359		setDprsItemHistory( formName, "TKT_ITEM_SEARCH1" );
360	}
361}
362
363function getDprsItemRentcarHistory(){
364	//VCL_ITEM_SEARCH1
365	var VCL_ITEM_SEARCH = unescape(getHisCookie("VCL_ITEM_SEARCH1")).split(vDprsItemSeparate);
366	var cnt = 0;
367	var innerHtml = "";
368	//<li><a href="#">도쿄 | 도쿄 마치다도쿄 | 도쿄 마치다도쿄 | 도쿄 마치다
369	//			  <br>1/10 14시30분 대여
370	//			  <br>도쿄 | 도쿄 마치다도쿄 | 도쿄 마치다도쿄 | 도쿄 마치다
371	//			  <br>1/12 12시30분 반납<br>총 2일 18시간 15분
372	//</a></li>
373	//console.log("getDprsItemRentcarHistory - getHisCookie('VCL_ITEM_SEARCH1') : [" + getHisCookie("VCL_ITEM_SEARCH1") +"]");
374	//console.log("		VCL_ITEM_SEARCH.length : [" + VCL_ITEM_SEARCH.length +"]");
375
376	//console.log(" VCL_ITEM_SEARCH["+ 0 +"] : ["+ VCL_ITEM_SEARCH[0]+"]");
377	for(var i = 0; i <= VCL_ITEM_SEARCH.length -1; i++){
378		//console.log(" for if cnt : ["+ cnt+"], VCL_ITEM_SEARCH["+ i +"] : ["+ VCL_ITEM_SEARCH[i]+"]");
379		if(cnt == 5 || VCL_ITEM_SEARCH[i] == null || VCL_ITEM_SEARCH[i] == "null" || VCL_ITEM_SEARCH[i] == "") break;
380		
381		innerHtml += "<li>";
382		innerHtml += "<div>";
383		var arrayCookie = VCL_ITEM_SEARCH[i].split("&");
384		var paramValue = new Object();
385		
386		for(var j = 0; j < arrayCookie.length; j++){
387			var paramKeyVal = arrayCookie[j].split("=");
388			paramValue[paramKeyVal[0]] = unescape( paramKeyVal[1] );
389		}
390		
391		innerHtml += "<a href=\"#\" onclick=\"unitSearch.setHistory(this); return false; \">";
392		innerHtml += "<span class=\"ellipsis lately-search\">"+paramValue["rent_country"]+" | "+paramValue["rent_city"]+" | "+paramValue["rent_location"]+"></span><br />";
393		innerHtml += paramValue["rent_day_text"]+" "+paramValue["rent_hour"]+"시 "+paramValue["rent_minute"]+"분 대여<br />";
394		innerHtml += "<span class=\"ellipsis lately-search\">"+paramValue["return_country"]+" | "+paramValue["return_city"]+" | "+paramValue["return_location"]+"></span><br />";
395		innerHtml += paramValue["return_day_text"]+" "+paramValue["return_hour"]+"시 "+paramValue["return_minute"]+"분 반납<br />";
396		innerHtml += paramValue["rent_info_text"];
397
398		innerHtml += "</a>";
399		
400		innerHtml += "<input type=\"hidden\" name=\"rent_day\" 			value=\""+paramValue["rent_day"]+"\" />";
401		innerHtml += "<input type=\"hidden\" name=\"rent_day_text\" 	value=\""+paramValue["rent_day_text"]+"\" />";
402		innerHtml += "<input type=\"hidden\" name=\"rent_hour\" 		value=\""+paramValue["rent_hour"]+"\" />";
403		innerHtml += "<input type=\"hidden\" name=\"rent_minute\" 		value=\""+paramValue["rent_minute"]+"\" />";
404		innerHtml += "<input type=\"hidden\" name=\"return_day\" 		value=\""+paramValue["return_day"]+"\" />";
405		innerHtml += "<input type=\"hidden\" name=\"return_day_text\" 	value=\""+paramValue["return_day_text"]+"\" />";
406		innerHtml += "<input type=\"hidden\" name=\"return_hour\" 		value=\""+paramValue["return_hour"]+"\" />";
407		innerHtml += "<input type=\"hidden\" name=\"return_minute\" 	value=\""+paramValue["return_minute"]+"\" />";
408		innerHtml += "<input type=\"hidden\" name=\"rent_equal\" 		value=\""+paramValue["rent_equal"]+"\" />";
409		innerHtml += "<input type=\"hidden\" name=\"rent_age\" 			value=\""+paramValue["rent_age"]+"\" />";
410		innerHtml += "<input type=\"hidden\" name=\"rent_country\" 		value=\""+paramValue["rent_country"]+"\" />";
411		innerHtml += "<input type=\"hidden\" name=\"rent_city\" 		value=\""+paramValue["rent_city"]+"\" />";
412		innerHtml += "<input type=\"hidden\" name=\"rent_info_text\" 	value=\""+paramValue["rent_info_text"]+"\" />";
413		innerHtml += "<input type=\"hidden\" name=\"temp\" 				value=\""+paramValue["temp"]+"\" />";
414
415		innerHtml += "</div>";
416		innerHtml += "</li> \n";
417		cnt++;
418	}
419	//console.log("단품(getDprsItemRentcarHistory) 최근검색 셋팅 : [" + innerHtml +"]");
420	$(".lclsHistoryDprsItemVCL").html(innerHtml);	 
421}
422
423
424function getDprsItemDaytourHistory(){
425	//DAY_ITEM_SEARCH1
426	var DAY_ITEM_SEARCH = unescape(getHisCookie("DAY_ITEM_SEARCH1")).split(vDprsItemSeparate);
427	var cnt = 0;
428	var innerHtml = "";
429	//<li><a href="#">프랑스 &gt; 파리
430	//			  <br>콤보할인, 즐길거리, 관광, 음식, 가이드/차량, 골프
431	//</a></li>
432	//console.log("getDprsItemDaytourHistory - getHisCookie('DAY_ITEM_SEARCH1') : [" + getHisCookie("DAY_ITEM_SEARCH1") +"]");
433	//console.log("		DAY_ITEM_SEARCH.length : [" + DAY_ITEM_SEARCH.length +"]");
434	
435	//console.log(" DAY_ITEM_SEARCH["+ 0 +"] : ["+ DAY_ITEM_SEARCH[0]+"]");
436	for(var i = 0; i <= DAY_ITEM_SEARCH.length -1; i++){
437		//console.log(" for if cnt : ["+ cnt+"], DAY_ITEM_SEARCH["+ i +"] : ["+ DAY_ITEM_SEARCH[i]+"]");
438		if(cnt == 5 || DAY_ITEM_SEARCH[i] == null || DAY_ITEM_SEARCH[i] == "null" || DAY_ITEM_SEARCH[i] == "") break;
439		
440		innerHtml += "<li>";
441		innerHtml += "<div>";
442		var arrayCookie = DAY_ITEM_SEARCH[i].split("&");
443		var paramValue = new Object();
444		
445		for(var j = 0; j < arrayCookie.length; j++){
446			var paramKeyVal = arrayCookie[j].split("=");
447			paramValue[paramKeyVal[0]] = paramKeyVal[1];
448		}
449		
450		innerHtml += "<a href=\"#\" onclick=\"unitSearch.setHistory(this); return false; \">";
451		innerHtml += paramValue["daytourLocCode1Desc"]+" &gt; "+paramValue["daytourLocCode2Desc"]+"<br />";
452		innerHtml += paramValue["daytourCategoryDesc"];
453		innerHtml += "</a>";
454		
455		innerHtml += "<input type=\"hidden\" name=\"daytourLocCode1Desc\" 	value=\""+paramValue["daytourLocCode1Desc"]+"\" />";
456		innerHtml += "<input type=\"hidden\" name=\"daytourLocCode2Desc\" 	value=\""+paramValue["daytourLocCode2Desc"]+"\" />";
457		innerHtml += "<input type=\"hidden\" name=\"daytourCategoryDesc\" 	value=\""+paramValue["daytourCategoryDesc"]+"\" />";
458		innerHtml += "<input type=\"hidden\" name=\"daytourLocCode1\" 		value=\""+paramValue["daytourLocCode1"]+"\" />";
459		innerHtml += "<input type=\"hidden\" name=\"daytourLocCode2\" 		value=\""+paramValue["daytourLocCode2"]+"\" />";
460		innerHtml += "<input type=\"hidden\" name=\"daytourCategory\" 		value=\""+paramValue["daytourCategory"]+"\" />";
461		innerHtml += "<input type=\"hidden\" name=\"daytourDate\" 			value=\""+paramValue["daytourDate"]+"\" />";
462
463		innerHtml += "</div>";
464		innerHtml += "</li> \n";
465		cnt++;
466	}
467	//console.log("단품(getDprsItemDaytourHistory) 최근검색 셋팅 : [" + innerHtml +"]");
468	$(".lclsHistoryDprsItemDAY").html(innerHtml);	 
469}
470
471
472function getDprsItemPickupHistory(){
473	//PIC_ITEM_SEARCH1
474	var PIC_ITEM_SEARCH = unescape(getHisCookie("PIC_ITEM_SEARCH1")).split(vDprsItemSeparate);
475	var cnt = 0;
476	var innerHtml = "";
477	//<li><a href="#">Durres | 숙박시설 → 숙박시설
478	//			  <br>11/30 이용고객 4명
479	//			  <br>한국어
480	//</a></li>
481	//console.log("getDprsItemPickupHistory - getHisCookie('PIC_ITEM_SEARCH1') : [" + getHisCookie("PIC_ITEM_SEARCH1") +"]");
482	//console.log("		PIC_ITEM_SEARCH.length : [" + PIC_ITEM_SEARCH.length +"]");
483
484	//console.log(" PIC_ITEM_SEARCH["+ 0 +"] : ["+ PIC_ITEM_SEARCH[0]+"]");
485	for(var i = 0; i <= PIC_ITEM_SEARCH.length -1; i++){
486		//console.log(" for if cnt : ["+ cnt+"], PIC_ITEM_SEARCH["+ i +"] : ["+ PIC_ITEM_SEARCH[i]+"]");
487		if(cnt == 5 || PIC_ITEM_SEARCH[i] == null || PIC_ITEM_SEARCH[i] == "null" || PIC_ITEM_SEARCH[i] == "") break;
488		
489		innerHtml += "<li>";
490		innerHtml += "<div>";
491		var arrayCookie = PIC_ITEM_SEARCH[i].split("&");
492		var paramValue = new Object();
493		
494		for(var j = 0; j < arrayCookie.length; j++){
495			var paramKeyVal = arrayCookie[j].split("=");
496			paramValue[paramKeyVal[0]] = paramKeyVal[1];
497		}
498		
499		innerHtml += "<a href=\"#\" onclick=\"unitSearch.setHistory(this); return false; \">";
500		innerHtml += paramValue["pickup_city_name"]+" | "+paramValue["pickup_location_name"]+" → "+paramValue["dropoff_location_name"]+"<br />";
501		innerHtml += paramValue["pickup_date_text"]+" 이용고객 "+paramValue["pickup_pax_count"]+"명<br />";
502		innerHtml += paramValue["pref_language"];
503		
504		if( '' != paramValue["alt_language"] && 'undefined' != paramValue["alt_language"] ){
505			innerHtml += " - " + paramValue["alt_language"];
506		}
507		
508		innerHtml += "</a>";
509		
510		innerHtml += "<input type=\"hidden\" name=\"pickup_city_name\" 			value=\""+paramValue["pickup_city_name"]+"\" />";
511		innerHtml += "<input type=\"hidden\" name=\"pickup_location_name\" 		value=\""+paramValue["pickup_location_name"]+"\" />";
512		innerHtml += "<input type=\"hidden\" name=\"dropoff_location_name\" 	value=\""+paramValue["dropoff_location_name"]+"\" />";
513		innerHtml += "<input type=\"hidden\" name=\"pickup_date_text\" 			value=\""+paramValue["pickup_date_text"]+"\" />";
514		innerHtml += "<input type=\"hidden\" name=\"pickup_pax_count\" 			value=\""+paramValue["pickup_pax_count"]+"\" />";
515		innerHtml += "<input type=\"hidden\" name=\"pref_language\" 			value=\""+paramValue["pref_language"]+"\" />";
516		innerHtml += "<input type=\"hidden\" name=\"alt_language\" 				value=\""+paramValue["alt_language"]+"\" />";
517		innerHtml += "<input type=\"hidden\" name=\"pickup_country_name\" 		value=\""+paramValue["pickup_country_name"]+"\" />";
518		innerHtml += "<input type=\"hidden\" name=\"pickup_country_code\" 		value=\""+paramValue["pickup_country_code"]+"\" />";
519		innerHtml += "<input type=\"hidden\" name=\"pickup_city_name\" 			value=\""+paramValue["pickup_city_name"]+"\" />";
520		innerHtml += "<input type=\"hidden\" name=\"pickup_city_code\" 			value=\""+paramValue["pickup_city_code"]+"\" />";
521		innerHtml += "<input type=\"hidden\" name=\"pickup_date\" 				value=\""+paramValue["pickup_date"]+"\" />";
522		innerHtml += "<input type=\"hidden\" name=\"pref_language_code\" 		value=\""+paramValue["pref_language_code"]+"\" />";
523		innerHtml += "<input type=\"hidden\" name=\"alt_language_code\" 		value=\""+paramValue["alt_language_code"]+"\" />";
524		innerHtml += "<input type=\"hidden\" name=\"pickup_country_code\" 		value=\""+paramValue["pickup_country_code"]+"\" />";
525		innerHtml += "<input type=\"hidden\" name=\"pickup_city_code\" 			value=\""+paramValue["pickup_city_code"]+"\" />";
526		innerHtml += "<input type=\"hidden\" name=\"pickup_location_name\" 		value=\""+paramValue["pickup_location_name"]+"\" />";
527		innerHtml += "<input type=\"hidden\" name=\"pickup_location_code\" 		value=\""+paramValue["pickup_location_code"]+"\" />";
528		innerHtml += "<input type=\"hidden\" name=\"dropoff_location_code\" 	value=\""+paramValue["dropoff_location_code"]+"\" />";
529		innerHtml += "<input type=\"hidden\" name=\"temp\" 						value=\""+paramValue["temp"]+"\" />";
530
531		innerHtml += "</div>";
532		innerHtml += "</li> \n";
533		cnt++;
534	}
535	//console.log("단품(getDprsItemPickupHistory) 최근검색 셋팅 : [" + innerHtml +"]");
536	$(".lclsHistoryDprsItemPIC").html(innerHtml);	 
537}
538
539
540function getDprsItemPassHistory(){
541	//PAS_ITEM_SEARCH1
542	var PAS_ITEM_SEARCH = unescape(getHisCookie("PAS_ITEM_SEARCH1")).split(vDprsItemSeparate);
543	var cnt = 0;
544	var innerHtml = "";
545	//<li><a href="#">중국/홍콩 &gt;  홍콩
546	//			  <br>성인 1명, 아동 0명
547	//</a></li>
548	//console.log("getDprsItemPassHistory - getHisCookie('PAS_ITEM_SEARCH1') : [" + getHisCookie("PAS_ITEM_SEARCH1") +"]");
549	//console.log("		PAS_ITEM_SEARCH.length : [" + PAS_ITEM_SEARCH.length +"]");
550
551	//console.log(" PAS_ITEM_SEARCH["+ 0 +"] : ["+ PAS_ITEM_SEARCH[0]+"]");
552	for(var i = 0; i <= PAS_ITEM_SEARCH.length -1; i++){
553		//console.log(" for if cnt : ["+ cnt+"], PAS_ITEM_SEARCH["+ i +"] : ["+ PAS_ITEM_SEARCH[i]+"]");
554		if(cnt == 5 || PAS_ITEM_SEARCH[i] == null || PAS_ITEM_SEARCH[i] == "null" || PAS_ITEM_SEARCH[i] == "") break;
555		
556		innerHtml += "<li>";
557		innerHtml += "<div>";
558		var arrayCookie = PAS_ITEM_SEARCH[i].split("&");
559		var paramValue = new Object();
560		
561		for(var j = 0; j < arrayCookie.length; j++){
562			var paramKeyVal = arrayCookie[j].split("=");
563			paramValue[paramKeyVal[0]] = paramKeyVal[1];
564		}
565		
566		innerHtml += "<a href=\"#\" onclick=\"unitSearch.setHistory(this); return false; \">";
567		innerHtml += paramValue["pass_loc_code1_desc"]+" &gt; "+paramValue["pass_loc_code2_desc"]+"<br />";
568		innerHtml += "성인 " + paramValue["passAdt"]+"명, 아동 "+paramValue["passChd"]+"명";
569		innerHtml += "</a>";
570		
571		innerHtml += "<input type=\"hidden\" name=\"pass_loc_code1\" 	value=\""+paramValue["pass_loc_code1"]+"\" />";
572		innerHtml += "<input type=\"hidden\" name=\"pass_loc_code2\" 	value=\""+paramValue["pass_loc_code2"]+"\" />";
573		innerHtml += "<input type=\"hidden\" name=\"passAdt\" 			value=\""+paramValue["passAdt"]+"\" />";
574		innerHtml += "<input type=\"hidden\" name=\"passChd\" 			value=\""+paramValue["passChd"]+"\" />";
575
576		innerHtml += "</div>";
577		innerHtml += "</li> \n";
578		cnt++;
579	}
580	//console.log("단품(getDprsItemPassHistory) 최근검색 셋팅 : [" + innerHtml +"]");
581	$(".lclsHistoryDprsItemPAS").html(innerHtml);	 
582}
583
584
585function getDprsItemTicketHistory(){
586	//TKT_ITEM_SEARCH1
587	var TKT_ITEM_SEARCH = unescape(getHisCookie("TKT_ITEM_SEARCH1")).split(vDprsItemSeparate);
588	var cnt = 0;
589	var innerHtml = "";
590	//<li><a href="#">동남아 &gt; 세부
591	//			  <br>성인 1명, 아동 0명
592	//</a></li>
593	//console.log("getDprsItemTicketHistory - getHisCookie('TKT_ITEM_SEARCH1') : [" + getHisCookie("TKT_ITEM_SEARCH1") +"]");
594	//console.log("		TKT_ITEM_SEARCH.length : [" + TKT_ITEM_SEARCH.length +"]");
595
596	//console.log(" TKT_ITEM_SEARCH["+ 0 +"] : ["+ TKT_ITEM_SEARCH[0]+"]");
597	for(var i = 0; i <= TKT_ITEM_SEARCH.length -1; i++){
598		//console.log(" for if cnt : ["+ cnt+"], TKT_ITEM_SEARCH["+ i +"] : ["+ TKT_ITEM_SEARCH[i]+"]");
599		if(cnt == 5 || TKT_ITEM_SEARCH[i] == null || TKT_ITEM_SEARCH[i] == "null" || TKT_ITEM_SEARCH[i] == "") break;
600		
601		innerHtml += "<li>";
602		innerHtml += "<div>";
603		var arrayCookie = TKT_ITEM_SEARCH[i].split("&");
604		var paramValue = new Object();
605		
606		for(var j = 0; j < arrayCookie.length; j++){
607			var paramKeyVal = arrayCookie[j].split("=");
608			paramValue[paramKeyVal[0]] = paramKeyVal[1];
609		}
610		
611		innerHtml += "<a href=\"#\" onclick=\"unitSearch.setHistory(this); return false; \">";
612		innerHtml += paramValue["enter_loc_code1_desc"]+" &gt; "+paramValue["enter_loc_code2_desc"]+"<br />";
613		innerHtml += "성인 " + paramValue["enterAdt"]+"명, 아동 "+paramValue["enterChd"]+"명";
614		innerHtml += "</a>";
615		
616		innerHtml += "<input type=\"hidden\" name=\"enter_loc_code1\" 	value=\""+paramValue["enter_loc_code1"]+"\" />";
617		innerHtml += "<input type=\"hidden\" name=\"enter_loc_code2\" 	value=\""+paramValue["enter_loc_code2"]+"\" />";
618		innerHtml += "<input type=\"hidden\" name=\"enterAdt\" 			value=\""+paramValue["enterAdt"]+"\" />";
619		innerHtml += "<input type=\"hidden\" name=\"enterChd\" 			value=\""+paramValue["enterChd"]+"\" />";
620
621		innerHtml += "</div>";
622		innerHtml += "</li> \n";
623		cnt++;
624	}
625	//console.log("단품(getDprsItemTicketHistory) 최근검색 셋팅 : [" + innerHtml +"]");
626	$(".lclsHistoryDprsItemTKT").html(innerHtml);	 
627}
628
629
630/*
631============================================
632//########호텔#########
633htlQuickSearch.html에서 아래의 함수 호출 
634setMakeIntHtlHistory
635setMakeDomHtlHistory
636getIntHtlHistory
637getDomHtlHistory
638
6392018-08-27 UI/UX 개편 후 함수호출
640setMakeHtlHistory
641getHtlHistory
642============================================
643*/
644//호텔 쿠키셋팅
645function setMakeHtlHistory(formName, location) {
646	
647	var serializeForm = $(formName).serialize();
648	
649	var recommct_click = $(formName).find('input[name=city_code]').attr("recommct_click");
650	if( recommct_click == "Y") {
651		serializeForm = serializeForm+"&recommct_click="+recommct_click;	
652	}
653	
654	if(location == "INT") {
655		var saveCookie = getHisCookie("INT_HTL_SEARCH1") == null ? "" : getHisCookie("INT_HTL_SEARCH1").split("|");
656		var maxSize = 3;
657		var historyCookie = "";
658		if(saveCookie.length < maxSize) {
659			maxSize = saveCookie.length;
660		}
661		
662		for(var i = 0; i < maxSize; i++) {
663			historyCookie += saveCookie[i] + "|";
664		}
665		
666		serializeForm += "|" + historyCookie;
667		setHisCookie('INT_HTL_SEARCH1', serializeForm, 1);
668		setHisCookie("SEARCH_TAB_FLAG1", "HTL", -1);
669		setHisCookie("SEARCH_HTL_TYPE1", "int", -1);
670	} else {
671		var saveCookie = getHisCookie("DOM_HTL_SEARCH1") == null ? "" : getHisCookie("DOM_HTL_SEARCH1").split("|");
672		var maxSize = 3;
673		var historyCookie = "";
674		if(saveCookie.length < maxSize){
675			maxSize = saveCookie.length;
676		}
677		for(var i = 0; i < maxSize; i++){
678			historyCookie += saveCookie[i] + "|";
679		}
680		serializeForm += "|" + historyCookie;
681		setHisCookie('DOM_HTL_SEARCH1', serializeForm, 1);
682		setHisCookie("SEARCH_TAB_FLAG1", "HTL", -1);
683		setHisCookie("SEARCH_HTL_TYPE1", "dom", -1);
684	}
685}
686
687//호텔 최근검색 가져오기
688//getHtlHistory는 htlQuickSearch.jsp에서 호출함.
689function getHtlHistory(location) {
690	//INT_HTL_SEARCH
691	var INT_HTL_SEARCH = getHisCookie(location + "_HTL_SEARCH1") ? decodeURIComponent(getHisCookie(location + "_HTL_SEARCH1").replace(/\+/g, ' ')).split("|") : '';
692	
693	htlHistory.getHistory(INT_HTL_SEARCH);
694}
695
696function setMakeIntHtlHistory(formName){
697	
698	var serializeForm = $(formName).serialize();
699	//[#24858
700	var hci_hssp_code = $(formName).find('input[name=htl_name]').attr("hci_hssp_code");
701	var hci_hssp_htl_code = $(formName).find('input[name=htl_name]').attr("hci_hssp_htl_code");
702	if( hci_hssp_code != null && hci_hssp_code!="" && hci_hssp_htl_code != null && hci_hssp_htl_code != ""){
703		serializeForm =serializeForm+"&hci_hssp_code="+hci_hssp_code+"&hci_hssp_htl_code="+hci_hssp_htl_code;
704	}
705	//]
706	
707	//[#26630
708	var recommct_click	= $(formName).find('input[name=city_code]').attr("recommct_click");
709	if( recommct_click == "Y"){
710		serializeForm =serializeForm+"&recommct_click="+recommct_click;	
711	}
712	//]
713	
714	var saveCookie = getHisCookie("INT_HTL_SEARCH1") == null ? "" : getHisCookie("INT_HTL_SEARCH1").split("|");
715	var maxSize = 3;
716	var historyCookie = "";
717	if(saveCookie.length < maxSize){
718		maxSize = saveCookie.length;
719	}
720	for(var i = 0; i < maxSize; i++){
721		historyCookie += saveCookie[i] + "|";
722	}
723	serializeForm += "|" + historyCookie;
724	setHisCookie('INT_HTL_SEARCH1', serializeForm, 1);
725	setHisCookie("SEARCH_TAB_FLAG1", "HTL", -1);
726	setHisCookie("SEARCH_HTL_TYPE1", "int", -1);
727}
728
729function getIntHtlHistory(){
730	//INT_HTL_SEARCH
731	var INT_HTL_SEARCH = getHisCookie("INT_HTL_SEARCH1") ? decodeURIComponent(getHisCookie("INT_HTL_SEARCH1").replace(/\+/g, ' ')).split("|") : '';
732	var cnt = 0;
733	var innerHtml = "";
734	for(var i = 0; i < INT_HTL_SEARCH.length -1; i++){
735		if(cnt == 4 || INT_HTL_SEARCH[i] == "") break;
736		innerHtml += "<li>";
737		var arrayCookie = INT_HTL_SEARCH[i].split("&");
738		var paramValue = new Object();
739		for(var j = 0; j < arrayCookie.length; j++){
740			var paramKeyVal = arrayCookie[j].split("=");
741			paramValue[paramKeyVal[0]] = paramKeyVal[1];
742		}
743		
744        innerHtml += "<a href=\"#\" onclick=\"htlQuickSearch.clickRecentlyHistory('','"+paramValue["nation_name"]+"','','','"+paramValue["city_code"]+"','"+paramValue["city_name"]+"','"+paramValue["checkin_date"]+"','"+paramValue["checkout_date"]+"','"+paramValue["stayDay"]+"','"+paramValue["hsf_bed_type"]+"','"+paramValue["location"]+"','"+paramValue["htl_name"]+"','"+paramValue["hci_hssp_code"]+"','"+paramValue["hci_hssp_htl_code"]+"','"+paramValue["recommct_click"]+"');\">";//#24858
745		innerHtml += paramValue["city_name"]+"<br />";
746		innerHtml += paramValue["checkin_date"]+"("+paramValue["stayDay"]+"박)<br />"; 
747		if( 	 paramValue["stayAdult1_1"] == "1_SG") innerHtml += "객실1 | 1인실 <br />";
748		else if( paramValue["stayAdult1_1"] == "2_DB") innerHtml += "객실1 | 2인실(더블요청) <br />";
749		else if( paramValue["stayAdult1_1"] == "2_TW") innerHtml += "객실1 | 2인실(트윈요청) <br />";
750		else if( paramValue["stayAdult1_1"] == "3_TR") innerHtml += "객실1 | 3인실 <br />";
751		
752		if( 	 paramValue["stayAdult1_2"] == "1_SG") innerHtml += "객실2 | 1인실 <br />";
753		else if( paramValue["stayAdult1_2"] == "2_DB") innerHtml += "객실2 | 2인실(더블요청) <br />";
754		else if( paramValue["stayAdult1_2"] == "2_TW") innerHtml += "객실2 | 2인실(트윈요청) <br />";
755		else if( paramValue["stayAdult1_2"] == "3_TR") innerHtml += "객실2 | 3인실 <br />";
756		
757		if( 	 paramValue["stayAdult1_3"] == "1_SG") innerHtml += "객실3 | 1인실 <br />";
758		else if( paramValue["stayAdult1_3"] == "2_DB") innerHtml += "객실3 | 2인실(더블요청) <br />";
759		else if( paramValue["stayAdult1_3"] == "2_TW") innerHtml += "객실3 | 2인실(트윈요청) <br />";
760		else if( paramValue["stayAdult1_3"] == "3_TR") innerHtml += "객실3 | 3인실 <br />";
761		innerHtml += "</a>";
762		innerHtml += "</li>";
763		cnt++;
764	}
765	
766	$("#QS-HOTEL").find(".INT_HTL_HISTORY_SEARCH").html(innerHtml);	 
767}
768
769//국내호텔 쿠키셋팅
770function setMakeDomHtlHistory(formName){
771	
772	var serializeForm = $(formName).serialize();
773	//[#24858
774	var hci_hssp_code 		= $(formName).find('input[name=htl_name]').attr("hci_hssp_code");
775	var hci_hssp_htl_code	= $(formName).find('input[name=htl_name]').attr("hci_hssp_htl_code");
776	if( hci_hssp_code != null && hci_hssp_code!="" && hci_hssp_htl_code != null && hci_hssp_htl_code != ""){
777		serializeForm =serializeForm+"&hci_hssp_code="+hci_hssp_code+"&hci_hssp_htl_code="+hci_hssp_htl_code;
778	}
779	//]
780	
781	//[#26630
782	var recommct_click	= $(formName).find('input[name=city_code]').attr("recommct_click");
783	if( recommct_click == "Y"){
784		serializeForm =serializeForm+"&recommct_click="+recommct_click;	
785	}
786	//]
787	
788	var saveCookie = getHisCookie("DOM_HTL_SEARCH1") == null ? "" : getHisCookie("DOM_HTL_SEARCH1").split("|");
789	var maxSize = 3;
790	var historyCookie = "";
791	if(saveCookie.length < maxSize){
792		maxSize = saveCookie.length;
793	}
794	for(var i = 0; i < maxSize; i++){
795		historyCookie += saveCookie[i] + "|";
796	}
797	serializeForm += "|" + historyCookie;
798	setHisCookie('DOM_HTL_SEARCH1', serializeForm, 1);
799	setHisCookie("SEARCH_TAB_FLAG1", "HTL", -1);
800	setHisCookie("SEARCH_HTL_TYPE1", "dom", -1);
801}
802
803//국내호텔 최근검색 가져오기
804//getDomHtlHistory는 htlQuickSearch.html에서 호출함.
805function getDomHtlHistory(){
806	//DOM_HTL_SEARCH
807	var DOM_HTL_SEARCH = getHisCookie("DOM_HTL_SEARCH1") ? decodeURIComponent(getHisCookie("DOM_HTL_SEARCH1").replace(/\+/g, ' ')).split("|") : '';
808	var cnt = 0;
809	var innerHtml = "";
810	for(var i = 0; i < DOM_HTL_SEARCH.length -1; i++){
811		if(cnt == 4 || DOM_HTL_SEARCH[i] == "") break;
812		innerHtml += "<li>";
813		var arrayCookie = DOM_HTL_SEARCH[i].split("&");
814		var paramValue = new Object();
815		for(var j = 0; j < arrayCookie.length; j++){
816			var paramKeyVal = arrayCookie[j].split("=");
817			paramValue[paramKeyVal[0]] = paramKeyVal[1];
818		}
819		innerHtml += "<a href=\"#\" onclick=\"htlQuickSearch.clickRecentlyHistory('','','"+paramValue["ccc_sub_area_code"]+"','"+paramValue["ccc_sub_area_lcl"]+"','"+paramValue["city_code"]+"','"+paramValue["city_name"]+"','"+paramValue["checkin_date"]+"','"+paramValue["checkout_date"]+"','"+paramValue["stayDay"]+"','"+paramValue["hsf_bed_type"]+"','"+paramValue["location"]+"','"+paramValue["htl_name"]+"','"+paramValue["hci_hssp_code"]+"','"+paramValue["hci_hssp_htl_code"]+"','"+paramValue["recommct_click"]+"');\">";	//#24858
820		//[#23426
821		if( paramValue["city_code"] != ""){
822			innerHtml += paramValue["ccc_sub_area_lcl"]+" - "+paramValue["city_name"]+"<br />";
823		}
824		else{
825			innerHtml += paramValue["ccc_sub_area_lcl"]+"<br />";
826		}
827		//]
828		innerHtml += paramValue["checkin_date"]+"("+paramValue["stayDay"]+"박)<br />"; 
829		if( 	 paramValue["stayAdult1_1"] == "1_SG") innerHtml += "객실1 | 1인실 <br />";
830		else if( paramValue["stayAdult1_1"] == "2_DB") innerHtml += "객실1 | 2인실(더블요청) <br />";
831		else if( paramValue["stayAdult1_1"] == "2_TW") innerHtml += "객실1 | 2인실(트윈요청) <br />";
832		else if( paramValue["stayAdult1_1"] == "3_TR") innerHtml += "객실1 | 3인실 <br />";
833		
834		if( 	 paramValue["stayAdult1_2"] == "1_SG") innerHtml += "객실2 | 1인실 <br />";
835		else if( paramValue["stayAdult1_2"] == "2_DB") innerHtml += "객실2 | 2인실(더블요청) <br />";
836		else if( paramValue["stayAdult1_2"] == "2_TW") innerHtml += "객실2 | 2인실(트윈요청) <br />";
837		else if( paramValue["stayAdult1_2"] == "3_TR") innerHtml += "객실2 | 3인실 <br />";
838		
839		if( 	 paramValue["stayAdult1_3"] == "1_SG") innerHtml += "객실3 | 1인실 <br />";
840		else if( paramValue["stayAdult1_3"] == "2_DB") innerHtml += "객실3 | 2인실(더블요청) <br />";
841		else if( paramValue["stayAdult1_3"] == "2_TW") innerHtml += "객실3 | 2인실(트윈요청) <br />";
842		else if( paramValue["stayAdult1_3"] == "3_TR") innerHtml += "객실3 | 3인실 <br />";
843		innerHtml += "</a>";
844		innerHtml += "</li>";
845		cnt++;
846		//console.log(innerHtml);
847	}
848	
849	$("#QS-HOTEL").find(".DOM_HTL_HISTORY_SEARCH").html(innerHtml);	 
850}
851//#18922 국내선 퀵서치 도착도시 선택 개선
852function setDomArrData(seg1, tripType) {
853	var paramArrList = new Array();
854
855	// 출발이 대구 TAE 일경우
856	var arrival_TAE = new Array();
857	arrival_TAE[0] = "CJU|제주"
858	arrival_TAE[1] = "GMP|김포"
859	arrival_TAE[2] = "ICN|인천"
860	paramArrList["arrival_TAE"] = arrival_TAE;
861
862	// 출발이 울산 USN 일경우
863	var arrival_USN = new Array();
864	arrival_USN[0] = "CJU|제주"
865	arrival_USN[1] = "GMP|김포"
866	paramArrList["arrival_USN"] = arrival_USN;
867
868	// 출발이 원주 WJU 일경우
869	var arrival_WJU = new Array();
870	arrival_WJU[0] = "CJU|제주"
871	paramArrList["arrival_WJU"] = arrival_WJU;
872
873	// 출발이 여수 RSU 일경우
874	var arrival_RSU = new Array();
875	arrival_RSU[0] = "CJU|제주"
876	arrival_RSU[1] = "GMP|김포"
877	paramArrList["arrival_RSU"] = arrival_RSU;
878
879	// 출발이 부산 PUS 일경우
880	var arrival_PUS = new Array();
881	arrival_PUS[0] = "CJU|제주"
882	arrival_PUS[1] = "GMP|김포"
883	paramArrList["arrival_PUS"] = arrival_PUS;
884
885	// 출발이 군산 KUV 일경우
886	var arrival_KUV = new Array();
887	arrival_KUV[0] = "CJU|제주"
888	paramArrList["arrival_KUV"] = arrival_KUV;
889
890	// 출발이 광주 KWJ 일경우
891	var arrival_KWJ = new Array();
892	arrival_KWJ[0] = "CJU|제주"
893	arrival_KWJ[1] = "GMP|김포"
894	paramArrList["arrival_KWJ"] = arrival_KWJ;
895
896	// 출발이 포항 KPO 일경우
897	var arrival_KPO = new Array();
898	arrival_KPO[0] = "GMP|김포"
899	paramArrList["arrival_KPO"] = arrival_KPO;
900
901	// 출발이 진주 HIN 일경우
902	var arrival_HIN = new Array();
903	arrival_HIN[0] = "CJU|제주"
904	arrival_HIN[1] = "GMP|김포"
905	paramArrList["arrival_HIN"] = arrival_HIN;
906
907	// 출발이 제주 CJU 일경우
908	var arrival_CJU = new Array();
909	arrival_CJU[0] = "GMP|김포"
910	arrival_CJU[1] = "PUS|부산"	
911	arrival_CJU[2] = "USN|울산"
912	arrival_CJU[3] = "KWJ|광주"
913	arrival_CJU[4] = "CJJ|청주"
914	arrival_CJU[5] = "RSU|여수"
915	arrival_CJU[6] = "HIN|진주"
916	arrival_CJU[7] = "WJU|원주"
917	arrival_CJU[8] = "KUV|군산"
918	arrival_CJU[9] = "TAE|대구"
919	arrival_CJU[10] = "MWX|무안"
920	
921	paramArrList["arrival_CJU"] = arrival_CJU;
922
923	// 출발이 서울 GMP 일경우
924	var arrival_GMP = new Array();
925	arrival_GMP[0] = "CJU|제주"
926	arrival_GMP[1] = "PUS|부산"
927	arrival_GMP[2] = "USN|울산"
928	arrival_GMP[3] = "KWJ|광주"
929	arrival_GMP[4] = "RSU|여수"
930	arrival_GMP[5] = "HIN|진주"		
931	arrival_GMP[6] = "KPO|포항"
932	arrival_GMP[7] = "TAE|대구"
933	
934	
935	paramArrList["arrival_GMP"] = arrival_GMP;
936
937	// 출발이 서울 ICN 일경우
938	var arrival_ICN = new Array();
939	arrival_ICN[0] = "TAE|대구"
940	paramArrList["arrival_ICN"] = arrival_ICN;
941
942	// 출발이 청주 CJJ 일경우
943	var arrival_CJJ = new Array();
944	arrival_CJJ[0] = "CJU|제주"
945	paramArrList["arrival_CJJ"] = arrival_CJJ;
946
947	// 출발이 무안 MWX 일경우
948	var arrival_MWX = new Array();
949	arrival_MWX[0] = "CJU|제주"
950	paramArrList["arrival_MWX"] = arrival_MWX;
951
952	// console.log("paramArrList : "+ paramArrList["arrival_"+seg1]);
953	makeDomArrCity(paramArrList, seg1, tripType);
954}
955
956//#18922 국내선 퀵서치 도착도시 선택 개선
957function makeDomArrCity(paramArrList, seg1, tripType) {
958
959	var tempArr = paramArrList["arrival_" + seg1];
960	var iHtml = "";
961	var arrCd = $("#DOM_" + tripType + "_arr0").val();
962	var selectDiv = false; // 기존에 선택한 도시가, 새로운 option내에 있는지 체크
963
964	for (var j = 0; j < tempArr.length; j++) {
965		var segInfo = tempArr[j].split("|");
966
967		if (arrCd == segInfo[0]) {
968			selectDiv = true;
969			$("#DOM_" + tripType + "_arr0").closest("div").find("strong").html(
970					segInfo[1]);
971			iHtml += "<option value=\"" + segInfo[0]
972					+ "\" selected=\"selected\">" + segInfo[1] + "</option>";
973		} else {
974			iHtml += "<option value=\"" + segInfo[0] + "\">" + segInfo[1]
975					+ "</option>";
976		}
977	}
978
979	if (tripType == "RT") {
980		$("#DOM_RT_arr0").html("");
981		$("#DOM_RT_arr0").html(iHtml);
982
983	} else if (tripType == "OW") {
984		$("#DOM_OW_arr0").html("");
985		$("#DOM_OW_arr0").html(iHtml);
986	}
987
988	//기존에 선택한 도시가, 새로운 option내에 없을때, option 모두 생성 후 selectbox Span 내의 text 변경하기. (option 생성 시 시간차 발생하여 setTimeout 사용) 
989	setTimeout(function() {
990		if (selectDiv == false) {
991			$("#DOM_" + tripType + "_arr0").closest("div").find("strong").html(
992					$("#DOM_" + tripType + "_arr0 option:first").text())
993			$("#DOM_" + tripType + "_arr0 option").eq(0).attr("selected",
994					"selected");
995		}
996		;
997	}, 300);
998
999}
1000
1001
1002//자유여행 최근검색 추가
1003function del_setFreeHistory(formName){
1004	var serializeForm = $("#"+formName).serialize();
1005	var saveCookie = getHisCookie("FREE_SEARCH1") == null ? "" : getHisCookie("FREE_SEARCH1").split("|");
1006	var maxSize = 2; // #38379 [자유여행] 쿠키 사용량 조정 요청 4 ->2
1007	var historyCookie = "";
1008	if(saveCookie.length < maxSize){
1009		maxSize = saveCookie.length;
1010	}
1011	for(var i = 0; i < maxSize; i++){
1012		historyCookie += saveCookie[i] + "|";
1013	}
1014	serializeForm += "|" + historyCookie;
1015	setHisCookie('FREE_SEARCH1', serializeForm, 1);
1016}
1017
1018
1019function del_getFreeHistory(){
1020	var FREE_COOKIE = getHisCookie("FREE_SEARCH1") == null ? getHisCookie("FREE_SEARCH1") : getHisCookie("FREE_SEARCH1").replace(/\+/g, '%20');
1021	var FREE_SEARCH = decodeURIComponent(FREE_COOKIE).split("|");
1022	var free_cnt = FREE_SEARCH.length;
1023	var recently_text = '';
1024	var cnt = 0;
1025	var innerHtml = "";
1026	if(FREE_SEARCH != null && free_cnt !=0 && FREE_SEARCH != "null"){
1027		for(var i = 0; i <=FREE_SEARCH.length-1; i++){
1028			if(cnt == 2) break; // #38379 [자유여행] 쿠키 사용량 조정 요청 4 ->2
1029			if(FREE_SEARCH[i] != "" && FREE_SEARCH[i] != "null" && FREE_SEARCH[i] != null){
1030				innerHtml += "<li>";
1031				var arrayCookie = FREE_SEARCH[i].split("&");
1032				var paramValue = new Object();
1033				for(var j = 0; j < arrayCookie.length; j++){
1034					var paramKeyVal = arrayCookie[j].split("=");
1035					paramValue[paramKeyVal[0]] = paramKeyVal[1];
1036				}
1037				var txt = paramValue["histTxt"];
1038				
1039				
1040				//&->@
1041				txt= txt.replace(/\@/gi, '&');
1042				var targetUrl = paramValue["targetUrl"];
1043				var YN = paramValue["targetUrlPopYN"];
1044				
1045				// #33465 퀵서치 기존 검색값 유지
1046				if(targetUrl != '' && typeof(targetUrl) != 'undefined'){
1047					targetUrl= targetUrl.replace(/\@/gi, '&');
1048				}
1049//					if(YN == 'Y')
1050//						innerHtml += "<a href=\""+targetUrl+"\" target=\"_blank\">";
1051//					else
1052//						innerHtml += "<a href=\""+targetUrl+"\" target=\"_self\">";
1053//				}else{
1054					innerHtml += "<a href=\"#\" onclick=\"fnSetQuickSearchList('"+paramValue["histId"]+"', '"+paramValue["histParam"]+"', '"+paramValue["targetTab"]+"', '"+txt+"', '"+targetUrl+"', '"+YN+"'); return false;\">";
1055//				}
1056				//innerHtml += "<a href=\""+paramValue["histUrl"]+"\">";
1057				innerHtml +=  '<span class="cont">'+txt+"</span>";
1058				innerHtml +=  '</a></li>';
1059				cnt++;
1060				if(i==0)	recently_text = txt;
1061			}
1062		}
1063		recently_text = '<span class="cont">' +recently_text +'</span>';
1064		
1065		$("#freeRecently .urs-tit").html('최근검색 <em>('+cnt+')</em>');
1066		$("#freeRecently .recently_cnt").html('최근검색 ('+cnt+')');
1067		$("#freeRecently .recently_cont").html(recently_text);
1068		$("#freeRecently .o-customscrollbar .mCSB_container").html(innerHtml);	 
1069	}
1070}
1071
1072var isEmpty = function(value){ 
1073	if(value != null && typeof value == "object" && !Object.keys(value).length ){
1074		return true
1075	}else if( value == "" || value == null || value == undefined){
1076		return true
1077	} 
1078	return false 
1079};
1080
1081function setFreeHistory (serverName, formName){
1082	
1083	var data = $("#"+formName).serialize(); //histId, histParam, histTxt, targetUrl, targetTab
1084	var pushUrl = (isEmpty(serverName) ? "" : serverName )+ "/freeQuickHistoryPush.lts";
1085	var timeout = 200;
1086
1087	//$.support.cors = true;
1088	$.ajax({
1089		type: 'GET',
1090		url: pushUrl,
1091		dataType: 'jsonp',
1092		data: data,
1093		timeout: timeout,
1094		//async: false,
1095		success: function(data) {
1096			//console.log(data);
1097		}
1098	});
1099	
1100	//퀵서치 내역 저장 - 강제 대기 0.5초
1101	var start = new Date().getTime();
1102	while (new Date().getTime() < start + timeout);
1103}
1104
1105function getFreeHistory(serverName){
1106	
1107	$.ajax({
1108		type: 'GET',
1109		url: serverName+"/freeQuickHistory.lts",
1110		dataType: 'jsonp',
1111		success: function(data) {
1112			
1113			//console.log("data", typeof(data), data);
1114			if(isEmpty(data)){
1115				return;
1116			}
1117		
1118			var FREE_SEARCH = typeof(data) == "string" ? JSON.parse(data): data;
1119			//console.log("FREE_SEARCH", typeof(FREE_SEARCH), FREE_SEARCH);
1120			if(isEmpty(FREE_SEARCH)){
1121				return;
1122			}
1123		
1124			var innerHtml = "";
1125			var cnt = 0;
1126			for(var i = 0; i < FREE_SEARCH.length; i++){
1127				if(i >= 2) break; // #38379 [자유여행] 쿠키 사용량 조정 요청 4 ->2
1128				
1129				var arrayCookie = FREE_SEARCH[i].split("&");
1130				var paramValue = new Object();
1131				for(var j = 0; j < arrayCookie.length; j++){
1132					var paramKeyVal = arrayCookie[j].split("=");
1133					paramValue[paramKeyVal[0]] = paramKeyVal[1];
1134				}
1135				
1136				var txt = paramValue["histTxt"];
1137				var targetUrl = paramValue["targetUrl"];
1138				var YN = paramValue["targetUrlPopYN"];
1139				if(isEmpty(txt)){
1140					continue;
1141				}
1142		
1143				// #33465 퀵서치 기존 검색값 유지
1144				if(!isEmpty(targetUrl)){
1145					targetUrl = targetUrl.replace(/\@/gi, '&');
1146				}
1147				innerHtml += "<li>";
1148				innerHtml += "<a href=\"#\" onclick=\"fnSetQuickSearchList('"+paramValue["histId"]+"', '"+paramValue["histParam"]+"', '"+paramValue["targetTab"]+"', '"+txt+"', '"+targetUrl+"', '"+YN+"'); return false;\">";
1149				//innerHtml += "<a href=\""+paramValue["histUrl"]+"\">";
1150				innerHtml += '<span class="cont">'+txt+"</span>";
1151				innerHtml += '</a></li>';
1152				if( i == 0){
1153					$("#freeRecently .recently_cont").html('<span class="cont">' +txt +'</span>');
1154				}
1155				cnt++;
1156			}
1157		
1158			$("#freeRecently .urs-tit").html('최근검색 <em>('+cnt+')</em>');
1159			$("#freeRecently .recently_cnt").html('최근검색 ('+cnt+')');
1160			$("#freeRecently .o-customscrollbar .mCSB_container").html(innerHtml);
1161		}
1162	    //,error: function(request, status, error) {
1163	    //console.log('실패', request, status, error);
1164		//}
1165	});
1166}
1167
1168
1169/** #40086
1170 * 모바일 메인 이외의 화면에서 호출
1171 * script\front\mtravel\mAirIndexQuickSearchLoad.js 동일 내용 선언되어 있음
1172 * 검색한 리스트 호출
1173 */
1174function mobileLoadAirHistory(call_domain){
1175
1176	var returnData = [];
1177	try{
1178		
1179		var ajaxUrl = "//"+call_domain+"/tideSquareGateApi.lts"
1180		
1181		$.ajax({
1182			type	: "POST"
1183		,	async	: false
1184		,	url		: ajaxUrl
1185		,	data	:{"category" : "QUICK_SEARCH"
1186					, "action" : "LIST"
1187					}
1188		,	dataType: "json"
1189		,	success	: function(result){
1190				if( result != null && result.length > 0){
1191					for( var i = 0 ; i < result.length; i++){
1192						result[i] = decodeURIComponent(result[i]);
1193					}
1194					returnData = result;
1195				}
1196			}
1197		,	error : function(request, status, error){
1198			}
1199		});
1200		
1201	}catch(ee){
1202	}
1203	return returnData;
1204}
1205
1206/** #40086
1207 * 모바일 메인 이외의 화면에서 호출
1208 * script\front\mtravel\mAirIndexQuickSearchLoad.js 동일 내용 선언되어 있음
1209 * 검색 내용 저장
1210 */
1211function mobileSaveAirHistory(call_domain, searchVal ,lastViewUpdate,idvisitor,iata_airport_code,dep_dt,ret_dt){//#40086
1212
1213	try{
1214		var ajaxUrl = "//"+call_domain+"/tideSquareGateApi.lts"
1215		$.ajax({
1216			type	: "POST"
1217		,	async	: false
1218		,	url		: ajaxUrl
1219		,	data	:{"category" : "QUICK_SEARCH"
1220					, "action" : "PUSH"
1221					, "quickParam" : searchVal
1222					, "lastViewUpdate" 		: lastViewUpdate
1223					, "idvisitor" 			: idvisitor						
1224					, "iata_airport_code" 	: iata_airport_code
1225					, "dep_dt" 				: dep_dt
1226					, "ret_dt" 				: ret_dt
1227					}
1228		,	dataType: "json"
1229		,	success	: function(result){
1230						
1231					}
1232		,	error : function(request, status, error){}
1233		});
1234	}catch(ee){
1235	} 
1236}

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.