var absRefPrefix = "/terms-gtc/"; var basePath = document.location.protocol + '//' + window.location.host + absRefPrefix; var sessionPath = "session/"; var cacheBuster = "no_cache=" + Date.now(); var classPath = "t" + "ypo3conf/ext/ciso_globalnavigation/Classes/"; if (window === window.top) { var loginBaseUrl = (document.location.protocol + '//' + window.location.host).replace('www', 'login'); var loginUrl = loginBaseUrl + "/login?redirect_url="; var optionalLoginUrl = loginBaseUrl + "/optional?redirect_url="; var loginRedirectUrl = basePath + sessionPath + "login"; var originParamLogin = "?origin=" + document.location.pathname; var idPosition = document.location.search.indexOf('id'); if (idPosition !== -1) { var matches = document.location.search.match(/[?&]id=([\d]+)/); if (matches !== null && matches.length > 1) { originParamLogin += "&id=" + matches.pop(); } } originParamLogin += "&" + cacheBuster; loginUrl += encodeURIComponent(loginRedirectUrl + originParamLogin); optionalLoginUrl += encodeURIComponent(loginRedirectUrl + originParamLogin); var request = new XMLHttpRequest(); request.addEventListener("load", function() { var result = this.responseText; if(result.length > 0) { var state = JSON.parse(result); var sessionState = state.sessionState; switch (sessionState) { case "invalidateSession": window.location.href = basePath + sessionPath + "invalidate?" + cacheBuster; break; case "localLogin": window.location.href = optionalLoginUrl; break; case "logout": window.location.href = basePath + sessionPath + 'logout?redirect_url=' + encodeURIComponent(document.location.href); break; default: // sessionState is null -> no action required } } }); var url = basePath + sessionPath + "state?" + cacheBuster; request.open("GET", url); request.send(); } var OAO = OAO || {}; // OAO refers to the global OAO variable. OAO.q = OAO.q || {}; OAO.q.c = OAO.q.c || []; OAO.q.navigation = OAO.q.navigation || []; OAO.q.c.push(['setMarket', 'de']); OAO.q.c.push(['setLanguage', 'de_DE']); OAO.q.c.push(['setPageName', window.document.location.pathname]); if(document.cookie.indexOf("eue_ftk") > -1) { OAO.q.c.push(['setFrontendToken', /eue_ftk=([A-z,a-z,0-9,-]*);*?/.exec(document.cookie)[1]]); OAO.q.navigation.push(['setLogoutUrl', basePath + sessionPath + "logout"]); } else { if (typeof window.loginUrlExtraCheck !== "undefined" && typeof window.loginUrlExtraCheck === "function") { if (window.loginUrlExtraCheck()) { OAO.q.navigation.push(['setLoginUrl', loginUrl]); } } else { OAO.q.navigation.push(['setLoginUrl', loginUrl]); } } if(document.cookie.indexOf("NGUserID") > -1) { var request = new XMLHttpRequest(); request.addEventListener('load', function(event) { if (request.status >= 200 && request.status < 300) { //console.log(request.responseText); } else { // console.warn(request.statusText, request.responseText); } }); var url = basePath + classPath + "Utility/NGUserID.php?no_cache=" + Date.now() + "&origin=" + basePath; request.open("GET", url); request.send(); } if(document.cookie.indexOf("ionosid") > -1) { var request = new XMLHttpRequest(); request.addEventListener('load', function(event) { if (request.status >= 200 && request.status < 300) { console.log(request.responseText); } else { console.warn(request.statusText, request.responseText); } }); var url = basePath + classPath + "Utility/IonosID.php?no_cache=" + Date.now() + "&origin=" + basePath; request.open("GET", url); request.send(); } var productArea = null; var categoryEnumElement = document.querySelector("meta[name='category-enum']"); if (categoryEnumElement !== null) { productArea = categoryEnumElement.getAttribute('content'); } else { var categoryMetaElement = document.querySelector("meta[name='category-name']"); if (categoryMetaElement !== null) { productArea = categoryMetaElement.getAttribute('content'); } } if (productArea !== null) { OAO.q.navigation.push(['setProductArea', productArea]); } else { OAO.q.navigation.push(['setProductArea', 'Home']); }