PageSourceSearch

https://www.target-nehberg.de/libraries/tarteaucitron/tarteaucitron.js?v=1

js target-nehberg.de collected 2026-10-02 12:00:37 UTC 63,430 bytes, 1,319 lines download raw bytes

1/*jslint browser: true, evil: true */
2
3// define correct path for files inclusion
4var scripts = document.getElementsByTagName('script'),
5    path = scripts[scripts.length - 1].src.split('?')[0],
6    cdn = path.split('/').slice(0, -1).join('/') + '/',
7    alreadyLaunch = (alreadyLaunch === undefined) ? 0 : alreadyLaunch,
8    tarteaucitronForceLanguage = (tarteaucitronForceLanguage === undefined) ? '' : tarteaucitronForceLanguage,
9    tarteaucitronForceExpire = (tarteaucitronForceExpire === undefined) ? '' : tarteaucitronForceExpire,
10    timeExipre = 31536000000,
11    tarteaucitronProLoadServices,
12    tarteaucitronNoAdBlocker = false;
13
14var tarteaucitron = {
15    "version": 323,
16    "cdn": cdn,
17    "user": {},
18    "lang": {},
19    "services": {},
20    "added": [],
21    "idprocessed": [],
22    "state": [],
23    "launch": [],
24    "parameters": {},
25    "isAjax": false,
26    "reloadThePage": false,
27    "init": function (params) {
28        "use strict";
29        var origOpen;
30        
31        tarteaucitron.parameters = params;
32        if (alreadyLaunch === 0) {
33            alreadyLaunch = 1;
34            if (window.addEventListener) {
35                window.addEventListener("load", function () {
36                    tarteaucitron.load();
37                    tarteaucitron.fallback(['tarteaucitronOpenPanel'], function (elem) {
38                        elem.addEventListener("click", function (event) {
39                            tarteaucitron.userInterface.openPanel
39();
40                            event.preventDefault();
41                        }, false);
42                    }, true);
43                }, false);
44                window.addEventListener("scroll", function () {
45                    var scrollPos = window.pageYOffset || document.documentElement.scrollTop,
46                        heightPosition;
47                    if (document.getElementById('tarteaucitronAlertBig') !== null && !tarteaucitron.highPrivacy) {
48                        if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') {
49                            heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px';
50                            
51                            if (scrollPos > (screen.height * 2)) {
52                                tarteaucitron.userInterface.respondAll(true);
53                            } else if (scrollPos > (screen.height / 2)) {
54                                //document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '<b 2>' + tarteaucitron.lang.alertBigScroll + '</b> ' + tarteaucitron.lang.alertBig;
55                            }
56                            
57                            if (tarteaucitron.orientation === 'top') {
58                                document.getElementById('tarteaucitronPercentage').style.top = heightPosition;
59                                
60                            } else {
61                                document.getElementById('tarteaucitronPercentage').style.bottom = heightPosition;
62                                
63                            }
64                            document.getElementById('tarteaucitronPercentage').style.width = ((100 / (screen.height * 2)) * scrollPos) + '%';
65                            
66                        }
67                    }
68                }, false);
69                window.addEventListener("keydown", function (evt) {
70                    if (evt.keyCode === 27) {
71                        tarteaucitron.userInterface.closePanel();
72                    }
73                }, false);
74                window.addEventListener("hashchange", function () {
75                    if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') {
76                        tarteaucitron.userInterface.openPanel();
77                    }
78                }, false);
79                window.addEventListener("resize", function () {
80                    if (document.getElementById('tarteaucitron') !== null) {
81                        if (document.getElementById('tarteaucitron').style.display === 'block') {
82                            tarteaucitron.userInterface.jsSizing('main');
83                        }
84                    }
85                    
86                    if (document.getElementById('tarteaucitronCookiesListContainer') !== null) {
87                        if (document.getElementById('tarteaucitronCookiesListContainer').style.display === 'block') {
88                            tarteaucitron.userInterface.jsSizing('cookie');
89                        }
90                    }
91                }, false);
92            } else {
93                window.attachEvent("onload", function () {
94                    tarteaucitron.load();
95                    tarteaucitron.fallback(['tarteaucitronOpenPanel'], function (elem) {
96                        elem.attachEvent("onclick", function (event) {
97                            tarteaucitron.userInterface.openPanel
97();
98                            event.preventDefault();
99                        });
100                    }, true);
101                });
102                window.attachEvent("onscroll", function () {
103                    var scrollPos = window.pageYOffset || document.documentElement.scrollTop,
104                        heightPosition;
105                    if (document.getElementById('tarteaucitronAlertBig') !== null && !tarteaucitron.highPrivacy) {
106                        if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') {
107                            heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px';
108                            
109                            if (scrollPos > (screen.height * 2)) {
110                                tarteaucitron.userInterface.respondAll(true);
111                            } else if (scrollPos > (screen.height / 2)) {
112                                document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '<b 3>' + tarteaucitron.lang.alertBigScroll + '</b> ' + tarteaucitron.lang.alertBig;
113                            }
114                            if (tarteaucitron.orientation === 'top') {
115                                document.getElementById('tarteaucitronPercentage').style.top = heightPosition;
116                                console.log("67");
117                            } else {
118                                document.getElementById('tarteaucitronPercentage').style.bottom = heightPosition;
119                                 console.log("68");
120                            }
121                            document.getElementById('tarteaucitronPercentage').style.width = ((100 / (screen.height * 2)) * scrollPos) + '%';
122                            console.log("69");
123                        }
124                    }
125                });
126                window.attachEvent("onkeydown", function (evt) {
127                    if (evt.keyCode === 27) {
128                        tarteaucitron.userInterface.closePanel();
129                    }
130                });
131                window.attachEvent("onhashchange", function () {
132                    if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') {
133                        tarteaucitron.userInterface.openPanel();
134                    }
135                });
136                window.attachEvent("onresize", function () {
137                    if (document.getElementById('tarteaucitron') !== null) {
138                        if (document.getElementById('tarteaucitron').style.display === 'block') {
139                            tarteaucitron.userInterface.jsSizing('main');
140                        }
141                    }
142                    
143                    if (document.getElementById('tarteaucitronCookiesListContainer') !== null) {
144                        if (document.getElementById('tarteaucitronCookiesListContainer').style.display === 'block') {
145                            tarteaucitron.userInterface.jsSizing('cookie');
146                        }
147                    }
148                });
149            }
150            
151            if (typeof XMLHttpRequest !== 'undefined') {
152                origOpen = XMLHttpRequest.prototype.open;
153                XMLHttpRequest.prototype.open = function () {
154                    
155                    if (window.addEventListener) {
156                        this.addEventListener("load", function () {
157                            if (typeof tarteaucitronProLoadServices === 'function') {
158                                tarteaucitronProLoadServices();
159                            }
160                        }, false);
161                    } else if (typeof this.attachEvent !== 'undefined') {
162                        this.attachEvent("onload", function () {
163                            if (typeof tarteaucitronProLoadServices === 'function') {
164                                tarteaucitronProLoadServices();
165                            }
166                        });
167                    } else {
168                        if (typeof tarteaucitronProLoadServices === 'function') {
169                            setTimeout(tarteaucitronProLoadServices, 1000);
170                        }
171                    }
172                    
173                    try {
174                        origOpen.apply(this, arguments);
175                    } catch (err) {}
176                };
177            }
178        }
179    },
180    "load": function () {
181        "use strict";
182        var cdn = tarteaucitron.cdn,
183            language = tarteaucitron.getLanguage(),
184            pathToLang = cdn + 'lang/tarteaucitron.' + language + '.js?v=' + tarteaucitron.version,
185            pathToServices = cdn + 'tarteaucitron.services.js?v=' + tarteaucitron.version,
186            linkElement = document.createElement('link'),
187            defaults = {
188                "adblocker": false,
189                "hashtag": '#tarteaucitron',
190                "highPrivacy": false,
191                "orientation": "top",
192                "removeCredit": false,
193                "showAlertSmall": true,
194                "cookieslist": true,
195                "handleBrowserDNTRequest": false
196            },
197            params = tarteaucitron.parameters;
198        
199        // Step 0: get params
200        if (params !== undefined) {
201            tarteaucitron.extend(defaults, params);
202        }
203        
204        // global
205        tarteaucitron.orientation = defaults.orientation;
206        tarteaucitron.hashtag = defaults.hashtag;
207        tarteaucitron.highPrivacy = defaults.highPrivacy;
208        tarteaucitron.handleBrowserDNTRequest = defaults.handleBrowserDNTRequest;
209
210        // Step 1: load css
211        linkElement.rel = 'stylesheet';
212        linkElement.type = 'text/css';
213        linkElement.href = cdn + 'css/tarteaucitron.css?v=' + tarteaucitron.version;
214        document.getElementsByTagName('head')[0].appendChild(linkElement);
215
216        // Step 2: load language and services
217        tarteaucitron.addScript(pathToLang, '', function () {
218            tarteaucitron.addScript(pathToServices, '', function () {
219
220                var body = document.body,
221                    div = document.createElement('div'),
222                    html = '',
223                    index,
224                    orientation = 'Top',
225                    cat = ['ads', 'analytic', 'api', 'comment', 'social', 'support', 'video', 'other'],
226                    i;
227                
228                cat = cat.sort(function (a, b) {
229                    if (tarteaucitron.lang[a].title > tarteaucitron.lang[b].title) { return 1; }
230                    if (tarteaucitron.lang[a].title < tarteaucitron.lang[b].title) { return -1; }
231                    return 0;
232                });
233
234                // Step 3: prepare the html
235                html += '<div id="tarteaucitronPremium"></div>';
236                html += '<div id="tarteaucitronBack" onclick="tarteaucitron.userInterface.closePanel();"></div>';
237                html += '<div id="tarteaucitron">';
238                html += '   <div id="tarteaucitronClosePanel" onclick="tarteaucitron.userInterface.closePanel();">';
239                html += '       ' + tarteaucitron.lang.close;
240                html += '   </div>';
241                html += '   <div id="tarteaucitronServices">';
242                html += '      <div class="tarteaucitronLine tarteaucitronMainLine" id="tarteaucitronMainLineOffset">';
243                html += '         <div class="tarteaucitronName">';
244                html += '            <b><a href="#" onclick="tarteaucitron.userInterface.toggle(\'tarteaucitronInfo\', \'tarteaucitronInfoBox\');return false">&#10011;</a> ' + tarteaucitron.lang.all + '</b>';
245                html += '         </div>';
246                html += '         <div class="tarteaucitronAsk" id="tarteaucitronScrollbarAdjust">';
247                html += '            <div id="tarteaucitronAllAllowed" class="tarteaucitronAllow" onclick="tarteaucitron.userInterface.respondAll(true);">';
248                html += '               &#10003; ' + tarteaucitron.lang.allow;
249                html += '            </div> ';
250                html += '            <div id="tarteaucitronAllDenied" class="tarteaucitronDeny" onclick="tarteaucitron.userInterface.respondAll(false);">';
251                html += '               &#10007; ' + tarteaucitron.lang.deny;
252                html += '            </div>';
253                html += '         </div>';
254                html += '      </div>';
255                html += '      <div id="tarteaucitronInfo" class="tarteaucitronInfoBox">';
256                html += '         ' + tarteaucitron.lang.disclaimer;
257                if (defaults.removeCredit === false) {
258                    html += '        <br/><br/>';
259                    html += '        <a href="https://opt-out.ferank.eu/" rel="nofollow" target="_blank" rel="noopener">' + tarteaucitron.lang.credit + '</a>';
260                }
261                html += '      </div>';
262                html += '      <div class="tarteaucitronBorder" id="tarteaucitronScrollbarParent">';
263                html += '         <div class="clear"></div>';
264                for (i = 0; i < cat.length; i += 1) {
265                    html += '         <div id="tarteaucitronServicesTitle_' + cat[i] + '" class="tarteaucitronHidden">';
266                    html += '            <div class="tarteaucitronTitle">';
267                    html += '               <a href="#" onclick="tarteaucitron.userInterface.toggle(\'tarteaucitronDetails' + cat[i] + '\', \'tarteaucitronInfoBox\');return false">&#10011;</a> ' + tarteaucitron.lang[cat[i]].title;
268                    html += '            </div>';
269                    html += '            <div id="tarteaucitronDetails' + cat[i] + '" class="tarteaucitronDetails tarteaucitronInfoBox">';
270                    html += '               ' + tarteaucitron.lang[cat[i]].details;
271                    html += '            </div>';
272                    html += '         </div>';
273                    html += '         <div id="tarteaucitronServices_' + cat[i] + '"></div>';
274                }
275                html += '         <div class="tarteaucitronHidden" id="tarteaucitronScrollbarChild" style="height:20px;
275display:block"></div>';
276                html += '       </div>';
277                html += '   </div>';
278                html += '</div>';
279                
280                if (defaults.orientation === 'bottom') {
281                    orientation = 'Bottom';
282                }
283                
284                if (defaults.highPrivacy) {
285                    html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
286                    html += '   <span id="tarteaucitronDisclaimerAlert">';
287                    html += '       ' + tarteaucitron.lang.alertBigPrivacy;
288                    html += '   </span>';
289                    html += '   <span id="tarteaucitronPersonalize" onclick="tarteaucitron.userInterface.openPanel();">';
290                    html += '       ' + tarteaucitron.lang.personalize;
291                    html += '   </span>';
292                    html += '</div>';
293                } else {
294                    html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '"><h2>Wir verwenden Cookies</h2>';
295                    html += '   <span id="tarteaucitronDisclaimerAlert">';
296                    html += '       <p class="cookie_text">' + 'Um unsere Website für Sie optimal zu gestalten und fortlaufend verbessern zu können, verwenden wir Cookies.<br/>Durch die weitere Nutzung der Website stimmen Sie der Verwendung von Cookies zu.';
297                    html += '   </p></span>';
298                    
299                    html += '   <div class="left_cookei_btn"><span id="tarteaucitronCloseAlert" onclick="tarteaucitron.userInterface.openPanel
299();">';
300                    html += '       ' + 'Personalisieren';
301                    html += '   </span>';
302
303                    html += '   <span id="tarteaucitronPersonalize" onclick="tarteaucitron.userInterface.respondAll(true);">';
304                    html += '       &#10003; ' + 'OK, weiter';
305                    html += '   </span></div><div class="cookielnk"><p class="cookie_links"><a href="/de/datenschutz">Datenschutzerklärung</a> <a href="/de/impressum">Impressum</a></p></div>';
306
307
308
309                    html += '</div>';
310                    html += '<div id="tarteaucitronPercentage"></div>';
311                }
312                
313                if (defaults.showAlertSmall === true) {
314                    html += '<div id="tarteaucitronAlertSmall" class="tarteaucitronAlertSmall' + orientation + '">';
315                    html += '   <div id="tarteaucitronManager" onclick="tarteaucitron.userInterface.openPanel();">';
316                    html += '       ' + tarteaucitron.lang.alertSmall;
317                    html += '       <div id="tarteaucitronDot">';
318                    html += '           <span id="tarteaucitronDotGreen"></span>';
319                    html += '           <span id="tarteaucitronDotYellow"></span>';
320                    html += '           <span id="tarteaucitronDotRed"></span>';
321                    html += '       </div>';
322                    if (defaults.cookieslist === true) {
323                        html += '   </div><!-- @whitespace';
324                        html += '   --><div id="tarteaucitronCookiesNumber" onclick="tarteaucitron.userInterface.toggleCookiesList();">0</div>';
325                        html += '   <div id="tarteaucitronCookiesListContainer">';
326                        html += '       <div id="tarteaucitronClosePanelCookie" onclick="tarteaucitron.userInterface.closePanel();">';
327                        html += '           ' + tarteaucitron.lang.close;
328                        html += '       </div>';
329                        html += '       <div class="tarteaucitronCookiesListMain" id="tarteaucitronCookiesTitle">';
330                        html += '            <b id="tarteaucitronCookiesNumberBis">0 cookie</b>';
331                        html += '       </div>';
332                        html += '       <div id="tarteaucitronCookiesList"></div>';
333                        html += '    </div>';
334                    } else {
335                        html += '   </div>';
336                    }
337                    html += '</div>';
338                }
339                
340                tarteaucitron.addScript(tarteaucitron.cdn + 'advertising.js?v=' + tarteaucitron.version, '', function () {
341                    if (tarteaucitronNoAdBlocker === true || defaults.adblocker === false) {
342                        div.id = 'tarteaucitronRoot';
343                        body.appendChild(div, body);
344                        div.innerHTML = html;
345
346                        if (tarteaucitron.job !== undefined) {
347                            tarteaucitron.job = tarteaucitron.cleanArray(tarteaucitron.job);
348                            for (index = 0; index < tarteaucitron.job.length; index += 1) {
349                                tarteaucitron.addService(tarteaucitron.job[index]);
350                            }
351                        } else {
352                            tarteaucitron.job = []
353                        }
354                
355                        tarteaucitron.isAjax = true;
356
357                        tarteaucitron.job.push = function (id) {
358
359                            // ie <9 hack
360                            if (typeof tarteaucitron.job.indexOf === 'undefined') {
361                                tarteaucitron.job.indexOf = function (obj, start) {
362                                    var i,
363                                        j = this.length;
364                                    for (i = (start || 0); i < j; i += 1) {
365                                        if (this[i] === obj) { return i; }
366                                    }
367                                    return -1;
368                                };
369                            }
370
371                            if (tarteaucitron.job.indexOf(id) === -1) {
372                                Array.prototype.push.call(this, id);
373                            }
374                            tarteaucitron.launch[id] = false;
375                            tarteaucitron.addService(id);
376                        };
377                
378                        if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') {
379                            tarteaucitron.userInterface.openPanel();
380                        }
381                
382                        tarteaucitron.cookie.number();
383                        setInterval(tarteaucitron.cookie.number, 60000);
384                    }
385                }, defaults.adblocker);
386                
387                if (defaults.adblocker === true) {
388                    setTimeout(function () {
389                        if (tarteaucitronNoAdBlocker === false) {
390                            html = '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '" style="display:block">';
391                            html += '   <span id="tarteaucitronDisclaimerAlert">';
392                            html += '       ' + tarteaucitron.lang.adblock + '<br/>';
393                            html += '       <b 1>' + tarteaucitron.lang.adblock_call + '</b>';
394                            html += '   </span>';
395                            html += '   <span id="tarteaucitronPersonalize" onclick="location.reload();">';
396                            html += '       ' + tarteaucitron.lang.reload;
397                            html += '   </span>';
398                            html += '</div>';
399                            html += '<div id="tarteaucitronPremium"></div>';
400                            div.id = 'tarteaucitronRoot';
401                            body.appendChild(div, body);
402                            div.innerHTML = html;
403                            tarteaucitron.pro('!adblocker=true');
404                        } else {
405                            tarteaucitron.pro('!adblocker=false');
406                        }
407                    }, 1500);
408                }
409            });
410        });
411    },
412    "addService": function (serviceId) {
413        "use strict";
414        var html = '',
415            s = tarteaucitron.services,
416            service = s[serviceId],
417            cookie = tarteaucitron.cookie.read(),
418            hostname = document.location.hostname,
419            hostRef = document.referrer.split('/')[2],
420            isNavigating = (hostRef === hostname) ? true : false,
421            isAutostart = (!service.needConsent) ? true : false,
422            isWaiting = (cookie.indexOf(service.key + '=wait') >= 0) ? true : false,
423            isDenied = (cookie.indexOf(service.key + '=false') >= 0) ? true : false,
424            isAllowed = (cookie.indexOf(service.key + '=true') >= 0) ? true : false,
425            isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0) ? true : false,
426            isDNTRequested = (navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1" || window.doNotTrack === "1") ? true : false;
427
428        if (tarteaucitron.added[service.key] !== true) {
429            tarteaucitron.added[service.key] = true;
430            
431            html += '<div id="' + service.key + 'Line" class="tarteaucitronLine">';
432            html += '   <div class="tarteaucitronName">';
433            html += '       <b>' + service.name + '</b><br/>';
434            html += '       <span id="tacCL' + service.key + '" class="tarteaucitronListCookies"></span><br/>';
435            html += '       <a href="https://opt-out.ferank.eu/service/' + service.key + '/" target="_blank" rel="noopener">';
436            html += '           ' + tarteaucitron.lang.more;
437            html += '       </a>';
438            html += '        - ';
439            html += '       <a href="' + service.uri + '" target="_blank" rel="noopener">';
440            html += '           ' + tarteaucitron.lang.source;
441            html += '       </a>';
442            html += '   </div>';
443            html += '   <div class="tarteaucitronAsk">';
444            html += '       <div id="' + service.key + 'Allowed" class="tarteaucitronAllow" onclick="tarteaucitron.userInterface.respond(this, true);">';
445            html += '           &#10003; ' + tarteaucitron.lang.allow;
446            html += '       </div> ';
447            html += '       <div id="' + service.key + 'Denied" class="tarteaucitronDeny" onclick="tarteaucitron.userInterface.respond(this, false);">';
448            html += '           &#10007; ' + tarteaucitron.lang.deny;
449            html += '       </div>';
450            html += '   </div>';
451            html += '</div>';
452           
453            tarteaucitron.userInterface.css('tarteaucitronServicesTitle_' + service.type, 'display', 'block');
454            
455            if (document.getElementById('tarteaucitronServices_' + service.type) !== null) {
456                document.getElementById('tarteaucitronServices_' + service.type).innerHTML += html;
457            }
458            
459            tarteaucitron.userInterface.order(service.type);
460        }
461
462        // allow by default for non EU
463        if (isResponded === false && tarteaucitron.user.bypass === true) {
464            isAllowed = true;
465            tarteaucitron.cookie.create(service.key, true);
466        }
467       
468        if ((!isResponded && (isAutostart || (isNavigating && isWaiting)) && !tarteaucitron.highPrivacy) || isAllowed) {
469            if (!isAllowed) {
470                tarteaucitron.cookie.create(service.key, true);
471            }
472            if (tarteaucitron.launch[service.key] !== true) {
473                tarteaucitron.launch[service.key] = true;
474                service.js();
475            }
476            tarteaucitron.state[service.key] = true;
477            tarteaucitron.userInterface.color(service.key, true);
478        } else if (isDenied) {
479            if (typeof service.fallback === 'function') {
480                service.fallback();
481            }
482            tarteaucitron.state[service.key] = false;
483            tarteaucitron.userInterface.color(service.key, false);
484        } else if (!isResponded && isDNTRequested && tarteaucitron.handleBrowserDNTRequest) {
485            tarteaucitron.cookie.create(service.key, 'false');
486            if (typeof service.fallback === 'function') {
487                service.fallback();
488            }
489            tarteaucitron.state[service.key] = false;
490            tarteaucitron.userInterface.color(service.key, false);
491        } else if (!isResponded) {
492            tarteaucitron.cookie.create(service.key, 'wait');
493            if (typeof service.fallback === 'function') {
494                service.fallback();
495            }
496            tarteaucitron.userInterface.color(service.key, 'wait');
497            tarteaucitron.userInterface.openAlert();
498        }
499
500        tarteaucitron.cookie.checkCount(service.key);
501    },
502    "cleanArray": function cleanArray(arr) {
503        "use strict";
504        var i,
505            len = arr.length,
506            out = [],
507            obj = {},
508            s = tarteaucitron.services;
509 
510        for (i = 0; i < len; i += 1) {
511            if (!obj[arr[i]]) {
512                obj[arr[i]] = {};
513                if (tarteaucitron.services[arr[i]] !== undefined) {
514                    out.push(arr[i]);
515                }
516            }
517        }
518                
519        out = out.sort(function (a, b) {
520            if (s[a].type + s[a].key > s[b].type + s[b].key) { return 1; }
521            if (s[a].type + s[a].key < s[b].type + s[b].key) { return -1; }
522            return 0;
523        });
524                    
525        return out;
526    },
527    "userInterface": {
528        "css": function (id, property, value) {
529            "use strict";
530            if (document.getElementById(id) !== null) {
531                document.getElementById(id).style[property] = value;
532            }
533        },
534        "respondAll": function (status) {
535            "use strict";
536            var s = tarteaucitron.services,
537                service,
538                key,
539                index = 0;
540            
541            for (index = 0; index < tarteaucitron.job.length; index += 1) {
542                service = s[tarteaucitron.job[index]];
543                key = service.key;
544                if (tarteaucitron.state[key] !== status) {
545                    if (status === false && tarteaucitron.launch[key] === true) {
546                        tarteaucitron.reloadThePage = true;
547                    }
548                    if (tarteaucitron.launch[key] !== true && status === true) {
549                        tarteaucitron.launch[key] = true;
550                        tarteaucitron.services[key].js();
551                    }
552                    tarteaucitron.state[key] = status;
553                    tarteaucitron.cookie.create(key, status);
554                    tarteaucitron.userInterface.color(key, status);
555                }
556            }
557        },
558        "respond": function (el, status) {
559            "use strict";
560            var key = el.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed", "g"), '');
561        
562            // return if same state
563            if (tarteaucitron.state[key] === status) {
564                return;
565            }
566            
567            if (status === false && tarteaucitron.launch[key] === true) {
568                tarteaucitron.reloadThePage = true;
569            }
570        
571            // if not already launched... launch the service
572            if (status === true) {
573                if (tarteaucitron.launch[key] !== true) {
574                    tarteaucitron.launch[key] = true;
575                    tarteaucitron.services[key].js();
576                }
577            }
578            tarteaucitron.state[key] = status;
579            tarteaucitron.cookie.create(key, status);
580            tarteaucitron.userInterface.color(key, status);
581        },
582        "color": function (key, status) {
583            "use strict";
584            var gray = '#808080',
585                greenDark = '#1B870B',
586                greenLight = '#E6FFE2',
587                redDark = '#9C1A1A',
588                redLight = '#FFE2E2',
589                yellowDark = '#FBDA26',
590                c = 'tarteaucitron',
591                nbDenied = 0,
592                nbPending = 0,
593                nbAllowed = 0,
594                sum = tarteaucitron.job.length,
595                index;
596
597            if (status === true) {
598                tarteaucitron.userInterface.css(key + 'Line', 'borderLeft', '5px solid ' + greenDark);
599                tarteaucitron.userInterface.css(key + 'Allowed', 'backgroundColor', greenDark);
600                tarteaucitron.userInterface.css(key + 'Denied', 'backgroundColor', gray);
601            } else if (status === false) {
602                tarteaucitron.userInterface.css(key + 'Line', 'borderLeft', '5px solid ' + redDark);
603                tarteaucitron.userInterface.css(key + 'Allowed', 'backgroundColor', gray);
604                tarteaucitron.userInterface.css(key + 'Denied', 'backgroundColor', redDark);
605            }
606
607            // check if all services are allowed
608            for (index = 0; index < sum; index += 1) {
609                if (tarteaucitron.state[tarteaucitron.job[index]] === false) {
610                    nbDenied += 1;
611                } else if (tarteaucitron.state[tarteaucitron.job[index]] === undefined) {
612                    nbPending += 1;
613                } else if (tarteaucitron.state[tarteaucitron.job[index]] === true) {
614                    nbAllowed += 1;
615                }
616            }
617        
618            tarteaucitron.userInterface.css(c + 'DotGreen', 'width', ((100 / sum) * nbAllowed) + '%');
619            tarteaucitron.userInterface.css(c + 'DotYellow', 'width', ((100 / sum) * nbPending) + '%');
620            tarteaucitron.userInterface.css(c + 'DotRed', 'width', ((100 / sum) * nbDenied) + '%');
621            
622            if (nbDenied === 0 && nbPending === 0) {
623                tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', greenDark);
624                tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', gray);
625            } else if (nbAllowed === 0 && nbPending === 0) {
626                tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', gray);
627                tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', redDark);
628            } else {
629                tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', gray);
630                tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', gray);
631            }
632            
633            // close the alert if all service have been reviewed
634            if (nbPending === 0) {
635                tarteaucitron.userInterface.closeAlert();
636            }
637            
638            if (tarteaucitron.services[key].cookies.length > 0 && status === false) {
639                tarteaucitron.cookie.purge(tarteaucitron.services[key].cookies);
640            }
641            
642            if (status === true) {
643                if (document.getElementById('tacCL' + key) !== null) {
644                    document.getElementById('tacCL' + key).innerHTML = '...';
645                }
646                setTimeout(function () {
647                    tarteaucitron.cookie.checkCount(key);
648                }, 2500);
649            } else {
650                tarteaucitron.cookie.checkCount(key);
651            }
652        },
653        "openPanel": function () {
654            "use strict";
655            tarteaucitron.userInterface.css('tarteaucitron', 'display', 'block');
656            tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
657            tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
658            tarteaucitron.userInterface.jsSizing('main');
659            console.log("1234");
660        },
661        "closePanel": function () {
662            "use strict";
663            
664            if (document.location.hash === tarteaucitron.hashtag) {
665                document.location.hash = '';
666            }
667            tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
668            tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
669             console.log("12314");
670            
671            tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) {
672            	console.log("33");
673                elem.style.display = 'none';
674            }, true);
675            
676            if (tarteaucitron.reloadThePage === true) {
677                window.location.reload();
678            } else {
679                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
680                 console.log("1d234");
681            }
682        },
683        "openAlert": function () {
684            "use strict";
685            var c = 'tarteaucitron';
686            tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'block');
687            tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'none');
688            tarteaucitron.userInterface.css(c + 'AlertBig',   'display', 'block');
689             console.log("1ef234");
690              var body = document.body;
691			  body.classList.add("cookie_overlay_body");
692        },
693        "closeAlert": function () {
694            "use strict";
695            var c = 'tarteaucitron';
696            tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'none');
697            tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'block');
698            tarteaucitron.userInterface.css(c + 'AlertBig',   'display', 'none');
699            tarteaucitron.userInterface.jsSizing('box');
700             console.log("g1234");
701                var body = document.body;
702				body.classList.add("overlay_body");
703
704				 var body = document.body;
705			    body.classList.remove("cookie_overlay_body");
706        },
707        "toggleCookiesList": function () {
708            "use strict";
709            var div = document.getElementById('tarteaucitronCookiesListContainer');
710            
711            if (div === null) {
712                return;
713            }
714            
715            if (div.style.display !== 'block') {
716                tarteaucitron.cookie.number();
717                div.style.display = 'block';
718                tarteaucitron.userInterface.jsSizing('cookie');
719                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
720                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
721                tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) {
722                    elem.style.display = 'none';
723                     console.log("77");
724                }, true);
725            } else {
726                div.style.display = 'none';
727                tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
728                tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
729                console.log("66");
730            }
731        },
732        "toggle": function (id, closeClass) {
733            "use strict";
734            var div = document.getElementById(id);
735            
736            if (div === null) {
737                return;
738            }
739            
740            if (closeClass !== undefined) {
741                tarteaucitron.fallback([closeClass], function (elem) {
742                    if (elem.id !== id) {
743                        elem.style.display = 'none';
744                        console.log("11");
745                    }
746                }, true);
747            }
748            
749            if (div.style.display !== 'block') {
750                div.style.display = 'block';
751            } else {
752                div.style.display = 'none';
753                console.log("22");
754            }
755        },
756        "order": function (id) {
757            "use strict";
758            var main = document.getElementById('tarteaucitronServices_' + id),
759                allDivs,
760                store = [],
761                i;
762
763            if (main === null) {
764                return;
765            }
766            
767            allDivs = main.childNodes;
768            
769            if (typeof Array.prototype.map === 'function') {
770                Array.prototype.map.call(main.children, Object).sort(function (a, b) {
771                    if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; }
772                    if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; }
773                    return 0;
774                }
774).forEach(function (element) {
775                    main.appendChild(element);
776                });
777            }
778        },
779        "jsSizing": function (type) {
780            "use strict";
781            var scrollbarMarginRight = 10,
782                scrollbarWidthParent,
783                scrollbarWidthChild,
784                servicesHeight,
785                e = window,
786                a = 'inner',
787                windowInnerHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight,
788                mainTop,
789                mainHeight,
790                closeButtonHeight,
791                headerHeight,
792                cookiesListHeight,
793                cookiesCloseHeight,
794                cookiesTitleHeight,
795                paddingBox,
796                alertSmallHeight,
797                cookiesNumberHeight;
798            
799            if (type === 'box') {
800                if (document.getElementById('tarteaucitronAlertSmall') !== null && document.getElementById('tarteaucitronCookiesNumber') !== null) {
801                    
802                    // reset
803                    tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', '0px 10px');
804                    
805                    // calculate
806                    alertSmallHeight = document.getElementById('tarteaucitronAlertSmall').offsetHeight;
807                    cookiesNumberHeight = document.getElementById('tarteaucitronCookiesNumber').offsetHeight;
808                    paddingBox = (alertSmallHeight - cookiesNumberHeight) / 2;
809                    
810                    // apply
811                    tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', paddingBox + 'px 10px');
812                }
813            } else if (type === 'main') {
814
815                // get the real window width for media query
816                if (window.innerWidth === undefined) {
817                    a = 'client';
818                    e = document.documentElement || document.body;
819                }
820
821                // height of the services list container
822                if (document.getElementById('tarteaucitron') !== null && document.getElementById('tarteaucitronClosePanel') !== null && document.getElementById('tarteaucitronMainLineOffset') !== null) {
823                    
824                    // reset
825                    tarteaucitron.userInterface.css('tarteaucitronScrollbarParent', 'height', 'auto');
826                    
827                    // calculate
828                    mainHeight = document.getElementById('tarteaucitron').offsetHeight;
829                    closeButtonHeight = document.getElementById('tarteaucitronClosePanel').offsetHeight;
830                    headerHeight = document.getElementById('tarteaucitronMainLineOffset').offsetHeight;
831                    
832                    // apply
833                    servicesHeight = (mainHeight - closeButtonHeight - headerHeight + 1);
834                    tarteaucitron.userInterface.css('tarteaucitronScrollbarParent', 'height', servicesHeight + 'px');
835                }
836                
837                // align the main allow/deny button depending on scrollbar width
838                if (document.getElementById('tarteaucitronScrollbarParent') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) {
839                    
840                    // media query
841                    if (e[a + 'Width'] <= 479) {
842                        tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginLeft', '11px');
843                    } else if (e[a + 'Width'] <= 767) {
844                        scrollbarMarginRight = 12;
845                    }
846                    
847                    scrollbarWidthParent = document.getElementById('tarteaucitronScrollbarParent').offsetWidth;
848                    scrollbarWidthChild = document.getElementById('tarteaucitronScrollbarChild').offsetWidth;
849                    tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginRight', ((scrollbarWidthParent - scrollbarWidthChild) + scrollbarMarginRight) + 'px');
850                }
851                
852                // center the main panel
853                if (document.getElementById('tarteaucitron') !== null) {
854                    
855                    // media query
856                    if (e[a + 'Width'] <= 767) {
857                        mainTop = 0;
858                    } else {
859                        mainTop = ((windowInnerHeight - document.getElementById('tarteaucitron').offsetHeight) / 2) - 21;
860                    }
861                    
862                    // correct
863                    if (mainTop < 0) {
864                        mainTop = 0;
865                    }
866                    
867                    if (document.getElementById('tarteaucitronMainLineOffset') !== null) {
868                        if (document.getElementById('tarteaucitron').offsetHeight < (windowInnerHeight / 2)) {
869                            mainTop -= document.getElementById('tarteaucitronMainLineOffset').offsetHeight;
870                        }
871                    }
872                    
873                    // apply
874                    tarteaucitron.userInterface.css('tarteaucitron', 'top', mainTop + 'px');
875                }
876
877
878            } else if (type === 'cookie') {
879                
880                // put cookies list at bottom
881                if (document.getElementById('tarteaucitronAlertSmall') !== null) {
882                    tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'bottom', (document.getElementById('tarteaucitronAlertSmall').offsetHeight) + 'px');
883                }
884                
885                // height of cookies list
886                if (document.getElementById('tarteaucitronCookiesListContainer') !== null) {
887                    
888                    // reset
889                    tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', 'auto');
890                    
891                    // calculate
892                    cookiesListHeight = document.getElementById('tarteaucitronCookiesListContainer').offsetHeight;
893                    cookiesCloseHeight = document.getElementById('tarteaucitronClosePanelCookie').offsetHeight;
894                    cookiesTitleHeight = document.getElementById('tarteaucitronCookiesTitle').offsetHeight;
895                    
896                    // apply
897                    tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', (cookie
897sListHeight - cookiesCloseHeight - cookiesTitleHeight - 2) + 'px');
898                }
899            }
900        }
901    },
902    "cookie": {
903        "owner": {},
904        "create": function (key, status) {
905            "use strict";
906
907            if (tarteaucitronForceExpire !== '') {
908                // The number of day cann't be higher than 1 year
909                timeExipre = (tarteaucitronForceExpire > 365) ? 31536000000 : tarteaucitronForceExpire * 86400000; // Multiplication to tranform the number of days to milliseconds
910            }
911
912            var d = new Date(),
913                time = d.getTime(),
914                expireTime = time + timeExipre, // 365 days
915                regex = new RegExp("!" + key + "=(wait|true|false)", "g"),
916                cookie = tarteaucitron.cookie.read().replace(regex, ""),
917                value = 'tarteaucitron=' + cookie + '!' + key + '=' + status,
918                domain = (tarteaucitron.parameters.cookieDomain !== undefined && tarteaucitron.parameters.cookieDomain !== '') ? 'domain=' + tarteaucitron.parameters.cookieDomain + ';' : '';
919
920          if (tarteaucitron.cookie.read().indexOf(key + '=' + status) === -1) {
921                tarteaucitron.pro('!' + key + '=' + status);
922            }
923
924            d.setTime(expireTime);
925            document.cookie = value + '; expires=' + d.toGMTString() + '; path=/;' + domain;
926        },
927        "read": function () {
928            "use strict";
929            var nameEQ = "tarteaucitron=",
930                ca = document.cookie.split(';'),
931                i,
932                c;
933
934            for (i = 0; i < ca.length; i += 1) {
935                c = ca[i];
936                while (c.charAt(0) === ' ') {
937                    c = c.substring(1, c.length);
938                }
939                if (c.indexOf(nameEQ) === 0) {
940                    return c.substring(nameEQ.length, c.length);
941                }
942            }
943            return '';
944        },
945        "purge": function (arr) {
946            "use strict";
947            var i;
948            
949            for (i = 0; i < arr.length; i += 1) {
950                document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;';
951                document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname + ';';
952                document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname.split('.').slice(-2).join('.') + ';';
953            }
954        },
955        "checkCount": function (key) {
956            "use strict";
957            var arr = tarteaucitron.services[key].cookies,
958                nb = arr.length,
959                nbCurrent = 0,
960                html = '',
961                i,
962                status = document.cookie.indexOf(key + '=true');
963            
964            if (status >= 0 && nb === 0) {
965                html += tarteaucitron.lang.useNoCookie;
966            } else if (status >= 0) {
967                for (i = 0; i < nb; i += 1) {
968                    if (document.cookie.indexOf(arr[i] + '=') !== -1) {
969                        nbCurrent += 1;
970                        if (tarteaucitron.cookie.owner[arr[i]] === undefined) {
971                            tarteaucitron.cookie.owner[arr[i]] = [];
972                        }
973                        if (tarteaucitron.cookie.crossIndexOf(tarteaucitron.cookie.owner[arr[i]], tarteaucitron.services[key].name) === false) {
974                            tarteaucitron.cookie.owner[arr[i]].push(tarteaucitron.services[key].name);
975                        }
976                    }
977                }
978                
979                if (nbCurrent > 0) {
980                    html += tarteaucitron.lang.useCookieCurrent + ' ' + nbCurrent + ' cookie';
981                    if (nbCurrent > 1) {
982                        html += 's';
983                    }
984                    html += '.';
985                } else {
986                    html += tarteaucitron.lang.useNoCookie;
987                }
988            } else if (nb === 0) {
989                html = tarteaucitron.lang.noCookie;
990            } else {
991                html += tarteaucitron.lang.useCookie + ' ' + nb + ' cookie';
992                if (nb > 1) {
993                    html += 's';
994                }
995                html += '.';
996            }
997            
998            if (document.getElementById('tacCL' + key) !== null) {
999                document.getElementById('tacCL' + key).innerHTML = html;
1000            }
1001        },
1002        "crossIndexOf": function (arr, match) {
1003            "use strict";
1004            var i;
1005            for (i = 0; i < arr.length; i += 1) {
1006                if (arr[i] === match) {
1007                    return true;
1008                }
1009            }
1010            return false;
1011        },
1012        "number": function () {
1013            "use strict";
1014            var cookies = document.cookie.split(';'),
1015                nb = (document.cookie !== '') ? cookies.length : 0,
1016                html = '',
1017                i,
1018                name,
1019                namea,
1020                nameb,
1021                c,
1022                d,
1023                s = (nb > 1) ? 's' : '',
1024                savedname,
1025                regex = /^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i,
1026                regexedDomain = (tarteaucitron.cdn.match(regex) !== null) ? tarteaucitron.cdn.match(regex)[1] : tarteaucitron.cdn,
1027                host = (tarteaucitron.domain !== undefined) ? tarteaucitron.domain : regexedDomain;
1028            
1029            cookies = cookies.sort(function (a, b) {
1030                namea = a.split('=', 1).toString().replace(/ /g, '');
1031                nameb = b.split('=', 1).toString().replace(/ /g, '');
1032                c = (tarteaucitron.cookie.owner[namea] !== undefined) ? tarteaucitron.cookie.owner[namea] : '0';
1033                d = (tarteaucitron.cookie.owner[nameb] !== undefined) ? tarteaucitron.cookie.owner[nameb] : '0';
1034                if (c + a > d + b) { return 1; }
1035                if (c + a < d + b) { return -1; }
1036                return 0;
1037            });
1038            
1039            if (document.cookie !== '') {
1040                for (i = 0; i < nb; i += 1) {
1041                    name = cookies[i].split('=', 1).toString().replace(/ /g, '');
1042                    if (tarteaucitron.cookie.owner[name] !== undefined && tarteaucitron.cookie.owner[name].join(' // ') !== savedname) {
1043                        savedname = tarteaucitron.cookie.owner[name].join(' // ');
1044                        html += '<div class="tarteaucitronHidden">';
1045                        html += '     <div class="tarteaucitronTitle">';
1046                        html += '        ' + tarteaucitron.cookie.owner[name].join(' // ');
1047                        html += '    </div>';
1048                        html += '</div>';
1049                    } else if (tarteaucitron.cookie.owner[name] === undefined && host !== savedname) {
1050                        savedname = host;
1051                        html += '<div class="tarteaucitronHidden">';
1052                        html += '     <div class="tarteaucitronTitle">';
1053                        html += '        ' + host;
1054                        html += '    </div>';
1055                        html += '</div>';
1056                    }
1057                    html += '<div class="tarteaucitronCookiesListMain">';
1058                    html += '    <div class="tarteaucitronCookiesListLeft"><a href="#" onclick="tarteaucitron.cookie.purge([\'' + cookies[i].split('=', 1) + '\']);tarteaucitron.cookie.number();tarteaucitron.userInterface.jsSizing(\'cookie\');return false"><b>&times;</b></a> <b>' + name + '</b>';
1059                    html += '    </div>';
1060                    html += '    <div class="tarteaucitronCookiesListRight">' + cookies[i].split('=').slice(1).join('=') + '</div>';
1061                    html += '</div>';
1062                }
1063            } else {
1064                html += '<div class="tarteaucitronCookiesListMain">';
1065                html += '    <div class="tarteaucitronCookiesListLeft"><b>-</b></div>';
1066                html += '    <div class="tarteaucitronCookiesListRight"></div>';
1067                html += '</div>';
1068            }
1069            
1070            html += '<div class="tarteaucitronHidden" style="height:20px;display:block"></div>';
1071            
1072            if (document.getElementById('tarteaucitronCookiesList') !== null) {
1073                document.getElementById('tarteaucitronCookiesList').innerHTML = html;
1074            }
1075            
1076            if (document.getElementById('tarteaucitronCookiesNumber') !== null) {
1077                document.getElementById('tarteaucitronCookiesNumber').innerHTML = nb;
1078            }
1079            
1080            if (document.getElementById('tarteaucitronCookiesNumberBis') !== null) {
1081                document.getElementById('tarteaucitronCookiesNumberBis').innerHTML = nb + ' cookie' + s;
1082            }
1083            
1084            for (i = 0; i < tarteaucitron.job.length; i += 1) {
1085                tarteaucitron.cookie.checkCount(tarteaucitron.job[i]);
1086            }
1087        }
1088    },
1089    "getLanguage": function () {
1090        "use strict";
1091        if (!navigator) { return 'en'; }
1092        
1093        var availableLanguages = 'cs,en,fr,es,it,de,nl,pt,pl,ru',
1094            defaultLanguage = 'en',
1095            lang = navigator.language || navigator.browserLanguage ||
1096                navigator.systemLanguage || navigator.userLang || null,
1097            userLanguage = lang.substr(0, 2);
1098
1099        if (tarteaucitronForceLanguage !== '') {
1100            if (availableLanguages.indexOf(tarteaucitronForceLanguage) !== -1) {
1101                return tarteaucitronForceLanguage;
1102            }
1103        }
1104        
1105        if (availableLanguages.indexOf(userLanguage) === -1) {
1106            return defaultLanguage;
1107        }
1108        return userLanguage;
1109    },
1110    "getLocale": function () {
1111        "use strict";
1112        if (!navigator) { return 'en_US'; }
1113        
1114        var lang = navigator.language || navigator.browserLanguage ||
1115                navigator.systemLanguage || navigator.userLang || null,
1116            userLanguage = lang.substr(0, 2);
1117        
1118        if (userLanguage === 'fr') {
1119            return 'fr_FR';
1120        } else if (userLanguage === 'en') {
1121            return 'en_US';
1122        } else if (userLanguage === 'de') {
1123            return 'de_DE';
1124        } else if (userLanguage === 'es') {
1125            return 'es_ES';
1126        } else if (userLanguage === 'it') {
1127            return 'it_IT';
1128        } else if (userLanguage === 'pt') {
1129            return 'pt_PT';
1130        } else if (userLanguage === 'nl') {
1131            return 'nl_NL';
1132        } else {
1133            return 'en_US';
1134        }
1135    },
1136    "addScript": function (url, id, callback, execute, attrName, attrVal) {
1137        "use strict";
1138        var script,
1139            done = false;
1140        
1141        if (execute === false) {
1142            if (typeof callback === 'function') {
1143                callback();
1144            }
1145        } else {
1146            script = document.createElement('script');
1147            script.type = 'text/javascript';
1148            script.id = (id !== undefined) ? id : '';
1149            script.async = true;
1150            script.src = url;
1151            
1152            if (attrName !== undefined && attrVal !== undefined) {
1153                script.setAttribute(attrName, attrVal);
1154            }
1155
1156            if (typeof callback === 'function') {
1157                script.onreadystatechange = script.onload = function () {
1158                    var state = script.readyState;
1159                    if (!done && (!state || /loaded|complete/.test(state))) {
1160                        done = true;
1161                        callback();
1162                    }
1163                };
1164            }
1165    
1166            document.getElementsByTagName('head')[0].appendChild(script);
1167        }
1168    },
1169    "makeAsync": {
1170        "antiGhost": 0,
1171        "buffer": '',
1172        "init": function (url, id) {
1173            "use strict";
1174            var savedWrite = document.write,
1175                savedWriteln = document.writeln;
1176
1177            document.write = function (content) {
1178                tarteaucitron.makeAsync.buffer += content;
1179            };
1180            document.writeln = function (content) {
1181                tarteaucitron.makeAsync.buffer += content.concat("\n");
1182            };
1183        
1184            setTimeout(function () {
1185                document.write = savedWrite;
1186                document.writeln = savedWriteln;
1187            }, 20000);
1188            
1189            tarteaucitron.makeAsync.getAndParse(url, id);
1190        },
1191        "getAndParse": function (url, id) {
1192            "use strict";
1193            if (tarteaucitron.makeAsync.antiGhost > 9) {
1194                tarteaucitron.makeAsync.antiGhost = 0;
1195                return;
1196            }
1197            tarteaucitron.makeAsync.antiGhost += 1;
1198            tarteaucitron.addScript(url, '', function () {
1199                if (document.getElementById(id) !== null) {
1200                    document.getElementById(id).innerHTML += "<span style='display:none'>&nbsp;</span>" + tarteaucitron.makeAsync.buffer;
1201                    tarteaucitron.makeAsync.buffer = '';
1202                    tarteaucitron.makeAsync.execJS(id);
1203                     console.log("12f34");
1204                }
1205            });
1206        },
1207        "execJS": function (id) {
1208            /* not strict because third party scripts may have errors */
1209            var i,
1210                scripts,
1211                childId,
1212                type;
1213
1214            if (document.getElementById(id) === null) {
1215                return;
1216            }
1217            
1218            scripts = document.getElementById(id).getElementsByTagName('script');
1219            for (i = 0; i < scripts.length; i += 1) {
1220                type = (scripts[i].getAttribute('type') !== null) ? scripts[i].getAttribute('type') : '';
1221                if (type === '') {
1222                    type = (scripts[i].getAttribute('language') !== null) ? scripts[i].getAttribute('language') : '';
1223                }
1224                if (scripts[i].getAttribute('src') !== null && scripts[i].getAttribute('src') !== '') {
1225                    childId = id + Math.floor(Math.random() * 99999999999);
1226                    document.getElementById(id).innerHTML += '<div id="' + childId + '"></div>';
1227                    tarteaucitron.makeAsync.getAndParse(scripts[i].getAttribute('src'), childId);
1228                } else if (type.indexOf('javascript') !== -1 || type === '') {
1229                    eval(scripts[i].innerHTML);
1230                }
1231            }
1232        }
1233    },
1234    "fallback": function (matchClass, content, noInner) {
1235        "use strict";
1236        var elems = document.getElementsByTagName('*'),
1237            i,
1238            index = 0;
1239
1240        for (i in elems) {
1241            if (elems[i] !== undefined) {
1242                for (index = 0; index < matchClass.length; index += 1) {
1243                    if ((' ' + elems[i].className + ' ')
1244                            .indexOf(' ' + matchClass[index] + ' ') > -1) {
1245                        if (typeof content === 'function') {
1246                            if (noInner === true) {
1247                                content(elems[i]);
1248                            } else {
1249                                elems[i].innerHTML = content(elems[i]);
1250                            }
1251                        } else {
1252                            elems[i].innerHTML = content;
1253                        }
1254                    }
1255                }
1256            }
1257        }
1258    },
1259    "engage": function (id) {
1260        "use strict";
1261        var html = '',
1262            r = Math.floor(Math.random() * 100000);
1263                
1264        html += '<div class="tac_activate">';
1265        html += '   <div class="tac_float">';
1266        html += '      <b>' + tarteaucitron.services[id].name + '</b> ' + tarteaucitron.lang.fallback;
1267        html += '      <div class="tarteaucitronAllow" id="Eng' + r + 'ed' + id + '" onclick="tarteaucitron.userInterface.respond(this, true);">';
1268        html += '          &#10003; ' + tarteaucitron.lang.allow;
1269        html += '       </div>';
1270        html += '   </div>';
1271        html += '</div>';
1272        
1273        return html;
1274    },
1275    "extend": function (a, b) {
1276        "use strict";
1277        var prop;
1278        for (prop in b) {
1279            if (b.hasOwnProperty(prop)) {
1280                a[prop] = b[prop];
1281            }
1282        }
1283    },
1284    "proTemp": '',
1285    "proTimer": function () {
1286        "use strict";
1287        setTimeout(tarteaucitron.proPing, 1000);
1288    },
1289    "pro": function (list) {
1290        "use strict";
1291        tarteaucitron.proTemp += list;
1292        clearTimeout(tarteaucitron.proTimer);
1293        tarteaucitron.proTimer = setTimeout(tarteaucitron.proPing, 2500);
1294    },
1295    "proPing": function () {
1296        "use strict";
1297        if (tarteaucitron.uuid !== '' && tarteaucitron.uuid !== undefined && tarteaucitron.proTemp !== '') {
1298            var div = document.getElementById('tarteaucitronPremium'),
1299                timestamp = new Date().getTime(),
1300                url = '//opt-out.ferank.eu/premium.php?';
1301            
1302            if (div === null) {
1303                return;
1304            }
1305            
1306            url += 'domain=' + tarteaucitron.domain + '&';
1307            url += 'uuid=' + tarteaucitron.uuid + '&';
1308            url += 'c=' + encodeURIComponent(tarteaucitron.proTemp) + '&';
1309            url += '_' + timestamp;
1310            
1311            div.innerHTML = '<img src="' + url + '" style="display:none" />';
1312             console.log("12t34");
1313            
1314            tarteaucitron.proTemp = '';
1315        }
1316        
1317        tarteaucitron.cookie.number();
1318    }
1319};

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.