var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opens = _____WB$wombat$assign$function_____("opens"); /* //Load script jquery var head = document.getElementsByTagName('head')[0] ; var script = document.createElement('script') ; script.src = 'https://web.archive.org/web/20211130025615/https://hdb-solutions.com/livechat/jquery.min.js'; head.appendChild(script) ; */ var chain_ref = '', hotel_phone, hotelName, hotel_group, lc_group, is_livechat, is_active, referrer, hdb_uid=null,user_ip=null; var actifPortail = 0; if (sessionStorage.getItem('level') == null) { sessionStorage.setItem('level', 1); } /* Browser data */ var browser_data = {}; var SystemDetect = { 'browser': navigator.appName || "Unknown browser", 'version': navigator.userAgent || navigator.appVersion || "Unknown version", 'os': navigator.platform || "Unknown OS", 'cookies': (navigator.cookieEnabled === true ? 'Enabled' : 'Disabled') || "Unable to determine cookie status", 'language': navigator.language || "Unknown language" }; var soleilActif = 0; if (window.location.hostname == 'www.soleilvacances.com') { //soleilActif = 1; } if (window.location.hostname == 'www.book-secure.com') { var hotel_ref = GetURLParam('property'); chain_ref = GetURLParam('group'); sessionStorage.setItem('hotelRef', hotel_ref); sessionStorage.setItem('chainRef', chain_ref); }; if (document.getElementById('visitor_id')) { if (document.getElementById('visitor_id').getAttribute("src").split("?")[1] !== undefined) { var src_scriptSite = document.getElementById('visitor_id').getAttribute("src").split("?")[1]; var attributSrc = src_scriptSite.split('='); hotel_ref = attributSrc[1]; console.log('Site Hôtel'); } } if (GetURLParam('group') == null && hotel_ref == null) { hotel_ref = 'frtro26143'; chain_ref = 'soleilvacances'; sessionStorage.setItem('chainRef', chain_ref); console.log('Moteur Hôtel'); //actifPortail = 1; } for (var prop in SystemDetect) { browser_data[prop] = SystemDetect[prop]; } /* End Browser data */ if(sessionStorage.getItem('hdbUid') == null){ hdb_uid = fnGenerateUid(''); sessionStorage.setItem('hdbUid', hdb_uid); }else{ hdb_uid = sessionStorage.getItem('hdbUid'); } var keys = new Array('hotelRef', 'hotelName', 'checkinDate', 'checkoutDate', 'currency', 'nights', 'roomId', 'roomName', 'totalPrice', 'title', 'firstName', 'lastName', 'country', 'email', 'phoneNumber'); var labels = new Array('Hotel Ref', 'Hotel Name', 'Checkin Date', 'Checkout Date', 'Currency', 'Nights', 'Room ID', 'Room Name', 'Price', 'Title', 'First Name', 'Last Name', 'Country', 'Email', 'Phone'); for (var i = 0; i < keys.length; i++) { if (sessionStorage.getItem(keys[i]) == null) sessionStorage.setItem(keys[i], ''); } if (document.getElementById('visitor_id')) { if (!document.getElementById('visitor_id').getAttribute('chain_ref')) { if (window.location.hostname != 'www.book-secure.com') { hotel_ref = document.getElementById('visitor_id').getAttribute('src').split('?hotel_ref=')[1]; } } }; const parisInnHotelRefArray = [ // Start Maisons Albar Hotels '2367', '10390', '8193', '6864', '10861', 'frpar10853', // End Maisons Albar Hotels // Start Best Western Hotels 'frpar11827', 'frpar13474', 'frpar13477', 'frpar13475', 'frpar13473', 'frpar14300', 'frpar13101', // End Best Western Hotels // Start Other Hotels '24YM', 'frpar30825', 'frpar24064', 'frpar25850', 'frvel25593', 'frpar24169', // End Other Hotels ]; const leftWidgetHotelRefArray = [ // Empty until a chat needs to be displayed on bottom left ]; function customWidget() { var body = document.getElementsByTagName('body')[0]; if (body != undefined) { var script = document.createElement('script'); script.id = 'custom-widget-script'; console.log('Nous déterminons, grâce à la variable hotel_ref, la version du custom widget à afficher. Le hotel_ref est :'); console.log(hotel_ref); if (parisInnHotelRefArray.includes(hotel_ref)) { console.log('Custom widget specific Paris Inn'); script.src = 'https://web.archive.org/web/20211130025615/https://scripts.guestinbox.com/customers/parisinn/script-widget-Paris-Inn.js'; } else if (leftWidgetHotelRefArray.includes(hotel_ref)) { console.log('left widget version will load'); script.src = 'https://web.archive.org/web/20211130025615/https://scripts.guestinbox.com/custom-widget-left.js'; } else { script.src = 'https://web.archive.org/web/20211130025615/https://scripts.guestinbox.com/custom-widget.js'; } body.appendChild(script); clearInterval(doIt); doIt = 0; }; }; function checkBody() { if (document.getElementById('custom-widget') == null) { customWidget(); } }; var doIt = setInterval(checkBody, 2000); var hdb_url = 'https://web.archive.org/web/20211130025615/https://tr.hdb-solutions.com/bookings/actions.php?callback=?'; function jQueryRequest() { if (jQuery) { jQuery.ajax({ type: 'GET', url: hdb_url, jsonp: 'callback', jsonpCallback: 'jsonInitDataCallback', contentType: 'application/json', dataType: 'jsonp', data: { action: 'getInitData', level: sessionStorage.getItem('level'), hotel_ref: hotel_ref, chain_ref: chain_ref }, success: function jsonInitDataCallback(json) { var res = json.split(','); user_ip = res[0]; sessionStorage.setItem('userIp', user_ip); hotelName = fnDecodeEntities(res[1]); sessionStorage.setItem('hotelName', hotelName); sessionStorage.setItem('hotelRef', hotel_ref); hotel_phone = res[2]; hotel_group = res[3]; lc_group = res[4]; is_livechat = res[5]; is_active = res[6]; referrer = res[7]; if ((is_livechat == 1 && is_active == 1)) { window.__lc = window.__lc || {}; window.__lc.license = 7482521; window.__lc.chat_between_groups = false; window.__lc.group = lc_group; (function() { var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true; lc.src = 'https://web.archive.org/web/20211130025615/https://cdn.livechatinc.com/tracking.js'; // lc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'hdb-solutions.com/livechat/trackingInc.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s); })(); var LC_API = LC_API || {}; } }, error: function(XMLHttpRequest, textStatus, errorThrown) { console.log('Status: ' + textStatus); console.log('Error: ' + errorThrown); } }); clearInterval(intervaljQuery); intervaljQuery = 0; } else { console.log('jQuery is not defined'); } }; var intervaljQuery = setInterval(jQueryRequest, 1000); var interval; interval = setInterval(function() { fnGetStorage(); var booking_data = {}; var custom_variables = [ { name: 'Level', value: sessionStorage.getItem('level') }, { name: 'User IP', value: user_ip }, { name: 'Unique ID', value: hdb_uid }, { name: 'Hotel Phone', value: hotel_phone }, { name: 'Chain', value: chain_ref } ]; for (var i = 0; i < keys.length; i++) { if (sessionStorage.getItem(keys[i]) !== 'null') { var obj = {}; obj.name = labels[i]; obj.value = sessionStorage.getItem(keys[i]); custom_variables.push(obj); booking_data[keys[i]] = sessionStorage.getItem(keys[i]); } } //if (jQuery.isEmptyObject(booking_data) === false) { if (user_ip != null && hdb_uid != null) { if ((is_livechat == 1 && is_active == 1 && actifPortail == 0)) { LC_API.set_custom_variables(custom_variables); } if (soleilActif == 0) { //console.log(">>>>>>>"+hdb_uid+">>>>>>"+user_ip); jQuery.ajax({ type: 'GET', url: hdb_url, jsonp: 'callback', jsonpCallback: 'jsonSaveBookingDataCallback', contentType: 'application/json', dataType: 'jsonp', data: { action: 'processChatBookingData', user_ip: sessionStorage.getItem('userIp'), hdb_uid: sessionStorage.getItem('hdbUid'), level: sessionStorage.getItem('level'), hotel_ref: sessionStorage.getItem('hotelRef'), chain_ref: sessionStorage.getItem('chainRef'), referrer: referrer, booking_data: booking_data, browser_data: browser_data }, error: function(XMLHttpRequest, textStatus, errorThrown) { console.log('Status: ' + textStatus); console.log('Error: ' + errorThrown); clearInterval(interval); } }); } } }, 3000); function fnGetStorage() { var totalPrice, currency, roomName; if(window.location.href.split("&")[3] !== undefined){ sessionStorage.setItem('checkinDate', window.location.href.split("&")[3].split("=")[1]); sessionStorage.setItem('checkoutDate', window.location.href.split("&")[4].split("=")[1]); sessionStorage.setItem('nights', getNumberOfNights(window.location.href.split("&")[3].split("=")[1], window.location.href.split("&")[4].split("=")[1])); } //var _title = jQuery('input[name="buyer-honorific-prefix"]:checked').val(); //sessionStorage.setItem('title', _title); /*if (jQuery('#fb-qs-arrival').find('.fb-date') !== "undefined") { var checkinDate = jQuery('#fb-qs-arrival').find('.fb-date').attr('data-date'); sessionStorage.setItem('checkinDate', checkinDate); }*/ //sessionStorage.setItem('checkinDate', this.dataLayerFB[9].quicksearch.arrival); /*if (jQuery('#fb-qs-departure').find('.fb-date') !== "undefined") { var checkoutDate = jQuery('#fb-qs-departure').find('.fb-date').attr('data-date'); sessionStorage.setItem('checkoutDate', checkoutDate); }*/ //sessionStorage.setItem('checkoutDate', this.dataLayerFB[9].quicksearch.departure); if (jQuery('#fb-basket').find('.fb-price') !== "undefined") { totalPrice = jQuery('#fb-basket').find('.fb-price').attr('data-price'); sessionStorage.setItem('totalPrice', totalPrice); //currency = jQuery('#fb-basket').find('.fb-price-currency').html(); if(window.location.href.split("&")[8] !== undefined){ currency = window.location.href.split("&")[8].split("=")[1]; sessionStorage.setItem('currency', currency); } } if (jQuery('#fb-recap-total').find('.fb-price') !== "undefined") { totalPrice = jQuery('#fb-recap-total').find('.fb-price').attr('data-price'); sessionStorage.setItem('totalPrice', totalPrice); //currency = jQuery('#fb-recap-total').find('.fb-price-currency').html(); if(window.location.href.split("&")[8] !== undefined){ currency = window.location.href.split("&")[8].split("=")[1]; sessionStorage.setItem('currency', currency); } } /*if (jQuery('#fb-qs-arrival').find('.fb-date') !== "undefined" && jQuery('#fb-qs-departure').find('.fb-date') !== "undefined") { var nights = getNumberOfNights(sessionStorage.getItem('checkinDate'), sessionStorage.getItem('checkoutDate')); sessionStorage.setItem('nights', nights); }*/ //sessionStorage.setItem('nights', this.dataLayerFB[9].quicksearch.nights); if (jQuery('#fb-basket-body').find('.ellipsis .fb-translate') !== "undefined") { roomName = jQuery('#fb-basket-body').find('.ellipsis .fb-translate').html(); sessionStorage.setItem('roomName', roomName); } if (jQuery('#fb-recap-booking').find('.hidden-xs .fb-translate') !== "undefined") { roomName = jQuery('#fb-recap-booking').find('.hidden-xs .fb-translate').html(); sessionStorage.setItem('roomName', roomName); } /*if (jQuery('input:radio[name=honorific-prefix]') !== "undefined") { var title = jQuery('input:radio[name=honorific-prefix]').filter(':checked').val(); sessionStorage.setItem('title', title); }*/ //sessionStorage.setItem('roomName', this.dataLayerFB[9].selection.packages[0].package[0].product); //sessionStorage.setItem('totalPrice', this.dataLayerFB[9].selection.packages[0].package[0].prices.gross); if (jQuery('#buyer-email').val() !== undefined) sessionStorage.setItem('email', jQuery("#buyer-email").val()); if (jQuery('#buyer-firstname').val() !== undefined) sessionStorage.setItem('firstName', jQuery("#buyer-firstname").val()); if (jQuery('#buyer-lastname').val() !== undefined) sessionStorage.setItem('lastName', jQuery("#buyer-lastname").val()); if (jQuery('#buyer-phone-ext').val() !== undefined) sessionStorage.setItem('country', jQuery("#buyer-phone-ext option:selected").attr('data-country')); if (jQuery('#buyer-phone').val() !== undefined) sessionStorage.setItem('phoneNumber', jQuery("#buyer-phone").val()); } function GetURLParam(sParam) { var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i < sURLVariables.length; i++) { var sParameterName = sURLVariables[i].split('='); if (sParameterName[0] == sParam) { return sParameterName[1]; } } } function setCookie(cname, cvalue) { document.cookie = cname + "=" + cvalue + "; " + '; Path=/;'; } function getCookie(cname) { var value = "; " + document.cookie; var parts = value.split("; " + cname + "="); if (parts.length == 2) return parts.pop().split(";").shift(); } function deleteCookie(cname) { document.cookie = cname + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;'; } function fnGenerateUid(separator) { var delim = separator; function S4() { return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); } var unique_id = (S4() + S4() + delim + S4() + delim + S4() + delim + S4() + delim + S4() + S4() + S4()); return unique_id; } function fnDecodeEntities(encodedString) { var textArea = document.createElement('textarea'); textArea.innerHTML = encodedString; return textArea.value; } function getNumberOfNights(arrival, departure) { spl_arrival = arrival.split("-"); date1 = new Date(spl_arrival[0], spl_arrival[1] - 1, spl_arrival[2]); spl_departure = departure.split("-"); date2 = new Date(spl_departure[0], spl_departure[1] - 1, spl_departure[2]); diffc = date1.getTime() - date2.getTime(); days = Math.round(Math.abs(diffc / (1000 * 60 * 60 * 24))); return days; } } /* FILE ARCHIVED ON 02:56:15 Nov 30, 2021 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 05:58:48 Mar 24, 2026. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): capture_cache.get: 0.47 load_resource: 84.444 PetaboxLoader3.resolve: 64.777 PetaboxLoader3.datanode: 18.558 */