if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){return this.substr(position||0,searchString.length)===searchString}}if(!String.prototype.endsWith){String.prototype.endsWith=function(pattern){var d=this.length-pattern.length;return d>=0&&this.lastIndexOf(pattern)===d}}function gdprGetOccurrencesOfScript(url){var occurrences=0;var scripts=document.getElementsByTagName('script');for(var i=scripts.length;i--;){if(scripts[i].src==""){continue}if(String(scripts[i].src).startsWith(url)){occurrences++}}return occurrences}var gdprReferenceRequest="4";var gdprReferenceSession="4";if(gdprReferenceSession==""){console.log("Parametri insufficienti per il plugin GDPR.")}var gdprId="3458595a313936384058595a3139363821";var gdprNome="Cartiere";var gdprCognome="Carrara S.p.A.";var gdprSocieta="Cartiere Carrara S.p.A.";var gdprEmail="nomail@bulkysoft.com";var gdprPEC="";var gdprSitoWeb="www.bulkysoft.com/";var gdprIndirizzo="V.le S. Lavagnini, 41 â 50129 Firenze (FI) â Italia";var gdprCellulare="0583985101";var gdprCodiceFiscale="00385850474";var gdprPartitaIVA="00385850474";var gdprIconaVisibile="S";var gdprFooterVisibile="S";if(gdprSocieta==""){gdprSocieta=gdprNome+" "+gdprCognome}var gdprURLParams=new URLSearchParams(window.location.search);var gdprJob=gdprURLParams.get('GDPRJOB');var pluginAppenaInstallato=false;var gdprPathCookieName="crtrcrrrsp/";if(gdprPathCookieName.endsWith("/")){gdprPathCookieName=gdprPathCookieName.substring(0,gdprPathCookieName.length-1)}var gdprReferenceCookieName="4";var gdprSuffixCookie=gdprPathCookieName+"_"+gdprReferenceCookieName;var gdprExpiredCookieDateInDays=182;var gdprPrefixCookie="DG_GDPR_COOKIE_"+gdprSuffixCookie+"_";var gdprIdCategoryNecessario="1";var gdprHead;var gdprBody;var dg_gdpr_cookie_not_setting=0;var dg_gdpr_cookie_required_not_setting=0;var dg_gdpr_cookie_not_required_not_setting=0;var dg_gdpr_cookie_category={};var dg_gdpr_documentCookieComplete='';var dg_gdpr_documentSetCookieComplete=[];var windowLocationHostnameBase=window.location.hostname;var windowLocationHostnameBaseSplit=windowLocationHostnameBase.split('.');windowLocationHostnameBase=windowLocationHostnameBaseSplit[windowLocationHostnameBaseSplit.length-2]+"."+windowLocationHostnameBaseSplit[windowLocationHostnameBaseSplit.length-1];var dg_gdpr_all_cookie_domain=['',windowLocationHostnameBaseSplit[windowLocationHostnameBaseSplit.length-2]+"."+windowLocationHostnameBaseSplit[windowLocationHostnameBaseSplit.length-1]];for(let i=windowLocationHostnameBaseSplit.length-3;i>=0;i--){dg_gdpr_all_cookie_domain.push(windowLocationHostnameBaseSplit[i]+'.'+dg_gdpr_all_cookie_domain[1])}var seChiamanteAutorizzato=true;if(gdprSitoWeb.indexOf(window.location.hostname)>=0){if(!(window.self!==window.top)){seChiamanteAutorizzato=true}else{seChiamanteAutorizzato=false}}else{seChiamanteAutorizzato=false}window.addEventListener("load",function(evt){if(seChiamanteAutorizzato){document.addEventListener("click",function(e){e=e||window.event;var target=e.target||e.srcElement;if(target.id=="ID_DIV_GDPR_DIALOG"){gdprHideDialog(document.getElementById("ID_DIV_GDPR_DIALOG"))}else if(target.id=="ID_DIV_GDPR_DIALOG_REFUSE_COMUNICATION"){gdprHideDialog(document.getElementById("ID_DIV_GDPR_DIALOG_REFUSE_COMUNICATION"))}},false);gdprHead=document.getElementsByTagName("head")[0];gdprBody=document.getElementsByTagName("body")[0];if(gdprGetOccurrencesOfScript("https://central.gdprincloud.eu/MainProject/gdpr_external_plugin.php")>1){}}else{console.log("Chiamate non autorizzato gdprSitoWeb="+gdprSitoWeb+" window.location.hostname="+window.location.hostname)}});if(gdprGetLocalStorage(gdprPrefixCookie+"LAST_UPDATE_ON_PIATTAFORM")==""){pluginAppenaInstallato=true;gdprSetLocalStorage(gdprPrefixCookie+"LAST_UPDATE_ON_PIATTAFORM",gdprGetCurrentMillisecond())}if(gdprGetLocalStorage(gdprPrefixCookie+"UUID")==""){gdprSetLocalStorage(gdprPrefixCookie+"UUID",gdprGetUUID())}if(gdprGetLocalStorage(gdprPrefixCookie+"CATEGORY_SELECTION")==""){gdprSetLocalStorage(gdprPrefixCookie+"CATEGORY_SELECTION","{}")}var differenza=gdprGetCurrentMillisecond()-parseInt(gdprGetLocalStorage(gdprPrefixCookie+"LAST_UPDATE_ON_PIATTAFORM"));var differenzaInMinuti=((differenza/(1000*60))%60);var differenzaInOre=(differenza/(1000*60*60));var differenzaInGiorni=(differenza/(24*60*60*1000));var cookieSettedByMetod='';var dg_gdpr_cookie_orig=Object.getOwnPropertyDescriptor(Document.prototype,'cookie')||Object.getOwnPropertyDescriptor(HTMLDocument.prototype,'cookie');var dg_gdpr_cookie_setter_orig=Object.getOwnPropertyDescriptor(Document.prototype,'cookie').set.bind(document);var dg_gdpr_cookie_getter_orig=Object.getOwnPropertyDescriptor(Document.prototype,'cookie').get.bind(document);if(gdprJob!=null&&gdprJob=="SYNC"){console.log("Chiamata con gdprJob SYNC");window.addEventListener("load",function(evt){setTimeout(function(){dg_gdpr_documentCookieComplete=document.cookie;gdprSendCookieToServerJson(true)},10)})}else{console.log("Utilizzo le configirazioni salvate nel cookie (Differenza giorni "+differenzaInGiorni+")");dg_gdpr_cookie_category=JSON.parse(gdprGetLocalStorage(gdprPrefixCookie+"CATEGORY_SELECTION"));console.log("Riprendo le configurazioni dal server ed aggiorno il cookie (Differenza giorni "+differenzaInGiorni+")");gdprGetCategoryAndCookieFromServerJson(false);gdprResetSetAndGetClientCookieWithUserChoise();window.addEventListener("load",function(evt){gdprAppend(gdprBody,"div",gdprAlert(gdprAlertStartContent()));if(gdprIconaVisibile=="S"){gdprAppend(gdprBody,"a",gdprIcon())}if(gdprFooterVisibile=="S"){gdprAppend(gdprBody,"a",gdprFooter())}gdprRefreshGDPRCookieStatus(true);let orazioTest='_ga';for(var key1 in dg_gdpr_documentSetCookieComplete){let setCookieEntire=dg_gdpr_documentSetCookieComplete[key1];let setCookieEntireUpdatedWithUserChoise='';let setCookieEntireSplit=setCookieEntire.split(";");let actualCookieName=(setCookieEntireSplit[0].split("="))[0];for(var key2 in setCookieEntireSplit){let setCookieSingleSplit=setCookieEntireSplit[key2].trim().split("=");if(setCookieSingleSplit[0].trim()=="expires"){setCookieEntireSplit[key2]=" "+setCookieSingleSplit[0]+"=Thu, 01 Jan 1970 00:00:01 GMT"}if(setCookieSingleSplit[0].trim()!=''){setCookieEntireUpdatedWithUserChoise+=setCookieEntireSplit[key2]}}}})}function gdprResetSetAndGetClientCookieWithUserChoise(){Object.defineProperty(document,"cookie",{get:function(){let cookieNameEnabledFromDgGdprCookieCategoryStorage=gdprReturnCookieNameEnabledFromDgGdprCookieCategoryStorage();let cookieNameSplit=dg_gdpr_cookie_orig.get.call(document).split("=");console.log("getto "+cookieNameSplit[0]+" => "+dg_gdpr_cookie_orig.get.call(document));return dg_gdpr_cookie_orig.get.call(document)},set:function(val){if(dg_gdpr_documentSetCookieComplete.indexOf(val)===-1){dg_gdpr_documentSetCookieComplete.push(val)}let cookieNameEnabledFromDgGdprCookieCategoryStorage=gdprReturnCookieNameEnabledFromDgGdprCookieCategoryStorage();let cookieSplit=val.split(";");let cookieNameSplit=cookieSplit[0].split("=");console.log("setto "+cookieNameSplit[0]+" = "+val);dg_gdpr_cookie_orig.set.call(document,val)}})}function gdprCompareLocalCookieWithServerReturnedCookie(){let cookies=gdprGetCookiesArray();let dg_gdpr_cookie_category_temp=JSON.parse(gdprGetLocalStorage(gdprPrefixCookie+"CATEGORY_SELECTION"));let localCookieChanged=false;for(let clientCookieName in cookies){clientCookieName=clientCookieName.replace(" ","_");let clientCookieNameFounded=false;for(let key in dg_gdpr_cookie_category_temp){for(let key_ in dg_gdpr_cookie_category_temp[key].COOKIE){let serverCookieName=dg_gdpr_cookie_category_temp[key].COOKIE[key_].NOME_COOKIE;if(clientCookieName==serverCookieName){clientCookieNameFounded=true}}}if(!clientCookieNameFounded){localCookieChanged=true}}return localCookieChanged}function gdprReturnCookieNameEnabledFromDgGdprCookieCategoryStorage(){let clientCookieName=[];for(let key in dg_gdpr_cookie_category){for(let key_ in dg_gdpr_cookie_category[key].COOKIE){if(dg_gdpr_cookie_category[key].COOKIE_CATEGORY_VALUE=="1"){clientCookieName.push(dg_gdpr_cookie_category[key].COOKIE[key_].NOME_COOKIE)}}}return clientCookieName}function gdprSendCookieToServerJson(getCategory){var cookieForUrl="";var cookies=gdprGetCookiesArray();let sendCookieToServer=false;for(var clientCookieName in cookies){clientCookieName=clientCookieName.replace(" ","_");cookieForUrl+=clientCookieName+"_COKSEP_"}var xhttp=new XMLHttpRequest();var urlTemp="//banner.gdprincloud.eu/MainProject/php/ajax_external_gdpr_action.php?"+"ID_USER="+gdprId+"&"+"HOST_NAME_BASE="+encodeURIComponent(windowLocationHostnameBase)+"&"+"HOST_NAME="+encodeURIComponent(gdprSitoWeb)+"&"+"UUID="+gdprGetLocalStorage(gdprPrefixCookie+"UUID")+"&"+"CONFIG=5858595a313936384058595a3139363821&"+"PATH=637274726372727273702f58595a313936384058595a3139363821&"+"job=register_cookie_from_monitoring_plugin_json&"+"cookie="+cookieForUrl;xhttp.open("POST",urlTemp,true);xhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhttp.onreadystatechange=function(){if(xhttp.readyState==4&&xhttp.status==200){if(getCategory){gdprGetCategoryAndCookieFromServerJson(true)}}};xhttp.send()}function gdprGetCategoryAndCookieFromServerJson(showBanner){var urlTemp="//banner.gdprincloud.eu/MainProject/php/ajax_external_gdpr_action.php?"+"ID_USER="+gdprId+"&"+"HOST_NAME="+encodeURIComponent(gdprSitoWeb)+"&"+"UUID="+gdprGetLocalStorage(gdprPrefixCookie+"UUID")+"&"+"CONFIG=5858595a313936384058595a3139363821&"+"PATH=637274726372727273702f58595a313936384058595a3139363821&"+"job=user_gdpr_cookie_privacy_with_category_json";var xhttp=new XMLHttpRequest();xhttp.onreadystatechange=function(){if(xhttp.readyState==4&&xhttp.status==200){var json=JSON.parse(this.response);dg_gdpr_cookie_category=json.data;gdprSetLocalStorage(gdprPrefixCookie+"CATEGORY_SELECTION",JSON.stringify(dg_gdpr_cookie_category));if(showBanner){gdprAppend(gdprBody,"div",gdprAlert(gdprAlertStartContent()));if(gdprIconaVisibile=="S"){gdprAppend(gdprBody,"a",gdprIcon())}if(gdprFooterVisibile=="S"){gdprAppend(gdprBody,"a",gdprFooter())}gdprRefreshGDPRCookieStatus(true);gdprDeleteAllCookieNotAccepted()}}};xhttp.open("POST",urlTemp,false);xhttp.send()}function gdprSendToServerCookieCategorySeletionJson(){var cookieCategoryForUrl="";for(var key in dg_gdpr_cookie_category){cookieCategoryForUrl+=dg_gdpr_cookie_category[key].ID_CATEGORIA+"-"+dg_gdpr_cookie_category[key].COOKIE_CATEGORY_VALUE+"_COKSEP_"}var xhttp=new XMLHttpRequest();var d=new Date();var urlTemp="//banner.gdprincloud.eu/MainProject/php/ajax_external_gdpr_action.php?"+"IP=18.223.108.xxx&"+"HOST_NAME="+encodeURIComponent(gdprSitoWeb)+"&"+"UUID="+gdprGetLocalStorage(gdprPrefixCookie+"UUID")+"&"+"DATA="+d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate()+" "+d.getHours()+"_"+d.getMinutes()+"_"+d.getSeconds()+"&"+"ID_USER="+gdprId+"&"+"CONFIG=5858595a313936384058595a3139363821&"+"PATH=637274726372727273702f58595a313936384058595a3139363821&"+"job=register_cookie_category_selection_from_gdpr_plugin_json&"+"cookieCategory="+cookieCategoryForUrl;xhttp.open("POST",urlTemp,true);xhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhttp.onreadystatechange=function(){if(xhttp.readyState==4&&xhttp.status==200){}};xhttp.send()}function gdprChangeAlertContent(param){if(param=="1"){document.getElementById("ID_DIV_GDPR_ALERT_CONTENT").innerHTML=gdprAlertStartContent()}else if(param=="2"){document.getElementById("ID_DIV_GDPR_ALERT_CONTENT").innerHTML=gdprAlertConsensContent();document.getElementById("GDPR_INFORMATIVA").innerHTML='Loading...';gdprGetUserInformativaFromServer()}else if(param=="3"){document.getElementById("ID_DIV_GDPR_ALERT_CONTENT").innerHTML=gdprAlertContactDPOContent()}}function gdprAlert(html_){var html=''+'
ℙ
'}function gdprFooter(){return'Rivedi Scelta Cookies ℙ