function getCookie(cname) { var name = cname + "=", decodedCookie = decodeURIComponent(document.cookie), ca = decodedCookie.split(';'), ca_length = ca.length; for (var i = 0; i < ca_length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } function showCookieBanner() { function onClickBannerButton() { var date = new Date(); // EU seems to be ok with expiration times up to 13 months. // Until determined otherwise it is set to 1 year here. date.setTime(date.getTime() + 31536000000); document.cookie = 'cookieConsent=1;' + 'expires=' + date.toUTCString() + ';path=/;'; $("#cookie_banner").slideToggle(); } var banner, top, bottom, margin, vertical_align, platform = 'desktop'; if (platform == 'mobile') { top = "0"; bottom = "auto"; margin_vertical = "10px"; padding_horizontal = "10px"; vertical_align = "top"; fontSize = "15px"; acceptElementBackground = "black"; acceptElementMinWidth = "0"; acceptTextPadding = "0"; } else { top = "auto"; bottom = "0"; margin_vertical = "40px"; padding_horizontal = "10%"; vertical_align = "bottom"; fontSize = "18px"; acceptElementBackground = "#158602"; acceptElementMinWidth = "120px"; acceptTextPadding = "0 20px"; } banner = $("
") .css({"position": "fixed", "left": "0", "right": "0", "bottom": bottom, "top": top, "z-index": "99", "overflow": "hidden", "width": "100%", "display": "none", "background": "black"}) .append($("