//Nome dominio + lista cookies DA AGGIUNGERE var nome_dominio = window.location.hostname; var installedDomain = 'www.'+nome_dominio; var cookielist= { tecnici: [ {name: 'PHPSESSID', domain: 'www.'+nome_dominio}, {name: nome_dominio, domain: 'www.'+nome_dominio} ], profilazione: [ ], terzeparti: [ {name: '_ga', domain: '.'+nome_dominio}, {name: '_gat', domain: '.'+nome_dominio}, {name: 'id', domain: '.doubleclick.net'}, {name: 'guest_id', domain: '.twitter.com'}, {name: 'B', domain: '.yahoo.com'}, {name: 'VISITOR_INFO1_LIVE', domain: '.youtube.com'}, {name: 'YSC', domain: '.youtube.com'}, {name: 'NID', domain: '.google.com'}, {name: 'APISID', domain: '.google.com'}, {name: 'HSID', domain: '.google.com'}, {name: 'PREF', domain: '.google.com'}, {name: 'SID', domain: '.google.com'}, {name: 'cid', domain: 'c1.adform.net'}, {name: 'uid', domain: '.adform.net'}, {name: '__cfduid', domain: '.zopim.com'}, {name: '__zlcmid', domain: nome_dominio}, {name: '__utma', domain: nome_dominio}, {name: '__utmb', domain: nome_dominio}, {name: '__utmc', domain: nome_dominio}, {name: '__utmt', domain: nome_dominio}, {name: '__utmz', domain: nome_dominio}, {name: 'APISID', domain: nome_dominio}, {name: 'HSID', domain: nome_dominio}, {name: 'PREF', domain: nome_dominio}, {name: 'SID', domain: nome_dominio} ] }; //Html del link che apre il configuratore var html_bottone_cambia_configurazione = 'Configurazione/CONFIGURATION'; //Html del link che chiude il configuratore var html_bottone_chiudi_configurazione = 'Cookie Policy'; //Contenuto div normativa prima pagina var testo_notifica_estesa_prima = '

Cosa sono
'+ 'I cookie sono piccoli file di testo memorizzati nel computer o nel dispositivo mobile dell\'utente quando visita il nostro sito web.
'+ 'WHAT IS A COOKIE?
'+ 'A cookie is a small string of text that is sent to your browser and eventually saved on your computer (as an alternative to your smart phone or any other equipment used to access the Internet) each time you visit a website.
'+ '
A cosa servono
'+ 'I cookie sono da noi utilizzati per assicurare all\'utente la migliore esperienza nel nostro sito.
'+ 'Questo sito utilizza i cookie, anche di terze parti, per inviare messaggi promozionali personalizzati.
'+ 'WHAT ARE COOKIES FOR?
'+ 'Cookies are used to operate websites more efficiently and securely, to improve performance, ease traffic from visitors as well as to provide information to the owners of the site.
'+ '
Tipologie di cookie
'+ 'I cookie sono categorizzati come segue.
'+ 'Cookie di sessione. Cookie automaticamente cancellati quando l\'utente chiude il browser.
'+ 'Cookie persistenti. Cookie che restano memorizzati nel dispositivo dell\'utente sino al raggiungimento di una determinata data di terminazione (in termini di minuti, giorni o anni dalla creazione/aggiornamento del cookie).
'+ 'Cookie di terze parti. Cookie memorizzati per conto di soggetti terzi.
'+ 'E possibile controllare ed eliminare i singoli cookie utilizzando le impostazioni della maggior parte dei browser. Cio\', tuttavia, potrebbe impedire di utilizzare correttamente alcune funzioni del nostro sito web.
'+ 'Per saperne di piu\' e\' possibile fare riferimento a www.aboutcookies.org o www.allaboutcookies.org.
'+ 'TYPES OF COOKIES USED
'+ 'The categories of cookies which are used are:
'+ 'Session cookies - these types of cookies are stored in the computer\'s memory during a user\'s browsing session and are automatically deleted from the user\'s computer when the browser is closed or the session is deemed to have ended.
'+ 'Persistent cookies - these types of cookies are stored on a user\'s computer and are not deleted when the browser is closed. Persistent cookies can be used to retain user preferences for a particular website, allowing those preferences to be used in future browsing sessions. Persistent cookies usually assign a unique ID to the user\'s browser and they are usually configured to identify a user for a prolonged period of time.
'+ 'Third Party Cookies: These cookies are designed and managed by \'third parties\', i.e. by responsible foreign to our website.
'+ 'If you accept cookies, you can later refuse them by changing your Internet browser settings. Please note that some features will not be available and this website will not be fully functioning when you disable cookies.
'+ 'Useful information about cookies can be found at: www.allaboutcookies.org.'+ '

'+ 'Gestione dei cookie direttamente dal sito
'+ 'Per ottimizzare la tua esperienza anche nella gestione dei cookie, abbiamo deciso di organizzare i cookie utilizzati da questo sito in tre categorie, in base alle finalita\' perseguite: cookies tecnici, cookies di profilazione e cookies di terze parti.
'+ '
'+ 'Cookies tecnici: Questi cookie sono indispensabili per il regolare funzionamento del sito e delle relative funzioni. Esempi: cookie di autenticazione.
'+ 'Cookies di profilazione: Questi cookie ci consentono di ricordare le scelte che gli utenti fanno sul sito e/o i servizi che vengono espressamente richiesti con lo scopo di fornire servizi piu\' avanzati e personalizzati.
'+ 'Cookies di terze parti: Il sito potrebbe utilizzare anche cookie di siti o di web server diversi (c.d. cookie di "terze parti"): cio\' accade perche\' sul sito possono essere presenti elementi come, ad esempio, immagini, mappe, suoni, specifici link a pagine web di altri domini che risiedono su server diversi da quello sul quale si trova la pagina richiesta. In altre parole, detti cookie sono impostati direttamente da gestori di siti web o server diversi dal sito. I cookie di terze parti vengono utilizzati anche per personalizzare l\'esposizione pubblicitaria a seconda dell\'interesse dell\'utente e della frequenza di esposizione al messaggio.

' + '
'+ 'COOKIES CATGORIES
'+ 'We have listed cookies used on Company and Company website for cookie categories:
'+ 'Strictly necessary - these cookies are essential in order to enable you to move around our sites and use their features, such as accessing secure areas of the website.
'+ 'Profiling cookies. These are persistent cookies used to identify (anonymously or not) user preferences and improve your browsing experience.
'+ 'Third-party cookies.While navigating the site you may receive on your terminal even cookies from other sites or web servers (\'third-party\' cookies): this is because on the site may be present elements as, for example, images, maps, sounds, specific links to web pages of other domains, residing on different servers than the one hosting our website. In other words, these cookies are set directly by operators of web sites or servers different from the ones of our site. These third parties may set cookies while you visit our site and thus obtain information about the fact that you visited our website. If the user decides not to grant permission for the use of third-party cookies, the functions of the site that do not require such cookies only can be used.
'+ '

' + html_bottone_cambia_configurazione; //Contenuto div normativa seconda pagina var testo_notifica_estesa_seconda = '

Questa pagina ti permette di modificare le impostazioni del cookie per questo sito.
Una volta modificate le impostazioni, occorre cliccare sul pulsante SALVA.

'+ '

Cookies tecnici: Questi cookie sono indispensabili per il regolare funzionamento del sito e delle relative funzioni. Esempi: cookie di autenticazione.
'+ '

Strictlynecessary: These cookies are essential in order to enable you to move around our sites and use their features, such as accessing secure areas of the website.
'+ 'Per maggiori dettagli/For more details
'+ 'Abilitati/Enabled

'+ '

Cookies di profilazione: Questi cookie ci consentono di ricordare le scelte che gli utenti fanno sul sito e/o i servizi che vengono espressamente richiesti con lo scopo di fornire servizi piu\' avanzati e personalizzati.
'+ '

Profiling cookies: These are persistent cookies used to identify (anonymously or not) user preferences and improve your browsing experienceto provide more advances and customized web services.
'+ 'Per maggiori dettagli/For more details
'+ 'Abilitati/Enabled Disabilitati/Disabled

'+ '

Cookies di terze parti: Il sito potrebbe utilizzare anche cookie di siti o di web server diversi (c.d. cookie di "terze parti"): cio\' accade perche\' sul sito possono essere presenti elementi come, ad esempio, immagini, mappe, suoni, specifici link a pagine web di altri domini che risiedono su server diversi da quello sul quale si trova la pagina richiesta. In altre parole, detti cookie sono impostati direttamente da gestori di siti web o server diversi dal sito. I cookie di terze parti vengono utilizzati anche per personalizzare l\'esposizione pubblicitaria a seconda dell\'interesse dell\'utente e della frequenza di esposizione al messaggio.
'+ '

Third-party cookies: While navigating the site you may receive on your terminal even cookies from other sites or web servers ("third-party" cookies): this is because on the site may be present elements as, for example, images, maps, sounds, specific links to web pages of other domains, residing on different servers than the one hosting our website. In other words, these cookies are set directly by operators of web sites or servers different from the ones of our site. These third parties may set cookies while you visit our site and thus obtain information about the fact that you visited our website. If the user decides not to grant permission for the use of third-party cookies, the functions of the site that do not require such cookies only can be used.
'+ 'Per maggiori dettagli/For more details
'+ 'Abilitati/Enabled Disabilitati/Disabled

'+ '


'+ html_bottone_chiudi_configurazione; //Html della normativa estesa var html_notifica_estesa = '
'+ '
' + '
'+ '
'+ ''+ ''+ '
'+ '
' + testo_notifica_estesa_prima + '
'+ '
' + testo_notifica_estesa_seconda + '
'+ '
' + '
'; //Fine html della normativa estesa //Html della notifica stretta in alto var html_notifica = '
'+ '
'+ '
'+ '
'+ 'Utilizziamo i cookie per essere sicuri che tu possa avere la migliore esperienza sul nostro sito. Se continui ad utilizzare questo sito noi assumiamo che tu ne sia consapevole. Per saperne di piu\', conoscere i cookie utilizzati dal sito ed eventualmente disabilitarli, accedi alla Cookie Policy' + '
'+ '
' + '
' + 'Continua' + '
' + html_notifica_estesa + '
'; document.write(html_notifica); //Fine html della notifica stretta in alto e stampa su pagina var altezza_informativa = window.innerHeight; //Css della notifica var css_notifica_cookies = ''; document.write(css_notifica_cookies); //Fine css della pagina /* Funzioni di settaggio e lettura dei cookies */ function getCookie(c_name){ var c_value = document.cookie; var c_start = c_value.indexOf(" " + c_name + "="); if (c_start == -1){ c_start = c_value.indexOf(c_name + "="); } if (c_start == -1){ c_value = null; }else{ c_start = c_value.indexOf("=", c_start) + 1; var c_end = c_value.indexOf(";", c_start); if (c_end == -1){ c_end = c_value.length; } c_value = unescape(c_value.substring(c_start,c_end)); } return c_value; } function setCookie(c_name,value,exdays){ var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); //document.cookie=c_name + "=" + c_value; document.cookie = c_name+"="+c_value+"; path=/"; } if(getCookie(nome_dominio)!="1"){ document.getElementById("barraaceptacion").style.display="block"; //setCookie('nome_dominio','1',365); } function PonerCookie(){ setCookie(nome_dominio,'1',365); setCookie(nome_dominio +'_profilazione',$('#profilazione-enable').prop('checked'),365); setCookie(nome_dominio +'_terze',$('#terzeparti-enable').prop('checked'),365); document.getElementById("barraaceptacion").style.display="none"; } function salva_configurazione(){ PonerCookie(); if(!$('#profilazione-enable').prop('checked')){ clearallcookies('profilazione'); } if(!$('#terzeparti-enable').prop('checked')){ clearallcookies('terzeparti'); } location.reload(); } function clearallcookies(category){ console.log('clearallcookies ' + category); jQuery.each(cookielist, function(key, value) { if(category != null && key == category){ jQuery.each(value, function(key, value) { if(singlecookieexist(value.name) && installedDomain.indexOf(value.domain) != -1){ console.log('elimino cookie '+ value.name + ' dominio ' + value.domain); //document.cookie = value.name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/'; setCookie(value.name,"",-1); } }); } }); } function singlecookieexist(cookiename){ var cookieexist = false; if (document.cookie.indexOf(cookiename) >= 0) { cookieexist = true; } return cookieexist; } /* Fine funzioni di settaggio e lettura dei cookies */ //Funzione che serve ad aprire la normativa estesa dei cookies function apri_solo_normativa(){ if($('#barraaceptacion').is(":visible")){ //Nascondo la barra in alto $("#normativa_estesa").animate({ height: 'toggle' }); $('#barraaceptacion').hide(); }else{ //Faccio lo show della barra in alto $('#barraaceptacion').show(); //Setto minima altezza $('#barraaceptacion').css('min-height','28px'); //Rimuovo elementi che non servono $('.bottone_continua').remove(); $('.testo_notifica').remove(); //Visualizzo la normativa estesa $("#normativa_estesa").animate({ height: 'toggle' }); } } //Funzione che fa comparire la normativa estesa function cambia_configurazione_cookies(){ $('#testo_normativa_content_prima').hide(); $('#testo_normativa_content_seconda').show(); $('.tabs_cookie1').css('background-color','transparent'); $('.tabs_cookie2').css('background-color','#666666'); console.log('Visualizzo Configuratore'); } //Funzione che fa comparire il configuratore function cambia_chiudi_configurazione(){ $('#testo_normativa_content_prima').show(); $('#testo_normativa_content_seconda').hide(); $('.tabs_cookie2').css('background-color','transparent'); $('.tabs_cookie1').css('background-color','#666666'); console.log('Visualizzo Normativa'); } //Funzione richiamata al click su chiusura normativa function chiudi_normativa(){ if($('.testo_notifica').length){ $("#normativa_estesa").animate({ height: 'toggle' }); }else{ $("#normativa_estesa").animate({ height: 'toggle' }); $('#barraaceptacion').hide() } } //Funzione che va a lista cookies function visualizza_lista_cookie(){ chiudi_normativa(); window.location.href = 'index.php?pagina=privacy#cookies'; } $(document).ready(function(){ //Se non e' la prima volta su sito if(singlecookieexist(nome_dominio+'_first')){ //Se provendo dal dominio corrente setto tutto e chiudo var str = "https://www.companyandcompany.it/js/coknot/"; var n = str.indexOf(nome_dominio); if(n){ if(getCookie(nome_dominio)!='1'){ salva_configurazione(); } } }else{ setCookie(nome_dominio+'_first','1',365); } //Setto i valori dei cookie scelti var profilazione = getCookie(nome_dominio +'_profilazione'); profilazione = (profilazione=="true" || profilazione==null) ? true : false; var terze = getCookie(nome_dominio +'_terze'); terze = (terze=="true" || terze==null) ? true : false; //Checko le radio button if(profilazione){ $('#profilazione-enable').prop('checked','checked'); }else{ $('#profilazione-disable').prop('checked','checked'); } if(terze){ $('#terzeparti-enable').prop('checked','checked'); }else{ $('#terzeparti-disable').prop('checked','checked'); } //Setto altezza togliendo valore della barra in alto if(getCookie(nome_dominio)!="1"){ var altezza_normativa = parseInt($('#testo_normativa').css('height'))-113; }else{ var altezza_normativa = parseInt($('#testo_normativa').css('height'))-28; } $('#testo_normativa').css('height',altezza_normativa); $('#testo_normativa').css('max-height',altezza_normativa); $("#apri_normativa_cookies").click(function(){ console.log('apri normativa cookies prima'); $("#normativa_estesa").animate({ height: 'toggle' }); //Inizializzo con prima pagina normativa $('#testo_normativa_content_prima').show(); $('.tabs_cookie2').css('background-color','transparent'); $('.tabs_cookie1').css('background-color','#666666'); }); }); window.COOKIES_ENABLER = window.COOKIES_ENABLER || (function () { var elem_terze = document.getElementsByClassName('ce-terze'); var elem_profilazione = document.getElementsByClassName('ce-profilazione'); //Setto i valori dei cookie scelti var profilazione = getCookie(nome_dominio +'_profilazione'); profilazione = (profilazione=="true") ? true : false; var terze = getCookie(nome_dominio +'_terze'); terze = (terze=="true") ? true : false; var init = function () { if (terze){ getScripts_terze(); }else{ avviso_elementi(); } if (profilazione){ getScripts_profilazione(); } }; var getScripts_terze = function(){ var n = elem_terze.length; for (var i = 0; i < n; i++){ var s = document.createElement('script'); s.type = 'text/javascript'; for (var y = 0; y < elem_terze[i].attributes.length; y++) { var attrib = elem_terze[i].attributes[y]; if (attrib.specified) { if ((attrib.name != 'type') && (attrib.name != 'class')){ s.setAttribute(attrib.name, attrib.value); } } } s.innerHTML = elem_terze[i].innerHTML; document.body.appendChild(s); } } var avviso_elementi = function(){ var elementi = document.getElementsByClassName('ce-avviso'); var n = elementi.length; for (var i = 0; i < n; i++){ var s = document.createElement('span'); s.innerHTML = 'Elemento mancante a causa della disabilitazione dei cookies!'; //s.innerHTML = elem_terze[i].innerHTML; console.log(elementi[i]); if(elementi[i].getAttribute("type")=='text/plain'){ elementi[i].parentNode.appendChild(s); } } } var getScripts_profilazione = function(){ var n = elem_profilazione.length; for (var i = 0; i < n; i++){ var s = document.createElement('script'); s.type = 'text/javascript'; for (var y = 0; y < elem_profilazione[i].attributes.length; y++) { var attrib = elem_profilazione[i].attributes[y]; if (attrib.specified) { if ((attrib.name != 'type') && (attrib.name != 'class')){ s.setAttribute(attrib.name, attrib.value); } } } s.innerHTML = elem_profilazione[i].innerHTML; document.body.appendChild(s); } } return { init: init }; }()); COOKIES_ENABLER.init();