(function() {
// The expiration time of the cookie (normally 60 days)
// Die Laufzeit des Cookies (im Regelfall 60 Tage)
var emidCookieExpirationDays = 60;
// Please do not change below here!
// Ab hier bitte nicht verändern!
var getKey = 'emid';
var getValue = getParameterByName(getKey);
var storageKey = 'emid';
var emidCookieKey = 'emid';
var emidCookieDomain = window.location.hostname;
if(getValue) {
window.localStorage.setItem(storageKey, getValue);
setEmidCookie(emidCookieKey, getValue, emidCookieExpirationDays, emidCookieDomain);
}
function setEmidCookie(cname, cvalue, exdays, cdomain) {
var d = new Date();
d.setTime(d.getTime() + (exdays * 24*60*60*1000));
var expires = "Expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";Path=/;SameSite=none;Domain=" + cdomain + ";Secure";
}
function getParameterByName(e,n){n||(n=window.location.href),e=e.replace(/[[]]/g,"\$&");var r=new RegExp("[?&]"+e+"(=([^]*)|&|#|$)").exec(n);return r?r[2]?decodeURIComponent(r[2].replace(/\+/g," ")):"":null}
})();