<!--
var iPosX,iPosY;
var bfInfo = {};
bfInfo.bAutoHide = 0;
bfInfo.getMouseXY = function(e){
  if(bIE){
    iPosX = event.clientX + document.documentElement.scrollLeft;
    iPosY = event.clientY + document.documentElement.scrollTop;
  }else{
    iPosX = e.pageX;
    iPosY = e.pageY;
  }
  if (bfInfo.bAutoHide){
    bfInfo.close();
  }
  return true;
}
bfInfo.close = function(){
  var oLayer = document.getElementById('_info');
  if (    oLayer.style.display != 'none'
       && (  !bfInfo.bAutoHide
            || (    iPosX < (jsHelper.getRealStyle(oLayer,'left',1) - 10)
                 || iPosX > (jsHelper.getRealStyle(oLayer,'left',1) + oLayer.clientWidth + 10)
                 || iPosY < (jsHelper.getRealStyle(oLayer,'top',1) - 10)
                 || iPosY > (jsHelper.getRealStyle(oLayer,'top',1) + oLayer.clientHeight + 10)))){
    oLayer.style.display = 'none';
    oLayer.style.width = '';
    bfInfo.bAutoHide = 0;
  }
}
bfInfo.show = function(){
  /*
    aArg::
      0: sBasePic
      1: type (limit|info)
      2: text (prefix '_a;': width auto (info only!))
      3: sPic (LimitTyp (bool|sum|max|min) (limit only!))
      4: xPos (if set:: autohide off)
  */
  var aArg = bfInfo.show.arguments;
  var oLayer = document.getElementById('_info');
  var iWidth = 204;
  bfInfo.bAutoHide = (aArg.length < 5) ? 1 : 0;
  var sBasePic = aArg[0];
  var sHtml = '';
  oLayer.innerHTML = '';
  oLayer.style.width = '';
  if (aArg[1] == 'info'){
    if (aArg[2].substr(0,3) == '_a;'){
      oLayer.style.width = 'auto';
      aArg[2] = aArg[2].substr(3);
    }
    sHtml+= '<span class="smallfont">'+aArg[2]+'</span>';
  }else if (aArg[1] == 'limit'){
    sHtml+= '<table class="table_plain" width="100%">';
    sHtml+= '<tr class="tr_underline">';
    sHtml+= '<td width="1%"><img src="'+sBasePic+aArg[3]+'.gif" class="ico16"></td>';
    sHtml+= '<td width="99%" class="smallfont bold">';
    if (aArg[3] == 'bool'){
      sHtml+= '"Ja / Nein" - Feature';
    }else if (aArg[3] == 'max'){
      sHtml+= 'Der höchste Wert gewinnt';
    }else if (aArg[3] == 'min'){
      sHtml+= 'Der kleinste Wert gewinnt';
    }else if (aArg[3] == 'sum'){
      sHtml+= 'Addierendes Feature';
    }
    sHtml+= '</td>';
    sHtml+= '</tr>';
    sHtml+= '<tr>';
    sHtml+= '<td colspan="2" class="smallfont">'+aArg[2]+'</td>';
    sHtml+= '</tr>';
    sHtml+= '</table>';
  }
  oLayer.innerHTML = sHtml;
  oLayer.style.display = 'block';
  if (iPosX + iWidth > (document.documentElement.offsetWidth + jsHelper.getBodyScrollLeft())){
    oLayer.style.left = ((iPosX - 0 - iWidth) - ((aArg[4] != null) ? aArg[4] : 0))+'px';
  }else{
    oLayer.style.left = ((iPosX - 10) + ((aArg[4] != null) ? aArg[4] : 0))+'px';
  }
  if (iPosY + oLayer.offsetHeight > (document.documentElement.offsetHeight + jsHelper.getBodyScrollTop())){
    oLayer.style.top  = (iPosY - 0 - oLayer.offsetHeight)+'px';
  }else{
    oLayer.style.top  = (iPosY - 10)+'px';
  }
}
bfInfo.showHelp = function(sName){
  var bGhosted = (document.getElementById('ghost').style.display == 'block') ? 1 : 0;
  if (document.body.style.cursor == 'help'){
    var sTyp = document.getElementById('_help.'+sName).lang;
    var sAlt = document.getElementById('_help.'+sName).getAttribute('alt');
    var sHtml = sName+' '+sTyp;
    var sHtml = '<img src="'+_iconset+'obj/hourglass.gif'+'" class="ico16">';
    bfInfo.show(null,'info',sHtml,null,24);
    function getHelpData(){
      if (sTyp == 'limit'){
        var hRes = bfModules.getLimitDscr(sName);
        bfInfo.show(_iconset+'obj/limit_',sTyp,hRes['descr'],hRes['typ'],24);
      }else if (sTyp == 'info'){
        if (sName.indexOf('frm.') == 0){
          sName = sName.substr(4);
          var sDscr = bfModules.getFldDscr(((sActDialog=='' || !bGhosted) ? 'main' : sActDialog),sName,'frm_dscr');
        }else{
          var sDscr = bfModules.getFldDscr(((sActDialog=='' || !bGhosted) ? 'main' : sActDialog),sName,'other_dscr');
        }
        var oLayer = document.getElementById('_info');
        oLayer.innerHTML = '<span class="smallfont">'+sDscr+'</span>';
      }
    }
    setTimeout(getHelpData,100);
    setTimeout('bfInfo.captureOnClick()',500);
    bfInfo.switchHelpMode();
  }
}
bfInfo.hoverHelp = function(oCaller,sFld,bOut){
  if (bOut != null){
    bfInfo.close();
    oCaller.timeCounter = '';
  }else{
    oCaller.timeCounter = 'on';
    function doWork(){
      if (oCaller.timeCounter == 'on'){
        document.body.style.cursor = 'help';
        bfInfo.showHelp(sFld);
        document.body.style.cursor = 'default';
      }
    }
    setTimeout(doWork,1000);
  }
}
bfInfo.captureOnClick = function(){
  document.onclick = bfInfo.closeHelp;
}
bfInfo.closeHelp = function(e){
  document.getElementById('_info').style.display = 'none';
  document.onclick = null;
}
bfInfo.switchHelpMode = function(){
  if (document.body.style.cursor=='help'){
    var bHelp = 0;
    document.body.style.cursor = 'default';
  }else{
    var bHelp = 1;
    document.body.style.cursor = 'help';
  }
  var oDia;
  if (document.getElementById('ghost').style.display == 'block'){
    oDia = document.getElementById('_dialog'+sActDialogSuf);
  }
  if (oDia){
    oDia.style.cursor = document.body.style.cursor;
  }
  if (oDia && ahOpenDialogs && ahOpenDialogs.length){
    var aoSpan = oDia.getElementsByTagName('span');
  }else{
    var aoSpan = document.getElementById('_main').getElementsByTagName('span');
  }
  if (typeof(aoSpan.length) != 'undefined'){
    for (var i=0;i<aoSpan.length;i++){
      if (aoSpan[i].id && aoSpan[i].id.indexOf('_help.') == 0){
        var oShadow = aoSpan[i].parentNode.getElementsByTagName('span')[0];
        if (!bHelp){
          oShadow.style.display = 'none';
        }else{
          var aiRGB = jsHelper.getRGB(getRealStyle(aoSpan[i],'color',0));
          var dBrightness = 0.3 * aiRGB[0] + 0.59 * aiRGB[1] + 0.11 * aiRGB[2];
          oShadow.style.display = 'block';
          oShadow.style.color = (dBrightness > 192) ? '#333333' : '#FFFFFF';
          oShadow.style.position = 'absolute';
          oShadow.style.top = '-1px';
          if (oShadow.parentNode.parentNode.className.match(/(^| )right( |$)/)){
            oShadow.style.right = '1px';
          }else{
            oShadow.style.left = '-1px';
          }
        }
      }
    }
  }
}
bfInfo.showLegendText = function(oCaller,bOut){
  if (bOut != null){
    bfInfo.close();
    oCaller.lang = '';
  }else{
    if (bOpera){
      var oAnchor = oCaller.parentNode;
      if (typeof(oAnchor.href) != 'undefined' && oAnchor.href != null){
        oAnchor.lang = oAnchor.href;
        oAnchor.removeAttribute('href');
        oAnchor.onmousedown='jsHelper.restoreOpHref(this)';
        oAnchor.style.cursor = 'hand';
      }
    }
    oCaller.lang = 'on';
    function showLegendRealy(){
      if (oCaller.lang == 'on'){
        var hLegend = bfInfo.getLegendTextByImg(oCaller.src);
        if (!jsHelper.objIsEmpty(hLegend)){
          var oTbl = document.getElementById('_tbl_legend');
          var sHtml = '<span class="smallfont bold">' + hLegend['title'] + '</span><br><span class="smallfont">' + hLegend['descr'] + '</span>';
          bfInfo.show(null,'info',sHtml,null,24);
        }
      }
    }
    setTimeout(showLegendRealy,1000);
  }
}
bfInfo.getLegendTextByImg = function(sSrc){
  var oTbl = document.getElementById('_tbl_legend');
  var hRet = {};
  for (var i=2; i<oTbl.rows.length; i++){
    if (oTbl.rows[i].cells.length > 2){
      if (oTbl.rows[i].cells[0].getElementsByTagName('img')[0].src == sSrc){
        hRet['title'] = oTbl.rows[i].cells[1].innerHTML;
        hRet['descr'] = oTbl.rows[i].cells[2].innerHTML;
        break;
      }
    }
  }
  return hRet;
}
jsHelper.setEvent(document,'onmousemove','bfInfo.getMouseXY(oEvent)','bfInfo::getMouseXY');
-->
