var gaId = 'UA-1113405-34'; function deleteCookie(name) { var domain = window.location.href.indexOf('localhost') > -1 ? 'localhost' : '.arcomuralla.com'; var cookiePath = name + '=; Path=/; Domain=' + domain + '; Expires=Thu, 01 Jan 1970 00:00:01 GMT;'; console.log(cookiePath); document.cookie = cookiePath; } function ToggleCookies(bEnable) { window['ga-disable-' + gaId] = !bEnable; console.log('ToggleCookies', bEnable); console.log('ga-disable-' + gaId, window['ga-disable-' + gaId]); if (!bEnable) { deleteCookie("__utma"); deleteCookie("__utmb"); deleteCookie("__utmc"); deleteCookie("__utmt"); deleteCookie("__utmz"); deleteCookie("PHPSESSID"); } else { window.location = window.location.href; } } window.addEventListener("load", function(){ window.cookieconsent.initialise({ "palette": { "popup": { "background": "#237afc" }, "button": { "background": "#fff", "text": "#237afc" } }, "position": "bottom", "static": true, "type": "opt-out", "content": { "message": "Utilizamos cookies propias para el funcionamiento de la navegación por la web \ y cookies de terceros para fines estadísticos \ Para seguir navegando pulse el botón 'Aceptar'. \ Al pulsar en 'Rechazar' es posible que algunas funcionalidades de la web no estarán disponibles. \
Puede cambiar su elección en cualquier momento pulsando el botón azul en la parte inferior izquierda de la página.\
Para obtener más información, pulse en el siguiente enlace:", "dismiss": "Acepto", "deny": "Rechazo", "link": "http://www.arcomuralla.com/politica_cookies", "href": 'http://www.arcomuralla.com/politica_cookies.php', }, onInitialise: function (status) { var type = this.options.type; var didConsent = this.hasConsented(); if (type == 'opt-in' && didConsent) { ToggleCookies(true); } if (type == 'opt-out' && !didConsent) { ToggleCookies(false); } $('.cc-revoke.cc-bottom.cc-animate').show(); }, onStatusChange: function(status, chosenBefore) { var type = this.options.type; var didConsent = this.hasConsented(); if (type == 'opt-in' && didConsent) { ToggleCookies(true); } if (type == 'opt-out' && !didConsent) { ToggleCookies(false); } }, onRevokeChoice: function() { var type = this.options.type; if (type == 'opt-in') { ToggleCookies(true); } if (type == 'opt-out') { ToggleCookies(false); } }, }) }); window.consentCookieValue = (document.cookie.match(/^(?:.*;)?\s*cookieconsent_status\s*=\s*([^;]+)(?:.*)?$/)||[,null])[1]; console.log(consentCookieValue); // Fix to display cookie consent link 3 seconds after page load $(document).ready(function() { setTimeout(function() { $('.cc-revoke.cc-bottom.cc-animate').show(); }, 3000); });