function scriviCookie(nomeCookie,valoreCookie,durataCookie)
{
var scadenza = new Date();
var adesso = new Date();
scadenza.setTime(adesso.getTime() + (parseInt(durataCookie) * 60000));
document.cookie = nomeCookie + '=' + escape(valoreCookie) + '; expires=' + scadenza.toGMTString() + '; path = /';
}
scriviCookie('rlx-consent','false',60);
window.addEventListener('CookiebotOnAccept', function (e) {
if (Cookiebot.consent.statistics)
{
scriviCookie('rlx-consent','true',5256000);
document.getElementById("rlx-corner").contentWindow.postMessage("consentTrue","https://corners.rolex.com");
document.getElementById("rlx-corner").contentWindow.postMessage("consentValidation", "https://corners.rolex.com");
_satellite.setVar("Analyticsconsent","true");
_satellite.track("PageView");
} else {
document.getElementById("rlx-corner").contentWindow.postMessage("consentFalse","https://corners.rolex.com");
scriviCookie('rlx-consent','false',5256000);
_satellite.setVar("Analyticsconsent","false");
}
}, false);
window.addEventListener('CookiebotOnDecline', function (e) {
if (Cookiebot.declined)
{
document.getElementById("rlx-corner").contentWindow.postMessage("consentFalse","https://corners.rolex.com");
scriviCookie('rlx-consent','false',5256000);
_satellite.setVar("Analyticsconsent","false");
} else {
scriviCookie('rlx-consent','true',5256000);
document.getElementById("rlx-corner").contentWindow.postMessage("consentTrue","https://corners.rolex.com");
document.getElementById("rlx-corner").contentWindow.postMessage("consentValidation", "https://corners.rolex.com");
_satellite.setVar("Analyticsconsent","true");
_satellite.track("PageView");
}
}, false);
// scriviCookie('rlx-consent','false',60);