PageSourceSearch

https://www.santalucia.it/wp-content/plugins/fbcmsv2/assets/js/fblib.js

js santalucia.it collected 2026-10-01 16:11:25 UTC 26,565 bytes, 731 lines download raw bytes

1/*****
2 * Copyright FASTBOOKING  1999-2012
3 * 22/05/2014
4 *
5 * Patch CrossDomain/GoogleAnalytics IE8 Compatible
6 * Please do NOT modify this file
7 * Please do NOT use the final IP adress for Fastbooking links:
8 *   IP address may be changed at any time
9 *
10*/
11/*! device.js 0.1.61 */
12(function(){var a,b,c,d,e,f,g,h,i,j;a=window.fbDeviceDetector,window.fbDeviceDetector={},c=window.document.documentElement,j=window.navigator.userAgent.toLowerCase(),fbDeviceDetector.ios=function(){return fbDeviceDetector.iphone()||fbDeviceDetector.ipod()||fbDeviceDetector.ipad()},fbDeviceDetector.iphone=function(){return d("iphone")},fbDeviceDetector.ipod=function(){return d("ipod")},fbDeviceDetector.ipad=function(){return d("ipad")},fbDeviceDetector.android=function(){return d("android")},fbDeviceDetector.androidPhone=function(){return fbDeviceDetector.android()&&d("mobile")},fbDeviceDetector.androidTablet=function(){return fbDeviceDetector.android()&&!d("mobile")},fbDeviceDetector.blackberry=function(){return d("blackberry")||d("bb10")||d("rim")},fbDeviceDetector.blackberryPhone=function(){return fbDeviceDetector.blackberry()&&!d("tablet")},fbDeviceDetector.blackberryTablet=function(){return fbDeviceDetector.blackberry()&&d("tablet")},fbDeviceDetector.windows=function(){return d("windows")},fbDeviceDetector.windowsPhone=function(){return fbDeviceDetector.windows()&&d("phone")},fbDeviceDetector.windowsTablet=function(){return fbDeviceDetector.windows()&&d("touch")&&!fbDeviceDetector.windowsPhone()},fbDeviceDetector.fxos=function(){return(d("(mobile;")||d("(tablet;"))&&d("; rv:")},fbDeviceDetector.fxosPhone=function(){return fbDeviceDetector.fxos()&&d("mobile")},fbDeviceDetector.fxosTablet=function(){return fbDeviceDetector.fxos()&&d("tablet")},fbDeviceDetector.meego=function(){return d("meego")},fbDeviceDetector.cordova=function(){return window.cordova&&"file:"===location.protocol},fbDeviceDetector.nodeWebkit=function(){return"object"==typeof window.process},fbDeviceDetector.mobile=function(){return fbDeviceDetector.androidPhone()||fbDeviceDetector.iphone()||fbDeviceDetector.ipod()||fbDeviceDetector.windowsPhone()||fbDeviceDetector.blackberryPhone()||fbDeviceDetector.fxosPhone()||fbDeviceDetector.meego()},fbDeviceDetector.tablet=function(){return fbDeviceDetector.ipad()||fbDeviceDetector.androidTablet()||fbDeviceDetector.blackberryTablet()||fbDeviceDetector.windowsTablet()||fbDeviceDetector.fxosTablet()},fbDeviceDetector.desktop=function(){return!fbDeviceDetector.tablet()&&!fbDeviceDetector.mobile()},fbDeviceDetector.portrait=function(){return window.innerHeight/window.innerWidth>1},fbDeviceDetector.landscape=function(){return window.innerHeight/window.innerWidth<1},fbDeviceDetector.noConflict=function(){return window.fbDeviceDetector=a,this},d=function(a){return-1!==j.indexOf(a)},f=function(a){var b;return b=new RegExp(a,"i"),c.className.match(b)},b=function(a){return f(a)?void 0:c.className+=" "+a},h=function(a){return f(a)?c.className=c.className.replace(a,""):void 0},fbDeviceDetector.ios()?fbDeviceDetector.ipad()?b("ios ipad tablet"):fbDeviceDetector.iphone()?b("ios iphone mobile"):fbDeviceDetector.ipod()&&b("ios ipod mobile"):b(fbDeviceDetector.android()?fbDeviceDetector.androidTablet()?"android tablet":"android mobile":fbDeviceDetector.blackberry()?fbDeviceDetector.blackberryTablet()?"blackberry tablet":"blackberry mobile":fbDeviceDetector.windows()?fbDeviceDetector.windowsTablet()?"windows tablet":fbDeviceDetector.windowsPhone()?"windows mobile":"desktop":fbDeviceDetector.fxos()?fbDeviceDetector.fxosTablet()?"fxos tablet":"fxos mobile":fbDeviceDetector.meego()?"meego mobile":fbDeviceDetector.nodeWebkit()?"node-webkit":"desktop"),fbDeviceDetector.cordova()&&b("cordova"),e=function(){return fbDeviceDetector.landscape()?(h("portrait"),b("landscape")):(h("landscape"),b("portrait"))},i="onorientationchange"in window,g=i?"orientationchange":"resize",window.addEventListener?window.addEventListener(g,e,!1):window.attachEvent?window.attachEvent(g,e):window[g]=e,e()}).call(this);
13
14//Added 2022-09-26 mcanever - Load GA4 crossdomain decoration utility (async just to avoid blocking everything is Cloudfront is down)
15(function () {
16	if (typeof _GA4CrossDomain !== 'undefined') {
17		return;
18	}
19	var s = document.createElement('script');
20	s.type = 'text/javascript';
21	s.async = true;
22	s.src = 'https://staticaws.fbwebprogram.com/accor_tracking_decorator/ga4crossdomain.js';
23	var x = document.getElementsByTagName('script')[0];
24	x.parentNode.insertBefore(s, x);
25})();
26//---
27
28function fblibGetExtraGaClicBook() {
29	var extraPageView = 'Unknown';
30    if (fbDeviceDetector.desktop()) {
31 	   extraPageView = 'Desktop';
32    } else if (fbDeviceDetector.tablet()) {
33 	   extraPageView = 'Tablet';
34    } else if (fbDeviceDetector.mobile()) {
35 	   extraPageView = 'Mobile';
36    }
37    return extraPageView;
38}
39
40// use following parameters, declared before in a fbparam.js file
41// Mandatory parameters:
42//var FBRESA = "http://www.fastbookings.biz/DIRECTORY/";
43//var FB_nb_day_delay = 7;
44// Optional parameters:
45//var FB_useGoogleAnalytics = true;
46//var FB_useAsyncGoogleAnalytics = true;
47//var FB_GoogleAnalyticsTrackerName = "";
48
49if (typeof(FB_useGoogleAnalytics) == "undefined")
50	var FB_useGoogleAnalytics = false;
51if (typeof(FB_useAsyncGoogleAnalytics) == "undefined")
52	var FB_useAsyncGoogleAnalytics = false;
53if (typeof(FB_GoogleAnalyticsTrackerName) == "undefined")
54	var FB_GoogleAnalyticsTrackerName = "";
55//////////////////////////////////////////////////////////////
56
57//////////////////////////////////////////////////////////////
58// Fidelity program
59var FB_code_interface = "";
60var FB_profil = "";
61function hhotelProfil(code_interface, profil)
62{
63	FB_code_interface = code_interface;
64	FB_profil = profil;
65}
66// Form: show arrival date
67// this function to replace the traditional start function
68// in this case no update is required every year.
69function start() {
70	var nbm = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
71
72	thisform = document.idForm;
73
74	if(typeof(thisform) == 'undefined') { return; }
75
76	build_year_select(thisform);
77
78	MD = new Date();
79
80	nday = MD.getDate();
81	aday = MD.getDay();
82	amois = MD.getMonth();
83	ayear = takeYear(MD);
84	cur_year = ayear;
85
86	nday += FB_nb_day_delay;
87
88	if(nday > nbm[amois])
89	{
90		nday -= nbm[amois];
91		amois++;
92		if(amois > 11) {
93			ayear++;
94			amois = 0;
95		}
96	}
97
98	indexDay = nday - 1;
99	indexMois = amois;
100	indexYear = ayear - cur_year;
101
102	if(indexDay < 0 || indexDay > 30)
103		indexDay = 0;
104	if(indexMois < 0 || indexMois > 11)
105		indexMois = 0;
106	if(indexYear < 0 || indexYear > 1)
107		indexDay = 0;
108
109	thisform.fromday.selectedIndex = indexDay;
110	thisform.frommonth.selectedIndex = indexMois;
111	thisform.fromyear.selectedIndex = indexYear;
112
113	update_departure();
114}
115
116function generateSession()
117{
118	var time = new Date();
119	var sec  = time.getSeconds();
120	f = Math.floor(Math.random() * 1000000000) + '';
121	var sess = '' + sec + f;
122	return sess;
123}
124
125function transferGAdata(sessId, cname)
126{
127	var waction = FBRESA + "ga.phtml?clusterName="+cname + "&id=" + sessId;
128	if (FB_useAsyncGoogleAnalytics) {
129		if(typeof _gaq !== 'undefined'){
130			_gaq.push(function() {
131				//var pageTracker = _gat._getTrackerByName(FB_GoogleAnalyticsTrackerName);
132				var pageTracker = _gat._getTrackerByName();
133				new Image().src = pageTracker._getLinkerUrl(waction);
134				//pageTracker._trackPageview('/FastBooking/ClicBook');
135				_gaq.push(['_trackPageview', '/FastBooking/ClicBook']);
136				_gaq.push(['_trackPageview', '/FastBooking/ClicBook/'+fblibGetExtraGaClicBook()]);
137			});
138		}
139	} else {
140		pageTracker._initData();
141		new Image().src = pageTracker._getLinkerUrl(waction);
142		pageTracker._trackPageview('/FastBooking/ClicBook');
143		pageTracker._trackPageview('/FastBooking/ClicBook/'+fblibGetExtraGaClicBook());
144	}
145}
146/**
147 * Override this to change behavior of the url opening
148 * Since 2017-09-18 : Open in new tab is default for all websites. [mcanever]
149 */
150function openBookingEngine(url, opts) {
151	if (typeof(opts.form) !== "undefined") {
152		opts.form.target = '_blank';
153		// Submit is already performed in fblib
154	} else {
155		window.open(url, '_blank');
156	}
157}
158
159function fbOpenWindow(cname, waction, title, width, height)
160{
161	if(FB_useGoogleAnalytics)
162	{
163		sessId 	 = generateSession();
164		hhotelProfil("GoogleAnalytics", escape("SESSION=" + sessId));
165	}
166	if(FB_profil != "")
167	{
168		waction += "&code="+FB_code_interface;
169		waction += "&profil="+FB_profil;
170	}
171
172	if (typeof(_gat) != "undefined") {
173        waction = _gat._getTrackerByName()._getLinkerUrl(waction) ;
174    }
175
176 	if( typeof ga !== 'undefined' && typeof ga.getAll === 'function') {
177	    var trackers = ga.getAll();
178	    if(trackers.length) {
179	       linker = new window.gaplugins.Linker(trackers[0]);
180	       waction = linker.decorate(waction);
181	    } 
182    }
183
184	//Added 2022-09-26 mcanever - Decorate for GA4 if decorator is available
185	if (typeof _GA4CrossDomain !== 'undefined' && typeof _GA4CrossDomain.decorateURL === 'function') {
186		try {
187			waction = _GA4CrossDomain.decorateURL(waction);
188		} catch (e) {
189			// Do nothing. Bloody ad blockers.
190		}
191	}
192	//---
193
194	openBookingEngine(waction, {title: title, width: width, height:height });
195
196	if(FB_useGoogleAnalytics)
197		transferGAdata(sessId, cname);
198}
199
200// standard booking function
201function hhotelPTC(cname, lg, codeprice, codetrack, cluster)
202{
203	hhotelResa(cname, lg, codeprice, "", "", codetrack, cluster, "", "");
204}
205
206// standard promotion function
207function hhotelPromo(cname, lg, theme)
208{
209	hhotelResa(cname, lg, "DYNPROMO", "", "", "", "", theme, "");
210}
211
212// reservation promotion function: To show one promotion
213function hhotelOnePromo(cname, lg, codeprice, codetrack, cluster)
214{
215	hhotelResa(cname, lg, codeprice, "", "", codetrack, cluster, "", "style=DIRECTPROMO");
216}
217
218// reservation page WITHOUT the individual access
219function hhotelNegociated(cname, lg, codeprice, codetrack, cluster)
220{
221	hhotelResa(cname, lg, codeprice, "", "", codetrack, cluster, "", "negociated=1");
222}
223
224// Main direct reservation function
225function hhotelResaDirect(cname, lg, codeprice, firstroom, codetrack, firstdate)
226{
227	hhotelResa(cname, lg, codeprice, firstroom, firstdate, codetrack, "", "", "style=DIRECT");
228}
229
230// standard search availabilities in a group
231function hhotelSearchGroup(cluster, lg, price, nights, title)
232{
233	hhotelSearch(cluster, lg, price, nights, title, "", "");
234}
235
236// standard search availabilities in a group for a partner
237function hhotelSearchPartner(cluster, lg, price, codetrack, title)
238{
239	if (codetrack != "") args = "&from="+codetrack;
240	else	args = "";
241	hhotelSearch(cluster, lg, price, "", title, "", args);
242}
243
244// search by giving the initial date
245function hhotelSearchPriceDate(cluster, price, nights, title, firstdate)
246{
247	// firstdate : format "YYMMDD"
248	var args="";
249	if (firstdate != "") args = "FirstDate="+firstdate;
250	hhotelSearch(cluster, "", price, nights, title, "", args);
251}
252
253function hhotelSearchPriceDateTrack(cluster, lg, price, codetrack, nights, title, firstdate)
254{
255	var args="";
256	if (codetrack != "") args = "from="+codetrack;
257	if (firstdate != "") args += "&FirstDate="+firstdate;
258	hhotelSearch(cluster, lg, price, nights, title, "", args);
259}
260
261// search by giving the initial date and persons for MSP
262function hhotelSearchAllMSP(cluster, price, nights, title, firstdate, mastercluster, cartID, adults, children)
263{
264	// firstdate : format "YYMMDD"
265	var args="";
266	if (firstdate != "") args = "FirstDate="+firstdate;
267	if (mastercluster != "") args += "&mastercluster=" + mastercluster;
268	if (cartID != "") args += "&cartID=" + cartID;
269	if (adults != "") args += "&adulteresa=" + adults;
270	if (children != "") args += "&enfantresa=" + children;
271	hhotelSearch(cluster, "", price, nights, title, "", args);
272}
273
274// search availabilities for selected promotions
275function hhotelSearchPromo(cluster, lg, theme)
276{
277	hhotelSearch(cluster, lg, "", "", "", theme, "");
278}
279
280// search availabilities with Extra Field
281function hhotelSearchExtra(cluster, lg, price, codetrack, extratitle, extraval, extrashow)
282{
283	var args = "Extrafield=" + escape(extratitle) + ";" + extraval + ";" + extrashow;
284	if (codetrack != "") args += "&from="+codetrack;
285	hhotelSearch(cluster, lg, price, "", "", "", args);
286}
287
288// go to the cancel reservation page
289function hhotelcancel(cname,lg)
290{
291	var waction = FBRESA + "cancel.phtml?state=77&Hotelnames="+cname;
292	if (lg != "") waction += "&langue="+lg;
293	fbOpenWindow(cname, waction, "reservation", 400, 350);
294	//window.open(waction,"reservation","toolbar=no,width=400,height=350,menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes");
295}
296
297// go to the extract reservation page
298function hhotelExtract(cname, lg)
299{
300	var waction = FBRESA + "getresa.phtml?Hotelnames="+cname+"&langue="+lg;
301	fbOpenWindow(cname, waction, "getresa", 700, 300);
302	//window.open(waction, 'getresa', 'toolbar=no,width=700,height=300,menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes');
303	return false;
304}
305
306// check interface
307function hhotelcheckrates(cname, lg)
308{
309	var waction = FBRESA + "crs.phtml?clusterName="+cname;
310	if (lg != "") waction += "&langue="+lg;
311	waction += "&checkPromo=1";
312	fbOpenWindow(cname, waction, "search", 800, 550);
313	//window.open(waction,"search","toolbar=no,width=800,height=550,menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes");
314}
315
316// Main standard reservation function MSP
317function hhotelResaMSP(cname, lg, codeprice, firstroom, firstdate, codetrack, cluster, theme, args, mastercluster, cartID)
318{
319	if (mastercluster != "") args += "&mastercluster=" + mastercluster;
320	if (cartID != "") args += "&cartID=" + cartID;
321	hhotelResa(cname, lg, codeprice, firstroom, firstdate, codetrack, cluster, theme, args);
322}
323
324// Main Search function MSP
325function hhotelSearchMSP(cluster, lg, price, nights, title, theme, args, mastercluster, cartID)
326{
327	if (mastercluster != "") args += "&mastercluster=" + mastercluster;
328	if (cartID != "") args += "&cartID=" + cartID;
329	hhotelSearch(cluster, lg, price, nights, title, theme, args);
330}
331
332// Main standard reservation function
333function hhotelResa(cname, lg, codeprice, firstroom, firstdate, codetrack, cluster, theme, args)
334{
335	var waction = FBRESA+"preresa.phtml?Hotelnames="+cname, tmp;
336	if (lg != "") waction += "&langue="+lg;
337	if (firstroom != "") {
338		waction += "&FirstRoomName="+firstroom;
339	}
340	if (firstdate != "") {
341		waction += "&FirstDate="+firstdate;
342	}
343	if (codeprice != "") waction += "&FSTBKNGCode="+codeprice;
344	if (codetrack != "") waction += "&FSTBKNGTrackLink="+codetrack;
345	if (cluster != "") waction += "&clustername="+cluster;
346	if (theme != "") waction += "&theme="+theme;
347	if (args != "" && (args.indexOf("=")!= -1) ) waction += "&"+args;
348	tmp = document.location.href.replace(document.location.hash, '');
349	waction += "&HTTP_REFERER="+escape(tmp);
350	fbOpenWindow(cname, waction, "reservation", 400, 350);
351	//window.open(waction,"reservation","toolbar=no,width=400,height=350,menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes");
352}
353
354// Main Search function
355function hhotelSearch(cluster, lg, price, nights, title, theme, args)
356{
357	var waction = FBRESA + "crs.phtml?clusterName="+cluster;
358	if (lg != "") waction += "&langue="+lg;
359	if (price != "") waction += "&FSTBKNGCode="+price;
360	if (nights != "") waction += "&nights="+nights;
361	if (title != "") waction += "&title="+escape(title);
362	if (theme != "") waction += "&theme="+theme;
363	if (args != "" && (args.indexOf("=")!= -1) ) waction += "&"+args;
364	fbOpenWindow(cluster, waction, "search", 1000, 700);
365	//window.open(waction,"search","toolbar=no,width=1000,height=700,menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes");
366}
367
368// Main Search function for Multi Codes
369function hhotelSearchMultCode(cluster, lg, clecode, title, codetrack)
370{
371	var waction = FBRESA + "crs.phtml?clusterName="+cluster;
372	if (lg != "") waction += "&langue="+lg;
373	if (clecode != "") waction += "&AccessCode="+clecode;
374	if (title != "") waction += "&title="+escape(title);
375	if (codetrack != "") waction += "&FSTBKNGTrackLink="+codetrack;
376	waction += "&crossSelling=NO"; // CROSS SELLING DESACTIVATED
377	fbOpenWindow(cluster, waction, "search", 1000, 700);
378	//window.open(waction,"search","toolbar=no,width=1000,height=700,menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes");
379}
380
381// Main Search function for Cross Selling
382
383function hhotelSearchCrossSell(cluster, lg, codetrack, crossSelling)
384{
385	var waction = FBRESA + "crs.phtml?clusterName="+cluster;
386	if (lg != "") waction += "&langue="+lg;
387	if (codetrack != "") waction += "&FSTBKNGTrackLink="+codetrack;
388	if (crossSelling != "") waction += "&crossSelling="+crossSelling;
389	fbOpenWindow(cluster, waction, "search", 1000, 700);
390	//window.open(waction,"search","toolbar=no,width=1000,height=700,menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes");
391}
392
393// MAIN AVAILABILITY CHECK
394function hhotelDispopriceFHP(cname, lg, year, month, day, nights, currency,adults)
395{
396	var waction = FBRESA+"dispoprice.phtml?clusterName="+cname+"&Hotelnames="+cname;
397	if (lg != "") waction += "&langue="+lg;
398//	if (codetrack != "") waction += "&FSTBKNGTrackLink="+codetrack;
399	if (year != "") waction += "&fromyear="+year;
400	if (month != "") waction += "&frommonth="+month;
401	if (day != "") waction += "&fromday="+day;
402	if (nights != "") waction += "&nbdays="+nights;
403	if (adults != "") waction += "&adulteresa="+adults;
404	if (currency != "") waction += "&CurrencyLabel="+currency;
405	waction += "&showPromotions=3";
406	fbOpenWindow(cname, waction, "reservation", 1000, 700);
407	//window.open(waction,"reservation","toolbar=no,width=1000,height=700,menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes");
408}
409
410
411///////////////////////////////////////////////////////////////////////////////////////
412// Form functions
413// Simple form validation (used for compatibility issues)
414function hhotelDispoprice(myForm)
415{
416
417	hhotelFormValidation(myForm, 0);
418}
419
420function fbAppendItemToFormIfDifferent(myForm, newInput) {
421	if (typeof(myForm.elements[newInput.name]) !== 'undefined') {
422		myForm.elements[newInput.name].value = newInput.value;
423		myForm.elements[newInput.name].type = newInput.type;
424	} else {
425		myForm.appendChild(newInput);
426	}
427}
428
429function hhotelFormValidation(myForm, mandatoryCode){
430
431	if (mandatoryCode == 1 && myForm.AccessCode.value == "") {
432		alert("You must type in your code ID");
433		return (false);
434	}
435
436	myForm.action = FBRESA + "dispoprice.phtml";
437
438	if (typeof(_gat) != "undefined") {
439		var urlParms = _gat._getTrackerByName()._getLinkerUrl('').replace(/^\?/, '').split('&') ;
440
441		for (loop=0; loop<urlParms.length; ++loop) {
442			match = /^([^=]+)=(.*)$/.exec(urlParms[loop]) ;
443			if (match != null) {
444				var newInput = document.createElement("input");
445				newInput.setAttribute("type", "hidden");
446				newInput.setAttribute("name", match[1]);
447				newInput.setAttribute("value", match[2]);
448				fbAppendItemToFormIfDifferent(myForm, newInput);
449			}
450		}
451	}
452
453	if (FB_useGoogleAnalytics) {
454		sessId = generateSession();
455		profilValue = escape("SESSION=" + sessId + "&CODE=GoogleAnalytics");
456		if ((typeof myForm.profil) == "undefined") {
457			var newInput = document.createElement("input");
458			newInput.setAttribute("type", "hidden");
459			newInput.setAttribute("name", "profil");
460			newInput.setAttribute("value", profilValue);
461			fbAppendItemToFormIfDifferent(myForm, newInput);
462		} else {
463			myForm.profil.value = profilValue;
464		}
465		//alert(profilValue);
466		//alert(myForm.action);
467	}
468
469	//Added 2023-09-28 mcanever - Decorate form for GA4 if decorator is available
470	if (typeof _GA4CrossDomain !== 'undefined' && typeof _GA4CrossDomain.decorateObject === 'function') {
471		try {
472			var tmp = _GA4CrossDomain.decorateObject({});
473			if (tmp._gl && tmp._gl !== '') {
474				var newInput = document.createElement("input");
475				newInput.setAttribute("type", "hidden");
476				newInput.setAttribute("name", "_gl");
477				newInput.setAttribute("value", tmp._gl);
478				fbAppendItemToFormIfDifferent(myForm, newInput);
479			}
480		} catch (e) {
481			// Do nothing. Bloody ad blockers.
482		}
483	}
484	//---
485
486	openBookingEngine('', {title: 'dispoprice', width: 1000, height: 700, form: myForm});
487	
488	if (typeof(ga) != "undefined") {
489    	ga('linker:decorate', myForm, false);
490    }
491	
492	//window.open('','dispoprice', 'toolbar=no,width=1000,height=700,menubar=no,scrollbars=yes,resizable=yes');
493	myForm.submit();
494	if (FB_useGoogleAnalytics) {
495		var cname = "";
496		if ((typeof myForm.AccountName) != "undefined" && myForm.AccountName.value != "")
497			cname = myForm.AccountName.value;
498		else
499			cname = myForm.Clusternames.value;
500		transferGAdata(sessId, cname);
501	}
502	return (true);
503}
504
505// Form: update the selected hotel name
506function hhotelFormUpdateHotelnames(myForm)
507{
508	menuNum = myForm.HotelList.selectedIndex;
509	if (menuNum == null)
510		return;
511	myForm.Hotelnames.value = myForm.HotelList.options[menuNum].value;
512}
513
514// Form: show the cancel page
515function hhotelFormCancel(myForm){
516	var CName = myForm.Hotelnames.value;
517	var languetype = typeof myForm.langue;
518	var langue;
519	if (languetype == "undefined")
520		langue = "";
521	else
522		langue = myForm.langue.value;
523	if (CName == null || CName == 'All' || CName == ''){ alert('Please select a hotel first'); return (false); }
524	return hhotelcancel(CName, langue);
525}
526
527// Form: show the extract page
528function hhotelFormExtract(myForm)
529{
530	var CName = myForm.Hotelnames.value;
531	var languetype = typeof myForm.langue;
532	var langue;
533	if (languetype == "undefined")
534		langue = "";
535	else
536		langue = myForm.langue.value;
537	if (CName == null || CName == 'All' || CName == ''){ alert('Please select a hotel first'); return (false); }
538	return hhotelExtract(CName, langue);
539}
540
541// Form: show languages ////////////////////////////////////////////
542function hhotelShowLang(lang)
543{
544	hhotelShowLang__(this.document, lang);
545}
546
547function hhotelShowLangOpener(lang)
548{
549	hhotelShowLang__(window.opener.document, lang);
550	window.close();
551}
552
553function hhotelShowLang__(mydoc, lang)
554{
555	mydoc.idForm.langue.value=lang;
556
557	var imgLang = hhotelLang2Img(lang);
558	if (imgLang != "") {
559		var formFlag = mydoc.selLgFlag;
560		if (formFlag != null)
561			mydoc.selLgFlag.src= "fastbooking/flags/"+imgLang+".gif";
562		var formFlag = mydoc.selLgTxt;
563		if (formFlag != null)
564			mydoc.selLgTxt.src= "fastbooking/flags/"+imgLang+"lg.gif";
565	}
566}
567
568// FastBooking language and image code
569var FBLangCode = new Array (
570	"uk", "france", "germany", "spain", "portuguese", "italy", "nether", "russian",
571	"dansk", "svensk", "islensk", "norsk", "turk", "hungria", "greek", "arab",
572	"china", "coreen", "japan","croate","czech","poland");
573var FBLangImg = new Array (
574	"grandbret", "france", "germany", "spain", "portuguese", "italy", "nether", "russia",
575	"denmark", "sweeden", "iceland", "norway", "turkey", "hungary", "greek", "arab",
576	"china", "coreen", "japan","croate","czech","poland");
577
578function hhotelLang2Img(lang)
579{
580	for(i = 0; i < FBLangCode.length; i++) {
581		if (FBLangCode[i] == lang)
582			break;
583	}
584	return FBLangImg[i];
585}
586
587function hhotelLangSelector()
588{
589	window.open('fastbooking/flags/langSelector.html', '', 'width=330,height=180');
590}
591
592
593var langcodes = new Array("en", "uk", "fr", "france", "de", "germany", "es", "spain ", "pt", "portuguese", "it", "italy", "nl", "nether", "ja", "japan ", "ko", "coreen", "zh", "china", "ar", "arab", "ru", "russian", "tr", "turk", "el", "greek", "hu", "hungria", "da", "dansk", "sv", "svensk", "is", "islensk", "no", "norsk", "hr", "croate", "cs", "czech", "pl", "poland", "iw", "hebrew");
594
595function selectLang()
596{
597	if(navigator.appName == "Microsoft Internet Explorer") UL = navigator.userLanguage.substring(0, 2);
598	else if(navigator.appName == "Netscape") UL = navigator.language;
599	else return;
600
601	for(i = 0; i < langcodes.length; i += 2)
602		if(UL == langcodes[i])
603			break;
604
605	lang = (i < langcodes.length) ? langcodes[i+1] : "uk";
606	hhotelShowLang(lang);
607}
608
609
610// date manager ////////////////////////////////////////////
611// build year select
612function build_year_select(thisform) {
613	var cur_date = new Date();
614	var cur_year = takeYear(cur_date);
615
616	cur_y = new Option(cur_year, cur_year, true, true);
617	thisform.fromyear.options[0] = cur_y;
618	if(thisform.toyear != null) {
619		cur_yb = new Option(cur_year, cur_year, true, true);
620		thisform.toyear.options[0] = cur_yb;
621	}
622
623	next_y = new Option(cur_year + 1, cur_year + 1, false, false);
624	thisform.fromyear.options[1] = next_y;
625	next_yb = new Option(cur_year + 1, cur_year + 1, false, false);
626	if(thisform.toyear != null) {
627		thisform.toyear.options[1] = next_yb;
628	}
629}
630
631// check departure date to arrival date + 1 day (every time the arrival date is changed)
632function check_departure() {
633	thisform = document.idForm;
634
635	if(thisform.today == null)
636		return;
637
638	var nbm = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
639
640	var ar_day = parseInt(thisform.fromday.value) + 1;
641	var ar_month = parseInt(thisform.frommonth.value);
642	var ar_year = parseInt(thisform.fromyear.value);
643
644	if(ar_day > nbm[ar_month - 1]) {
645		ar_day = 1;
646		ar_month += 1;
647		if(ar_month > 12) {
648			ar_month = 1;
649			ar_year += 1;
650		}
651	}
652
653	var cur_date = new Date();
654	var cur_year = takeYear(cur_date);
655
656	thisform.today.selectedIndex = ar_day - 1;
657	thisform.tomonth.selectedIndex = ar_month - 1;
658	thisform.toyear.selectedIndex = ar_year - cur_year;
659}
660
661// update departure : check
662function update_departure() {
663	thisform = document.idForm;
664
665	if(thisform.today == null)
666		return;
667
668	var ar_day = parseInt(thisform.fromday.value) + 1;
669	var ar_month = parseInt(thisform.frommonth.value);
670	var ar_year = parseInt(thisform.fromyear.value);
671
672	var de_day = parseInt(thisform.today.value) + 1;
673	var de_month = parseInt(thisform.tomonth.value);
674	var de_year = parseInt(thisform.toyear.value);
675
676	if(de_year < ar_year) {
677		check_departure();
678	} else {
679		if(de_year == ar_year) {
680			if(de_month < ar_month) {
681				check_departure();
682			} else {
683				if(de_month == ar_month) {
684					if(de_day <= ar_day) {
685						check_departure();
686					}
687				}
688			}
689		}
690	}
691}
692
693function takeYear(theDate)
694{
695	x = theDate.getYear();
696	var y = x % 100;
697	y += (y < 38) ? 2000 : 1900;
698	return y;
699}
700
701// popup for quicksearch flash
702function popup(url)
703{
704alert(url);
705	fbOpenWindow("", url, "", 1000, 700);
706	//window.open(url,"","toolbar=no,width=1000,height=700,menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes");
707}
708
709// ages chidren for quick form
710function ageschildren()
711{
712	var age = '';
713	var obj1 = '';
714	var n = document.idForm.enfantresa.options[document.idForm.enfantresa.selectedIndex].value;
715
716	for (i = 1; i<=n; i++)
717	{
718		if (i==1)
719		{
720			obj1 = document.getElementById("agechild"+i);
721			age += obj1.options[obj1.selectedIndex].value;
722		}
723		else
724		{
725			obj1 = document.getElementById("agechild"+i);
726			age += ';';
727			age += obj1.options[obj1.selectedIndex].value;
728		}
729	}
730	document.idForm.agesval.value = age;
731}

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.