﻿function showNote(posId,msg) {
    toolDisplayObj = document.getElementById(posId);
    if (toolDisplayObj) {
     toolDisplayObj.innerHTML = msg;
    } 
}
  
function clearInput(obj) {
    obj.value="";
    obj.onclick="";
}

function lightboxx(objID,mode,obj) {
    if(!document.getElementById("lightbox")) {
        lightboxOuter=document.createElement("span");
        lightboxOuter.id="lightboxOuter";
        lightbox=document.createElement("a");
        lightbox.href= "javascript:lightboxx('"+objID+"','self')";
        lightbox.title="Fenster schließen";
        lightbox.className="lightbox";
        lightbox.id="lightbox";
        resizeLightBox();
        window.onresize= function() {
            resizeLightBox();
        };
        for(i=0; i<document.getElementsByTagName("select").length; i++) {
            document.getElementsByTagName("select")[i].style.visibility="hidden";
        }
        if (obj) {
            document.body.insertBefore(obj,document.body.firstChild);
        }
        document.body.insertBefore(lightboxOuter,document.body.firstChild);
        lightboxOuter.appendChild(lightbox);
    } else {
        window.onresize= "";
        for(i=0; i<document.getElementsByTagName("select").length; i++) {
            document.getElementsByTagName("select")[i].style.visibility="visible";
        }
        document.body.removeChild(document.getElementById('lightboxOuter'));
        if (mode=="self" && flashVars[objID]) { // ONLY FOR MOVIE PLAYER
            closeMovie(objID,"internal");
        } else if (obj) {
            document.body.removeChild(obj);
        } else if (mode=="self" && document.getElementById(objID)) {
            document.body.removeChild(document.getElementById(objID));
        }
    }
}
function resizeLightBox() {
    lightbox.style.height="0px";
    if (document.documentElement.scrollHeight>document.body.scrollHeight) {
        lightbox.style.height=document.documentElement.scrollHeight+"px"
    } else {
        lightbox.style.height=(document.body.scrollHeight)+"px";
    }
}

try {if(flashVars){}}catch (e){flashVars= new Array();}

flashBuilderSRC=""


function buildToolBox() {}
function buildFontSizeButtons() {}

//

printPageURL="/data/js/1078.htm";
function buildToolBox(boxPosition,printOpt,sendafriendOpt,bookmarkOpt,feedbackOpt,trckPrefix) {
 if("ON"=="ON") {
    clearToolbarNote =function(e) {
        showNote("ToolBarNote_"+boxPosition,"")
    };
    document.write("<span id='toolBarArea_"+boxPosition+"'></span>");
    toolBarOuter=document.createElement("div");
    toolBarOuter.id="ToolBar_"+boxPosition;
    toolBarOuter.className="toolBarOuter";
    
        
    
    boxPosition=="bottom" ? toolBarOuter.style.paddingTop="10px" : "";
    toolBarNote=document.createElement("span");
    toolBarNote.id="ToolBarNote_"+boxPosition;
    toolBarNote.className="ToolBarNote";
    toolBarNote.innerHTML="&nbsp;";
    toolBarInner=document.createElement("div");
    toolBarInner.className="toolBarInner";
    document.getElementById("toolBarArea_"+boxPosition).appendChild(toolBarOuter);//
    toolBarOuter.appendChild(toolBarNote);
    toolBarOuter.appendChild(toolBarInner);
    buttonMargin=6;
    if ("ON"!="OFF" && printOpt!="OFF") {
        toolBarPrintOuter=document.createElement("span");
        toolBarPrintOuter.id="";
        toolBarPrint=document.createElement("a");
        toolBarPrint.title="Seite drucken";
        toolBarPrint.className="toolBarPrint";
        toolBarPrint.onclick=function(e) {
            printPopup=window.open('/data/js/1078.htm','trgpopup','width=620,height=600,scrollbars=yes,resizable=no'); printPopup.focus();
        };
        toolBarPrint.onmouseover=function(e) {
            showNote("ToolBarNote_"+boxPosition,"Druckversion");
        };
        toolBarPrint.onmouseout=clearToolbarNote;
        toolBarInner.appendChild(toolBarPrintOuter);
        toolBarPrintOuter.appendChild(toolBarPrint);
        buttonMargin=10;
    }
    if ("ON"!="OFF" && sendafriendOpt!="OFF" && "https://secure.deutsche-bank.de/pbc/seiteweiterempfehlen/index.jsp"!="") {
        toolBarSendafriend=document.createElement("a");
        toolBarSendafriend.title="Seite weiterempfehlen";
        toolBarSendafriend.className="toolBarSendafriend";
        toolBarSendafriend.style.marginLeft=buttonMargin+"px";
        toolBarSendafriend.onclick=function(e) {
            uriAnnex=encodeURIComponent(document.title);
            loadToolBoxIFrame("https://secure.deutsche-bank.de/pbc/seiteweiterempfehlen/index.jsp?lang=de&decorator=dbag&url="+window.location.href+"&description="+uriAnnex,"736","490");
        };
        toolBarSendafriend.onmouseover=function(e) {
            showNote("ToolBarNote_"+boxPosition,"E-mail");
        };
        toolBarSendafriend.onmouseout=clearToolbarNote;
        buttonMargin=6;
        toolBarInner.appendChild(toolBarSendafriend);
    }
    if ("ON"!="OFF" && bookmarkOpt!="OFF") {
        toolBarBookmark=document.createElement("a");
        toolBarBookmark.title="Lesezeichen hinzufügen";
        toolBarBookmark.style.marginLeft=buttonMargin+"px";
        toolBarBookmark.className="toolBarBookmark";
        toolBarBookmark.onclick=function(e) {
            setBookmark();
        };
        toolBarBookmark.onmouseover=function(e) {
            showNote("ToolBarNote_"+boxPosition,"Lesezeichen");
        };
        toolBarBookmark.onmouseout=clearToolbarNote;
        buttonMargin=6;
        toolBarInner.appendChild(toolBarBookmark);
    }

    if ("ON"!="OFF" && feedbackOpt!="OFF" && "https://secure.deutsche-bank.de/feedbackmanager/"!="") {
        toolBarFeedback=document.createElement("a");
        toolBarFeedback.title="Seite bewerten";
        toolBarFeedback.style.marginLeft=buttonMargin+"px";
        toolBarFeedback.className="toolBarFeedback";
        toolBarFeedback.onclick=function(e) {
            loadToolBoxIFrame("https://secure.deutsche-bank.de/feedbackmanager/?id=77&lang=de&decorator=dbag&","736","700");
        };
        toolBarFeedback.onmouseover=function(e) {
            showNote("ToolBarNote_"+boxPosition,"Feedback");
        };
        toolBarFeedback.onmouseout=clearToolbarNote;
        buttonMargin=6;
        toolBarInner.appendChild(toolBarFeedback);
    }

  }
}
/* handle >bookmark< klick */
function setBookmark() {
    ap=navigator.appName;
    url=location.href;
    t=document.getElementsByTagName("title")[0].innerHTML;
    if (window.sidebar) {
        window.sidebar.addPanel(t,url,'');
    } else if (window.external) {
        window.external.AddFavorite(url,t);
    } else if (window.addNet) {
        addNet(url,t);
    } else {
        alert("Ihr Browser unterst&uuml;tzt diese Funktion nicht.\nBitte Legen Sie das Lesezeichen manuell an.");
    }
}
var toolBoxParent;
function loadToolBoxIFrame(boxSrc,boxWidth,boxHeight) {
    document.getElementById("toolBoxParent") ? document.body.removeChild(document.getElementById("toolBoxParent")) : "";
    toolBoxParent=document.createElement("div");
    toolBoxParent.id="toolBoxParent";
    toolBox=document.createElement("div");
    toolBox.className="toolBox";
    toolBox.id="toolBox";
    toolBoxClose=document.createElement("a");
    toolBoxClose.className="toolBoxClose icon close";
    toolBoxClose.id="closeButton";
    toolBoxClose.href="javascript:void(0)";
    toolBoxClose.onclick= function() {
        toolBox.removeChild(toolBoxIFrame);
        lightboxx('toolBoxParent','self');
    };
    toolBoxClose.innerHTML="Fenster schlie&szlig;en";
    toolBoxIFrame=document.createElement("iframe");
    toolBoxIFrame.className="toolBoxIFrame";
    toolBoxIFrame.id="toolBoxIFrame";
    toolBoxIFrame.setAttribute("scrolling","No");
    toolBoxIFrame.setAttribute("frameBorder","0");
    myfunction= function(e) {document.getElementById("closeButton").style.display="inline";}
    toolBoxIFrame.attachEvent ? toolBoxIFrame.attachEvent("onload", myfunction) : toolBoxIFrame.onload = myfunction;
    toolBoxIFrame.style.width=boxWidth+"px";
    toolBoxIFrame.style.height=boxHeight+"px";
    lightboxx('toolBoxParent','insert',toolBoxParent);
    toolBoxParent.appendChild(toolBox);
    toolBox.appendChild(toolBoxClose);
    toolBox.appendChild(toolBoxIFrame);
    document.getElementById(toolBoxIFrame.id).src=boxSrc;
    window.scrollTo(100, 100);
}
 
activateFontResizing="ON";
function buildFontSizeButtons() {
  if(activateFontResizing=="ON") {
    fontResizingBarOuter=document.createElement("div");
    fontResizingBarOuter.className="toolBarOuter";
    fontResizingBarNote=document.createElement("div");
    fontResizingBarNote.id="fontResizingBarNote";
    fontResizingBarNote.className="ToolBarNote";
    smallFontButton=document.createElement("a");
    smallFontButton.href="#smallfont";
    smallFontButton.accesskey="-";
    smallFontButton.name="smallfont";
    smallFontButton.className="fontSizeButton";
    smallFontButton.id="small";
    smallFontButton.onclick=new Function("change_size('small')");
    smallFontButton.onmouseover=new Function("showNote('fontResizingBarNote','Schriftgröße')");
    smallFontButton.onmouseout=new Function("showNote('fontResizingBarNote','')");
    mediumFontButton=document.createElement("a");
    mediumFontButton.href="#mediumfont";
    mediumFontButton.accesskey="#";
    mediumFontButton.name="mediumfont";
    mediumFontButton.className="fontSizeButton";
    mediumFontButton.id="medium";
    mediumFontButton.onclick=new Function("change_size('medium')");
    mediumFontButton.onmouseover=new Function("showNote('fontResizingBarNote','Schriftgröße')");
    mediumFontButton.onmouseout=new Function("showNote('fontResizingBarNote','')");
    largeFontButton=document.createElement("a");
    largeFontButton.href="#largefont";
    largeFontButton.accesskey="+";
    largeFontButton.name="largefont";
    largeFontButton.className="fontSizeButton";
    largeFontButton.id="large";
    largeFontButton.onclick=new Function("change_size('large')");
    largeFontButton.onmouseover=new Function("showNote('fontResizingBarNote','Schriftgröße')");
    largeFontButton.onmouseout=new Function("showNote('fontResizingBarNote','')");
    contrastButton=document.createElement("a");
    contrastButton.href="#contrast";
    contrastButton.accesskey="K";
    contrastButton.name="contrast";
    contrastButton.className="fontSizeButton";
    contrastButton.id="contrast";
    contrastButton.onclick=new Function("toggleContrast()");
    contrastButton.onmouseover=new Function("showNote('fontResizingBarNote','Kontrast')");
    contrastButton.onmouseout=new Function("showNote('fontResizingBarNote','')");
    document.write("<span id='fontResizingBarArea'></span>");
    fontResizingBarOuter=document.createElement("div");
    fontResizingBarOuter.className="fontResizingBarOuter";
    fontResizingBarNote=document.createElement("span");
    fontResizingBarNote.id="fontResizingBarNote";
    fontResizingBarNote.className="ToolBarNote";
    fontResizingBarNote.innerHTML="&nbsp;";
    fontResizingBarInner=document.createElement("div");
    fontResizingBarInner.className="toolBarInner";
   
    document.getElementById("fontResizingBarArea").appendChild(fontResizingBarOuter);
    fontResizingBarOuter.appendChild(fontResizingBarNote);
    fontResizingBarOuter.appendChild(fontResizingBarInner);
    fontResizingBarInner.appendChild(contrastButton);
    fontResizingBarInner.appendChild(largeFontButton);
    fontResizingBarInner.appendChild(mediumFontButton);
    fontResizingBarInner.appendChild(smallFontButton);
  }
}
cssHref= new Object();
cssHref['small']= "/data/js/1074.css";
cssHref['medium']= "/data/js/1075.css";
cssHref['large']= "/data/js/1076.css";

function change_size(fontSize) {
    document.getElementById("fontSizeCSS").href=cssHref[fontSize];
    eraseCookie('resize_fontsize');
    createCookie('resize_fontsize',fontSize,'2160');
}
if (readCookie('resize_fontsize') && activateFontResizing=="ON") {
    change_size(readCookie('resize_fontsize'));    
}
function toggleContrast() {
 if (document.getElementById('contrastCSS')) {
    document.getElementById('contrastCSS').href="";
    document.getElementsByTagName('head')[0].removeChild(document.getElementById('contrastCSS'));
    eraseCookie('contrastToggle');
  } else {
    contrastCSS  = document.createElement('link');
    contrastCSS.rel  = "stylesheet";
    contrastCSS.type = "text/css";
    contrastCSS.href = "/data/js/1077.css";
    contrastCSS.id = "contrastCSS";
    document.getElementsByTagName('head')[0].appendChild(contrastCSS);
    createCookie('contrastToggle','ON','2160');
  }
}
if (readCookie('contrastToggle') && activateFontResizing=="ON") {
    toggleContrast();    
}
 
// Cookie handling
function createCookie(name,value,hours)
{
 if (hours)
 {
  var date = new Date();
  date.setTime(date.getTime()+(hours*60*60*1000));
  var expires = "; expires="+date.toGMTString();
 }
 else var expires = "";
 document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name)
{
 var nameEQ = name + "=";
 var ca = document.cookie.split(';');
 for(var i=0;i < ca.length;i++)
 {
  var c = ca[i];
  while (c.charAt(0)==' ') c = c.substring(1,c.length);
  if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
 }
 return null;
}
function eraseCookie(name)
{
 createCookie(name,"",-1);
}
 
function initPage() {
}