boxBuilder=0;
specialTrackingPrefix="";
function buildToolBox(boxPosition,printOpt,sendafriendOpt,bookmarkOpt,feedbackOpt,trckPrefix) {
 if (trckPrefix) specialTrackingPrefix=trckPrefix+"_";
 if (boxBuilder==0) {
  boxBuilder++;
  document.writeln("<iframe src='/ghp_images/non_lang/general_elements/tp.gif' id='primerToolBoxJS' frameborder=0 style='position:absolute; display:none; left:100px; top:100px; background-color:white; z-index:999999;'></iframe>");
  document.writeln("<div style='position:absolute; left:100px; top:100px; display:none; background-color:white; border:1px solid #003399; z-index:99999999;' id='ToolBoxJS'>");
  document.writeln("   <a style='position:absolute; right:120px; top:115px; display:none' id='closeButton' class='anchorClose' href='javascript:pageActiveSwitch(\"OFF\",\"ToolBoxJS\",\"others\")'>close window</a>");
  document.writeln("   <iframe id='toolBoxIFrameToolBoxJS' src='/ghp_images/non_lang/general_elements/tp.gif' style='background-color:#E1E8F3;' frameborder=NO scrolling=NO onload='document.getElementById(\"closeButton\").style.display=\"inline\";'></iframe>");
  document.writeln("</div>");
 }
 extraPadding="";
 if (boxPosition=="bottom") extraPadding=" padding-top:10px;";
 document.writeln("<div style='width:192px; float:right; margin-bottom:-20px; "+extraPadding+"'>");
 document.write("<div id='ToolBarNote_"+boxPosition+"' class='ToolBarNote'>&nbsp;</div>");
 document.write("<div style='float:right'>");
 buttonMargin=6; 
 if (printOpt!="OFF") {
    document.write("<span id='tlbxPrint"+boxPosition+"'>");
    document.write("<a href='javascript:openPrintPopup()' onMouseOver='showNote(\"ToolBarNote_"+boxPosition+"\",\"Print\");' onMouseOut='showNote(\"ToolBarNote_"+boxPosition+"\",\"\")'><img src='/ghp_images/non_lang/general_elements/icon_print_new.gif' border='0' alt='Print this page'></a>");
    buttonMargin=10; 
    document.write("</span>");
}
  if ("ON"!="OFF" && sendafriendOpt!="OFF") {

//https://secure.deutsche-bank.de/pbc/seiteweiterempfehlen/index.jsp
 document.write("<a href='javascript:doSendAFriend(\"ToolBoxJS\")' onMouseOver='showNote(\"ToolBarNote_"+boxPosition+"\",\"E-mail\");' onMouseOut='showNote(\"ToolBarNote_"+boxPosition+"\",\"\")'><img src='/ghp_images/non_lang/general_elements/icon_sendafriend.gif' style='margin-left:"+buttonMargin+"px' border='0' alt='Recommend this page'></a>");
 buttonMargin=6; 

 }
  if ("ON"!="OFF" && bookmarkOpt!="OFF") {
 document.write("<a href='javascript:doBookmark();' onMouseOver='showNote(\"ToolBarNote_"+boxPosition+"\",\"Bookmark\");' onMouseOut='showNote(\"ToolBarNote_"+boxPosition+"\",\"\")'><img src='/ghp_images/non_lang/general_elements/icon_bookmark.gif' style='margin-left:"+buttonMargin+"px' border='0' alt='Add bookmark'></a>");
 buttonMargin=6; 
  }
  if ("ON"!="OFF" && feedbackOpt!="OFF") {

//https://secure.deutsche-bank.de/feedbackmanager/
 document.write("<a href='javascript:doFeedback(\"ToolBoxJS\")' onMouseOver='showNote(\"ToolBarNote_"+boxPosition+"\",\"Feedback\");' onMouseOut='showNote(\"ToolBarNote_"+boxPosition+"\",\"\")'><img src='/ghp_images/non_lang/general_elements/icon_feedback.gif' style='margin-left:"+buttonMargin+"px' border='0' alt='Vote this page'></a>");
 buttonMargin=6; 

  }
 document.write("</div>");
// document.write("</div>");
 document.write("</div>");
}
/* handle print click */
function openPrintPopup() {
    printPopup=window.open('/en/content/print_version.htm','trgpopup','width=635,height=600,scrollbars=yes,resizable=no'); printPopup.focus();
    sendTrackingRequest('service',specialTrackingPrefix+'print');
}
/* handle >send a friend< klick */
function doSendAFriend() {
uriAnnex=encodeURIComponent(document.title);
    loadToolBoxIFrame("https://secure.deutsche-bank.de/pbc/seiteweiterempfehlen/index.jsp?lang=en&decorator=dbag&url="+window.location.href+"&description="+uriAnnex,"ToolBoxJS","736","490");
    sendTrackingRequest('service',specialTrackingPrefix+'recommend');
}
/* handle >feedback< klick */
function doFeedback() {
    loadToolBoxIFrame("https://secure.deutsche-bank.de/feedbackmanager/?id=78&lang=en&decorator=dbag&","ToolBoxJS","736","700");
    sendTrackingRequest('service',specialTrackingPrefix+'feedback');
}
/* handle >bookmark< klick */
function doBookmark() {
    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("Your browser doess not support this functionality.\nPlease add the bookmark manually.");
    }
    sendTrackingRequest('service',specialTrackingPrefix+'bookmark');
}
function loadToolBoxIFrame(boxSrc,boxID,boxWidth,boxHeight) {
   document.getElementById("closeButton").style.display="none";
   document.getElementById("primer"+boxID).style.width="0px";
   document.getElementById("primer"+boxID).style.height="0px";
   document.getElementById("toolBoxIFrame"+boxID).style.width="0px";
   document.getElementById("toolBoxIFrame"+boxID).style.height="0px";
   document.getElementById("toolBoxIFrame"+boxID).src=boxSrc;
   document.getElementById("toolBoxIFrame"+boxID).style.width=boxWidth+"px";
   document.getElementById("toolBoxIFrame"+boxID).style.height=boxHeight+"px";
   document.getElementById("primer"+boxID).style.width=boxWidth+"px";
   document.getElementById("primer"+boxID).style.height=boxHeight+"px";
   window.scrollTo(100, 100);
   pageActiveSwitch('ON',boxID,'others');
}
function buildFontSizeButtons() {
    document.write("<span id='footerBarNote' class='ToolBarNote'></span>");
    document.write("<a accesskey='-' href='#smallfont' name='smallfont' onclick='change_size(\"small\"); if (feedsExist==1) changeFeed(\"small\")' onMouseOver='showNote(\"footerBarNote\",\"Text size\");' onMouseOut='showNote(\"footerBarNote\",\"\")'><img class='fontSizeButton' id='button_small' src='/ghp_images/non_lang/general_elements/schriftgroesse_1.gif' border='0' alt='Text size small'></a>");
    document.write("<a accesskey='#' href='#mediumfont' name='mediumfont' onclick='change_size(\"medium\"); if (feedsExist==1) changeFeed(\"medium\")' onMouseOver='showNote(\"footerBarNote\",\"Text size\");' onMouseOut='showNote(\"footerBarNote\",\"\")'><img class='fontSizeButton' id='button_medium' src='/ghp_images/non_lang/general_elements/schriftgroesse_2.gif' border='0' alt='Text size medium'></a>");
    document.write("<a accesskey='+' href='#largefont' name='largefont' onclick='change_size(\"large\"); if (feedsExist==1) changeFeed(\"large\")' onMouseOver='showNote(\"footerBarNote\",\"Text size\");' onMouseOut='showNote(\"footerBarNote\",\"\")'><img class='fontSizeButton' id='button_large' src='/ghp_images/non_lang/general_elements/schriftgroesse_3.gif' border='0' alt='Text size large'></a>");
    document.write("<a accesskey='K' href='#contrast' name='contrast' onclick='toggleContrast();' onMouseOver='showNote(\"footerBarNote\",\"Contrast\");' onMouseOut='showNote(\"footerBarNote\",\"\")'><img src='/ghp_images/non_lang/general_elements/tp.gif' class='contrastButton' border='0' alt='Change contrast'></a>");
}
