(function(d, html){ window._ipc_cookie_confirmed = function() { var d = document, dom = d.location.hostname, idx = 0, s = d.createElement('SCRIPT'); if (dom.indexOf('.co.jp') >= 0) { idx = dom.lastIndexOf('.', dom.indexOf('.co.jp') - 1); } else { idx = dom.lastIndexOf('.', dom.lastIndexOf('.') - 1); } dom = dom.substring(idx); if (dom.indexOf('.') !== 0) dom = '.' + dom; console.log(dom); if (window.localStorage) { localStorage.setItem('ipc_cookie', 'confirmed'); } d.cookie = 'ipc_cookie=confirmed;path=/;domain=' + dom + ';max-age=31536000;secure;samesite=strict'; if (d.getElementById('ipc_cookie_confirmation')) d.getElementById('ipc_cookie_confirmation').style.display = 'none'; s.src = location.protocol + '//cmp' + dom + '/ipc_cookie_confirmed.js'; s.async = "async"; d.head.appendChild(s); }; var _c = d.cookie, _popup = function(d, html) { var p = d.createElement('ASIDE'); p.id = 'ipc_cookie_confirmation'; p.innerHTML = html; d.body.appendChild(p); }; if (_c.indexOf('ipc_cookie') >= 0) return window._ipc_cookie_confirmed(); if (window.localStorage && localStorage.getItem('ipc_cookie')) return window._ipc_cookie_confirmed(); if (d.readyState === 'loading') { d.addEventListener('DOMContentLoaded', function(event) { _popup(d, html); }); } else { _popup(d, html); } })(document, '' + '