function isIE() { return (/MSIE (\d+\.\d+);/.test(navigator.userAgent)); } function isFullscreen() { try { return ((top.innerWidth == screen.width) && (top.innerHeight == screen.height)); } catch (e) { return false; } } function isActivexEnabled() { var supported = null; try { supported = !!new ActiveXObject("htmlfile"); } catch (e) { supported = false; } return supported; } function isMetro() { if (!isIE()) return false; return !isActivexEnabled() && isFullscreen(); } window.onload=function() { document.getElementById("localBKU").style.display="block"; return; } function bkuLocalClicked() { setMandateSelection(); } function bkuOnlineClicked() { if (isMetro()) document.getElementById("metroDetected").style.display="block"; document.getElementById("localBKU").style.display="block"; /* if (checkMandateSSO()) return; */ setMandateSelection(); /* setSSOSelection(); */ var iFrameURL = "$contextPath$submitEndpoint" + "?"; iFrameURL += "&pendingid=" + "$pendingReqID"; iFrameURL += "&bkuURI=" + "$bkuOnline"; iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; generateIFrame(iFrameURL); } function bkuHandyClicked() { document.getElementById("localBKU").style.display="none"; /* if (checkMandateSSO()) return; */ setMandateSelection(); /* setSSOSelection(); */ var iFrameURL = "$contextPath$submitEndpoint" + "?"; iFrameURL += "&pendingid=" + "$pendingReqID"; iFrameURL += "&bkuURI=" + "$bkuHandy"; iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; generateIFrame(iFrameURL); } function storkClicked() { document.getElementById("localBKU").style.display="none"; /* if (checkMandateSSO()) return; */ setMandateSelection(); /* setSSOSelection(); */ var ccc = "AT"; var countrySelection = document.getElementById("cccSelection"); if (countrySelection != null) { ccc = document.getElementById("cccSelection").value; } var iFrameURL = "$contextPath$submitEndpoint" + "?"; iFrameURL += "&pendingid=" + "$pendingReqID"; #if($bkuOnline) iFrameURL += "&bkuURI=" + "$bkuOnline"; #end iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; iFrameURL += "&CCC=" + ccc; generateIFrame(iFrameURL); } function generateIFrame(iFrameURL) { var el = document.getElementById("bkulogin"); var width = el.clientWidth; var heigth = el.clientHeight - 20; var parent = el.parentNode; iFrameURL += "&heigth=" + heigth; iFrameURL += "&width=" + width; var iframe = document.createElement("iframe"); iframe.setAttribute("src", iFrameURL); iframe.setAttribute("width", el.clientWidth - 1); iframe.setAttribute("height", el.clientHeight - 1); iframe.setAttribute("frameborder", "0"); iframe.setAttribute("scrolling", "no"); iframe.setAttribute("title", "Login"); parent.replaceChild(iframe, el); } function setMandateSelection() { document.getElementById("useMandate").value = "false"; var checkbox = document.getElementById("mandateCheckBox"); if (checkbox != null) { if (document.getElementById("mandateCheckBox").checked) { document.getElementById("useMandate").value = "true"; } } } function onChangeChecks() { if (self.innerWidth < 650) { document.getElementById("moaidform").setAttribute("target","_parent"); } else { document.getElementById("moaidform").removeAttribute("target"); } } function checkIfBrowserSupportsJava(){ console.log("Browser is Chrome: "+checkIfBrowserIsChrome()); console.log("Browser is Safari: "+checkIfBrowserIsSafari()); console.log("Browser is Edge: "+checkIfBrowserIsEdge()); var cnt = 0; if(checkIfBrowserIsChrome())cnt++; if(checkIfBrowserIsEdge())cnt++; if(checkIfBrowserIsSafari())cnt++; if(cnt==0 || cnt>1)//cnt>1 means perhaps wrong detection return true; var image = document.getElementById("bkuimage"); var srcatt = image.getAttribute("src"); var last = srcatt.substring(srcatt.lastIndexOf('/')+1); srcatt = srcatt.replace(last,'karte_deactivated.png'); image.setAttribute("src",srcatt); var button = document.getElementsByName("bkuButtonOnline")[0]; button.setAttribute("class","browserInfoButton"); button.setAttribute("title","Java wird nicht unterstützt, klicken für mehr Informationen."); button.setAttribute("onClick","alert('Java wird von Ihrem Browser nicht unterstützt, ist jedoch für den Betrieb der Online Bürgerkartenumgebung notwendig.\\nWollen Sie dennoch die Online Bürgerkartenumgebung verwenden, wird zur Zeit Java noch von Firefox und MS Internet Explorer unterstützt. \\nAlternativ koennen Sie auch eine lokale Bürgerkartenumgebung verwenden, verfügbar unter www.buergerkarte.at.');"); return false; } function checkIfBrowserIsChrome(){ var chrome_defined = !!window.chrome;//chrome object defined var webstore_defined = false; if(window.chrome){ webstore_defined = !!window.chrome.webstore; } return chrome_defined && webstore_defined; } function checkIfBrowserIsEdge(){//edge also defines the chrome object, but not the webapp var chrome_defined = !!window.chrome;//chrome object defined var webstore_defined = true; if(window.chrome){ webstore_defined = !!window.chrome.webstore; } return chrome_defined && !webstore_defined; } function checkIfBrowserIsSafari(){ var cond1 = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; return cond1; } /* function setSSOSelection() { document.getElementById("useSSO").value = "false"; var checkbox = document.getElementById("SSOCheckBox"); if (checkbox != null) { if (document.getElementById("SSOCheckBox").checked) { document.getElementById("useSSO").value = "true"; } } } */ /* function checkMandateSSO() { var sso = document.getElementById("SSOCheckBox"); var mandate = document.getElementById("mandateCheckBox"); if (sso.checked && mandate.checked) { alert("Anmeldung in Vertretung in kombination mit Single Sign-On wird aktuell noch nicht unterstützt!") mandate.checked = false; sso.checked = false; return true; } else { return false; } } */