var gPopupMask=null;var gPopupContainer=null;var gPopFrame=null;var gReturnFunc;var gPopupIsShown=false;var gDefaultPage="/loading.html";var gHideSelects=false;var gReturnVal=null;var gTabIndexes=new Array();var gTabbableTags=new Array("A","BUTTON","TEXTAREA","INPUT","IFRAME");if(!document.all){document.onkeypress=keyDownHandler}function initPopUp(){theBody=document.getElementsByTagName("BODY")[0];popmask=document.createElement("div");popmask.id="popupMask";popcont=document.createElement("div");popcont.id="popupContainer";popcont.innerHTML='<div id="popupInner"><div id="popupTitleBar"><div id="popupTitle"></div><div id="popupControls"><a href="#" onclick="hidePopWin(false); return false;" id="popCloseBox">Hier schliessen</a> oder ESC dr&uuml;cken</div></div><iframe src="'+gDefaultPage+'" style="width:100%;height:100%;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="100%" height="100%"></iframe></div>';theBody.appendChild(popmask);theBody.appendChild(popcont);gPopupMask=document.getElementById("popupMask");gPopupContainer=document.getElementById("popupContainer");gPopFrame=document.getElementById("popupFrame");var A=parseInt(window.navigator.appVersion.charAt(0),10);if(A<=6&&window.navigator.userAgent.indexOf("MSIE")>-1){gHideSelects=true}var B=document.getElementsByTagName("a");for(i=0;i<B.length;i++){if(B[i].className.indexOf("submodal")==0){B[i].onclick=function(){var D=400;var C=200;params=this.className.split("-");if(params.length==3){D=parseInt(params[1]);C=parseInt(params[2])}showPopWin(this.href,D,C,null);return false}}}}addEvent(window,"load",initPopUp);function showPopWin(B,E,A,C){gPopupIsShown=true;disableTabIndexes();gPopupMask.style.display="block";gPopupContainer.style.display="block";centerPopWin(E,A);var D=parseInt(document.getElementById("popupTitleBar").offsetHeight,10);gPopupContainer.style.width=E+"px";gPopupContainer.style.height=(A+D)+"px";setMaskSize();gPopFrame.style.width=parseInt(document.getElementById("popupTitleBar").offsetWidth,10)+"px";gPopFrame.style.height=(A)+"px";gPopFrame.src=B;gReturnFunc=C;if(gHideSelects==true){hideSelectBoxes()}window.setTimeout("setPopTitle();",600)}var gi=0;function centerPopWin(G,A){if(gPopupIsShown==true){if(G==null||isNaN(G)){G=gPopupContainer.offsetWidth}if(A==null){A=gPopupContainer.offsetHeight}var E=document.getElementsByTagName("BODY")[0];var B=parseInt(getScrollTop(),10);var D=parseInt(E.scrollLeft,10);setMaskSize();var F=parseInt(document.getElementById("popupTitleBar").offsetHeight,10);var C=getViewportHeight();var H=getViewportWidth();gPopupContainer.style.top=(B+((C-(A+F))/2))+"px";gPopupContainer.style.left=(D+((H-G)/2))+"px"}}addEvent(window,"resize",centerPopWin);addEvent(window,"scroll",centerPopWin);window.onscroll=centerPopWin;function setMaskSize(){var B=document.getElementsByTagName("BODY")[0];var A=getViewportHeight();var C=getViewportWidth();if(A>B.scrollHeight){popHeight=A}else{popHeight=B.scrollHeight}if(C>B.scrollWidth){popWidth=C}else{popWidth=B.scrollWidth}gPopupMask.style.height=popHeight+"px";gPopupMask.style.width=popWidth+"px"}function hidePopWin(A){gPopupIsShown=false;var B=document.getElementsByTagName("BODY")[0];B.style.overflow="";restoreTabIndexes();if(gPopupMask==null){return }gPopupMask.style.display="none";gPopupContainer.style.display="none";if(A==true&&gReturnFunc!=null){gReturnVal=window.frames.popupFrame.returnVal;window.setTimeout("gReturnFunc(gReturnVal);",1)}gPopFrame.src=gDefaultPage;if(gHideSelects==true){displaySelectBoxes()}}function setPopTitle(){return ;if(window.frames.popupFrame.document.title==null){window.setTimeout("setPopTitle();",10)}else{document.getElementById("popupTitle").innerHTML=window.frames.popupFrame.document.title}}function keyDownHandler(A){if(gPopupIsShown&&A.keyCode==9){return false}}document.onkeydown=function(A){if(A==null){keycode=event.keyCode}else{keycode=A.which}if(keycode==27){hidePopWin(false)}};function disableTabIndexes(){if(document.all){var C=0;for(var B=0;B<gTabbableTags.length;B++){var D=document.getElementsByTagName(gTabbableTags[B]);for(var A=0;A<D.length;A++){gTabIndexes[C]=D[A].tabIndex;D[A].tabIndex="-1";C++}}}}function restoreTabIndexes(){if(document.all){var C=0;for(var B=0;B<gTabbableTags.length;B++){var D=document.getElementsByTagName(gTabbableTags[B]);for(var A=0;A<D.length;A++){D[A].tabIndex=gTabIndexes[C];D[A].tabEnabled=true;C++}}}}function hideSelectBoxes(){for(var A=0;A<document.forms.length;A++){for(var B=0;B<document.forms[A].length;B++){if(document.forms[A].elements[B].tagName=="SELECT"){document.forms[A].elements[B].style.visibility="hidden"}}}}function displaySelectBoxes(){for(var A=0;A<document.forms.length;A++){for(var B=0;B<document.forms[A].length;B++){if(document.forms[A].elements[B].tagName=="SELECT"){document.forms[A].elements[B].style.visibility="visible"}}}}function addEvent(D,C,A){if(D.addEventListener){D.addEventListener(C,A,false);return true}else{if(D.attachEvent){var B=D.attachEvent("on"+C,A);return B}else{return false}}}function removeEvent(E,D,B,A){if(E.removeEventListener){E.removeEventListener(D,B,A);return true}else{if(E.detachEvent){var C=E.detachEvent("on"+D,B);return C}else{alert("Handler could not be removed")}}}function getViewportHeight(){if(window.innerHeight!=window.undefined){return window.innerHeight}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientHeight}if(document.body){return document.body.clientHeight}return window.undefined}function getViewportWidth(){var B=17;var A=null;if(window.innerWidth!=window.undefined){return window.innerWidth}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientWidth}if(document.body){return document.body.clientWidth}}function getScrollTop(){if(self.pageYOffset){return self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop}else{if(document.body){return document.body.scrollTop}}}}function getScrollLeft(){if(self.pageXOffset){return self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft}else{if(document.body){return document.body.scrollLeft}}}};
