    $(function(){
      $('a[rel="external"],a.download').attr('target','_blank');
       });
       
      $(function() {
  $( "#tabs" ).tabs();
  });

$(document).ready(function(){
$('#login-outside').hide();
$('#log').click(function () {
$('#login-outside').toggle();
});
});

/*
<!--[if IE 7 ]>
    $(function() {
        var zIndexFix = 1000;
        $('div').each(function() {
            $(this).css('zIndex', zIndexFix);
            zIndexFix -= 10;
        });
    });
<![endif]-->
*/
  
/* $('#google_plusone').html('<g:plusone></g:plusone>'); */
      
/*
 * jQuery Tooltip plugin 1.3
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
 * http://docs.jquery.com/Plugins/Tooltip
 *
 * Copyright (c) 2006 - 2008 Jörn Zaefferer
 *
 * $Id: jquery.tooltip.js 5741 2008-06-21 15:22:16Z joern.zaefferer $
 * 
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
 
;(function($) {
  
    // the tooltip element
  var helper = {},
    // the current tooltipped element
    current,
    // the title of the current element, used for restoring
    title,
    // timeout id for delayed tooltips
    tID,
    // IE 5.5 or 6
    IE = $.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent),
    // flag for mouse tracking
    track = false;
  
  $.tooltip = {
    blocked: false,
    defaults: {
      delay: 200,
      fade: false,
      showURL: true,
      extraClass: "",
      top: 15,
      left: 15,
      id: "tooltip"
    },
    block: function() {
      $.tooltip.blocked = !$.tooltip.blocked;
    }
  };
  
  $.fn.extend({
    tooltip: function(settings) {
      settings = $.extend({}, $.tooltip.defaults, settings);
      createHelper(settings);
      return this.each(function() {
          $.data(this, "tooltip", settings);
          this.tOpacity = helper.parent.css("opacity");
          // copy tooltip into its own expando and remove the title
          this.tooltipText = this.title;
          $(this).removeAttr("title");
          // also remove alt attribute to prevent default tooltip in IE
          this.alt = "";
        })
        .mouseover(save)
        .mouseout(hide)
        .click(hide);
    },
    fixPNG: IE ? function() {
      return this.each(function () {
        var image = $(this).css('backgroundImage');
        if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) {
          image = RegExp.$1;
          $(this).css({
            'backgroundImage': 'none',
            'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')"
          }).each(function () {
            var position = $(this).css('position');
            if (position != 'absolute' && position != 'relative')
              $(this).css('position', 'relative');
          });
        }
      });
    } : function() { return this; },
    unfixPNG: IE ? function() {
      return this.each(function () {
        $(this).css({'filter': '', backgroundImage: ''});
      });
    } : function() { return this; },
    hideWhenEmpty: function() {
      return this.each(function() {
        $(this)[ $(this).html() ? "show" : "hide" ]();
      });
    },
    url: function() {
      return this.attr('href') || this.attr('src');
    }
  });
  
  function createHelper(settings) {
    // there can be only one tooltip helper
    if( helper.parent )
      return;
    // create the helper, h3 for title, div for url
    helper.parent = $('<div id="' + settings.id + '"><h3></h3><div class="body"></div><div class="url"></div></div>')
      // add to document
      .appendTo(document.body)
      // hide it at first
      .hide();
      
    // apply bgiframe if available
    if ( $.fn.bgiframe )
      helper.parent.bgiframe();
    
    // save references to title and url elements
    helper.title = $('h3', helper.parent);
    helper.body = $('div.body', helper.parent);
    helper.url = $('div.url', helper.parent);
  }
  
  function settings(element) {
    return $.data(element, "tooltip");
  }
  
  // main event handler to start showing tooltips
  function handle(event) {
    // show helper, either with timeout or on instant
    if( settings(this).delay )
      tID = setTimeout(show, settings(this).delay);
    else
      show();
    
    // if selected, update the helper position when the mouse moves
    track = !!settings(this).track;
    $(document.body).bind('mousemove', update);
      
    // update at least once
    update(event);
  }
  
  // save elements title before the tooltip is displayed
  function save() {
    // if this is the current source, or it has no title (occurs with click event), stop
    if ( $.tooltip.blocked || this == current || (!this.tooltipText && !settings(this).bodyHandler) )
      return;

    // save current
    current = this;
    title = this.tooltipText;
    
    if ( settings(this).bodyHandler ) {
      helper.title.hide();
      var bodyContent = settings(this).bodyHandler.call(this);
      if (bodyContent.nodeType || bodyContent.jquery) {
        helper.body.empty().append(bodyContent)
      } else {
        helper.body.html( bodyContent );
      }
      helper.body.show();
    } else if ( settings(this).showBody ) {
      var parts = title.split(settings(this).showBody);
      helper.title.html(parts.shift()).show();
      helper.body.empty();
      for(var i = 0, part; (part = parts[i]); i++) {
        if(i > 0)
          helper.body.append("<br/>");
        helper.body.append(part);
      }
      helper.body.hideWhenEmpty();
    } else {
      helper.title.html(title).show();
      helper.body.hide();
    }
    
    // if element has href or src, add and show it, otherwise hide it
    if( settings(this).showURL && $(this).url() )
      helper.url.html( $(this).url().replace('http://', '') ).show();
    else 
      helper.url.hide();
    
    // add an optional class for this tip
    helper.parent.addClass(settings(this).extraClass);

    // fix PNG background for IE
    if (settings(this).fixPNG )
      helper.parent.fixPNG();
      
    handle.apply(this, arguments);
  }
  
  // delete timeout and show helper
  function show() {
    tID = null;
    if ((!IE || !$.fn.bgiframe) && settings(current).fade) {
      if (helper.parent.is(":animated"))
        helper.parent.stop().show().fadeTo(settings(current).fade, current.tOpacity);
      else
        helper.parent.is(':visible') ? helper.parent.fadeTo(settings(current).fade, current.tOpacity) : helper.parent.fadeIn(settings(current).fade);
    } else {
      helper.parent.show();
    }
    update();
  }
  
  /**
   * callback for mousemove
   * updates the helper position
   * removes itself when no current element
   */
  function update(event)  {
    if($.tooltip.blocked)
      return;
    
    if (event && event.target.tagName == "OPTION") {
      return;
    }
    
    // stop updating when tracking is disabled and the tooltip is visible
    if ( !track && helper.parent.is(":visible")) {
      $(document.body).unbind('mousemove', update)
    }
    
    // if no current element is available, remove this listener
    if( current == null ) {
      $(document.body).unbind('mousemove', update);
      return;  
    }
    
    // remove position helper classes
    helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");
    
    var left = helper.parent[0].offsetLeft;
    var top = helper.parent[0].offsetTop;
    if (event) {
      // position the helper 15 pixel to bottom right, starting from mouse position
      left = event.pageX + settings(current).left;
      top = event.pageY + settings(current).top;
      var right='auto';
      if (settings(current).positionLeft) {
        right = $(window).width() - left;
        left = 'auto';
      }
      helper.parent.css({
        left: left,
        right: right,
        top: top
      });
    }
    
    var v = viewport(),
      h = helper.parent[0];
    // check horizontal position
    if (v.x + v.cx < h.offsetLeft + h.offsetWidth) {
      left -= h.offsetWidth + 20 + settings(current).left;
      helper.parent.css({left: left + 'px'}).addClass("viewport-right");
    }
    // check vertical position
    if (v.y + v.cy < h.offsetTop + h.offsetHeight) {
      top -= h.offsetHeight + 20 + settings(current).top;
      helper.parent.css({top: top + 'px'}).addClass("viewport-bottom");
    }
  }
  
  function viewport() {
    return {
      x: $(window).scrollLeft(),
      y: $(window).scrollTop(),
      cx: $(window).width(),
      cy: $(window).height()
    };
  }
  
  // hide helper and restore added classes and the title
  function hide(event) {
    if($.tooltip.blocked)
      return;
    // clear timeout if possible
    if(tID)
      clearTimeout(tID);
    // no more current element
    current = null;
    
    var tsettings = settings(this);
    function complete() {
      helper.parent.removeClass( tsettings.extraClass ).hide().css("opacity", "");
    }
    if ((!IE || !$.fn.bgiframe) && tsettings.fade) {
      if (helper.parent.is(':animated'))
        helper.parent.stop().fadeTo(tsettings.fade, 0, complete);
      else
        helper.parent.stop().fadeOut(tsettings.fade, complete);
    } else
      complete();
    
    if( settings(this).fixPNG )
      helper.parent.unfixPNG();
  }
  
})(jQuery);
/* TOOOLTIPP __________________________________________________________________________ */

/* BGI FRAME ___________________________________________________________________________ */

/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-06-20 03:23:36 +0200 (Mi, 20 Jun 2007) $
 * $Rev: 2110 $
 *
 * Version 2.1
 */

(function($){

/**
 * The bgiframe is chainable and applies the iframe hack to get 
 * around zIndex issues in IE6. It will only apply itself in IE 
 * and adds a class to the iframe called 'bgiframe'. The iframe
 * is appeneded as the first child of the matched element(s) 
 * with a tabIndex and zIndex of -1.
 * 
 * By default the plugin will take borders, sized with pixel units,
 * into account. If a different unit is used for the border's width,
 * then you will need to use the top and left settings as explained below.
 *
 * NOTICE: This plugin has been reported to cause perfromance problems
 * when used on elements that change properties (like width, height and
 * opacity) a lot in IE6. Most of these problems have been caused by 
 * the expressions used to calculate the elements width, height and 
 * borders. Some have reported it is due to the opacity filter. All 
 * these settings can be changed if needed as explained below.
 *
 * @example $('div').bgiframe();
 * @before <div><p>Paragraph</p></div>
 * @result <div><iframe class="bgiframe".../><p>Paragraph</p></div>
 *
 * @param Map settings Optional settings to configure the iframe.
 * @option String|Number top The iframe must be offset to the top
 *     by the width of the top border. This should be a negative 
 *      number representing the border-top-width. If a number is 
 *     is used here, pixels will be assumed. Otherwise, be sure
 *    to specify a unit. An expression could also be used. 
 *     By default the value is "auto" which will use an expression 
 *     to get the border-top-width if it is in pixels.
 * @option String|Number left The iframe must be offset to the left
 *     by the width of the left border. This should be a negative 
 *      number representing the border-left-width. If a number is 
 *     is used here, pixels will be assumed. Otherwise, be sure
 *    to specify a unit. An expression could also be used. 
 *     By default the value is "auto" which will use an expression 
 *     to get the border-left-width if it is in pixels.
 * @option String|Number width This is the width of the iframe. If
 *    a number is used here, pixels will be assume. Otherwise, be sure
 *     to specify a unit. An experssion could also be used.
 *    By default the value is "auto" which will use an experssion
 *     to get the offsetWidth.
 * @option String|Number height This is the height of the iframe. If
 *    a number is used here, pixels will be assume. Otherwise, be sure
 *     to specify a unit. An experssion could also be used.
 *    By default the value is "auto" which will use an experssion
 *     to get the offsetHeight.
 * @option Boolean opacity This is a boolean representing whether or not
 *     to use opacity. If set to true, the opacity of 0 is applied. If
 *    set to false, the opacity filter is not applied. Default: true.
 * @option String src This setting is provided so that one could change 
 *    the src of the iframe to whatever they need.
 *    Default: "javascript:false;"
 *
 * @name bgiframe
 * @type jQuery
 * @cat Plugins/bgiframe
 * @author Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 */
$.fn.bgIframe = $.fn.bgiframe = function(s) {
  // This is only for IE6
  if ( $.browser.msie && parseInt($.browser.version) <= 6 ) {
    s = $.extend({
      top     : 'auto', // auto == .currentStyle.borderTopWidth
      left    : 'auto', // auto == .currentStyle.borderLeftWidth
      width   : 'auto', // auto == offsetWidth
      height  : 'auto', // auto == offsetHeight
      opacity : true,
      src     : 'javascript:false;'
    }, s || {});
    var prop = function(n){return n&&n.constructor==Number?n+'px':n;},
        html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+
                   'style="display:block;position:absolute;z-index:-1;'+
                     (s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+
                 'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+
                 'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+
                 'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+
                 'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+
          '"/>';
    return this.each(function() {
      if ( $('> iframe.bgiframe', this).length == 0 )
        this.insertBefore( document.createElement(html), this.firstChild );
    });
  }
  return this;
};

// Add browser.version if it doesn't exist
if (!$.browser.version)
  $.browser.version = navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1];

})(jQuery);

/*BGI FRAME ____________________________________________________________________________ */

/* FORMAT ______________________________________________________________________________ */
/*
* @Copyright (c) 2010 Ricardo Andrietta Mendes - eng.rmendes@gmail.com
* 
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
* 
* How to use it:
* var formated_value = $().number_format(final_value);
* 
* Advanced:
* var formated_value = $().number_format(final_value, 
*                           {
*                           numberOfDecimals:3,
*                           decimalSeparator: '.',
*                           thousandSeparator: ',',
*                           symbol: 'R$'
*                           });
*/
//indica que est? sendo criado um plugin
jQuery.fn.extend({ //indica que est? sendo criado um plugin
  
  number_format: function(numero, params) //indica o nome do plugin que ser? criado com os parametros a serem informados
    { 
    //parametros default
    var sDefaults = 
      {      
      numberOfDecimals: 2,
      decimalSeparator: ',',
      thousandSeparator: '.',
      symbol: ''
      }
 
    //fun??o do jquery que substitui os parametros que n?o foram informados pelos defaults
    var options = jQuery.extend(sDefaults, params);

    //CORPO DO PLUGIN
    var number = numero; 
    var decimals = options.numberOfDecimals;
    var dec_point = options.decimalSeparator;
    var thousands_sep = options.thousandSeparator;
    var currencySymbol = options.symbol;
    
    var exponent = "";
    var numberstr = number.toString ();
    var eindex = numberstr.indexOf ("e");
    if (eindex > -1)
    {
    exponent = numberstr.substring (eindex);
    number = parseFloat (numberstr.substring (0, eindex));
    }
    
    if (decimals != null)
    {
    var temp = Math.pow (10, decimals);
    number = Math.round (number * temp) / temp;
    }
    var sign = number < 0 ? "-" : "";
    var integer = (number > 0 ? 
      Math.floor (number) : Math.abs (Math.ceil (number))).toString ();
    
    var fractional = number.toString ().substring (integer.length + sign.length);
    dec_point = dec_point != null ? dec_point : ".";
    fractional = decimals != null && decimals > 0 || fractional.length > 1 ? 
           (dec_point + fractional.substring (1)) : "";
    if (decimals != null && decimals > 0)
    {
    for (i = fractional.length - 1, z = decimals; i < z; ++i)
      fractional += "0";
    }
    
    thousands_sep = (thousands_sep != dec_point || fractional.length == 0) ? 
            thousands_sep : null;
    if (thousands_sep != null && thousands_sep != "")
    {
    for (i = integer.length - 3; i > 0; i -= 3)
      integer = integer.substring (0 , i) + thousands_sep + integer.substring (i);
    }
    
    if (options.symbol == '')
    {
    return sign + integer + fractional + exponent;
    }
    else
    {
    return currencySymbol + ' ' + sign + integer + fractional + exponent;
    }
    //FIM DO CORPO DO PLUGIN  
    
  }
});

/* FORMAT ______________________________________________________________________________ */



/* google maps _________________________________________________________________________ */
adxGMap.prototype.cTag= null;
adxGMap.prototype.map= null;
adxGMap.prototype.geocoder= null;
adxGMap.prototype.directions= null;
adxGMap.prototype.directions_onload= null;

function adxGMap(tag){
  this.init(tag);
}
adxGMap.prototype.init=function(tag){
  try{
    this.cTag= tag;
    if (GBrowserIsCompatible()) {
      this.map = new GMap2(tag);
      this.map.setMapType(G_NORMAL_MAP);
      this.map.addControl(new GSmallMapControl());
      //this.map.addControl(new GMapTypeControl());
      this.geocoder= new GClientGeocoder();
      this.directions= new GDirections(this.map);
      var h= this;
      GEvent.addListener(this.directions, "load", function(){h.directions_load();});
      if (isIE()){
        window.attachEvent("onunload", adxGMap.doc_unload);
      }
    }
  }catch(e){
    alert(e.message);
  }
}
adxGMap.prototype.showAddress=function(address){
  var h= this;
  this.geocoder.getLatLng(address, function(point){h.geocoder_Done(point);});
}
adxGMap.prototype.showRoute=function(src, dest, h){
  var txt;
  
  txt= "from:"+src+" to:"+dest;
  this.directions_onload= h;
  this.directions.load(txt);
}
        
adxGMap.doc_unload=function(){
  GUnload();
}
adxGMap.prototype.directions_load=function(){
  if (this.directions_onload){
    this.directions_onload();
  }
}
adxGMap.prototype.getMeters=function(){
  return this.directions.getDistance().meters;
}
adxGMap.prototype.geocoder_Done=function(point){
  if (point==null){
    alert("Nicht gefunden.");
  }else{
    this.map.checkResize();
    this.map.setCenter(point,10);
    //this.map.setMapType(G_NORMAL_MAP);
  }
}
adxGMap.prototype.addMarker=function(x,y,title){
  var point = new GLatLng(x, y);
  var markerOptions = new Object;
  
  markerOptions.title= title;
  this.map.addOverlay(new GMarker(point, markerOptions));
}
adxGMap.prototype.zoomIn=function(){
  this.map.zoomIn();
}
adxGMap.prototype.zoomOut=function(){
  this.map.zoomOut();
}

/* function doLogin(){
  var x;
  var login;
  var frmLogin= document.getElementById("frmLogin");
  var GMSEID= CurFullURL; //innerText(document.getElementById("GMSEID"));
  var frmCMSLogin= all("frmCMSLogin");
  
  try{
    trackOut("/out/medFrmLogin");
    login= frmLogin.tbLogin.value;
    if (login!=null){
      if (login.substring(0,4)=="cms_"){
        frmCMSLogin.action.value="cmslogin";
        frmCMSLogin.login.value= frmLogin.tbLogin.value;
        frmCMSLogin.pwd.value= frmLogin.tbPwd.value;
        frmCMSLogin.onfail.value= GMSEID;
        frmCMSLogin.submit();
      }else{
        frmLogin.onfail.value= GMSEID;
        frmLogin.submit();
      }
    }
  }catch(e){
    alert(e.message);
  }
}  */
  
/* Rechner */
$(document).ready(function() {  
    function preCalculate(){
      // SET CHECKBOX IF SELECT
      if( $("#pre-active").is(':checked') != true ){
        $("#pre-active").attr('checked', true);
      }
      calculate();
    }
    
    function format($val){
      var formated_value = $().number_format($val, {
           numberOfDecimals: 2,
           decimalSeparator: ',',
           thousandSeparator: '.'
       });  
      return formated_value 
    }
    
    function checkCurrency(str) {
        // str = alltrim(str);
        
      // if (/^\$?[1-9][0-9]{0,2}(\.[0-9]{3})*(,[0-9]{0,2})?$/.test(str) ) {
          if (/^\$?([0-9])*(,[0-9]{0,2})?$/.test(str) ) {
      
        if (/,[0-9]$/.test(str) ) {
                str += "0";
            }else if (/,$/.test(str)) {
                str += "00";
            }else if (!/,[0-9]{2}$/.test(str) ) {
                str += ",00";
            }
            return str;
        }else {
            return false;
        }
    }
    
  //Eigentliche Rechnerfunktion
    function calculate() {
            
      var amount = String($("#amount").val());      
      
      amount = amount.replace(/\./g, '');
      //amount = amount.replace('.', ''); // EYEMT TODO all
      
      amount = checkCurrency(amount);
      
      //$("#debug").text(amount);
      
      // get vals: 
      if ( !amount ){
        // INPUT ERROR
        $("#amount").css( 'color', '#FF0000');
		$("#textmess").html('Bitte geben Sie einen Betrag ein').css( 'color', '#FF0000').css('height','18px');
        $("#total-dmrz").val('');
        $("#total-5").val('');
        $("#total-save").val('');
		$("#gebuehr").val('');
        return false;
      }else{
        // INPUT OK
        $("#amount").css( 'color', '#000000'  );
		$("#textmess").html('&euro;').css( 'color', '#626262');
        //$("#textmess").css('height',0);
        // $("#debug").text(amount);
        // var amount = $("#amount").val();
        // $("#amount").val( parseFloat(tmp).toFixed(2) );
        // $("#amount").val( format($("#amount").val()) );
        
        // CLEAN
        amount = amount.replace(",", ".");
        // $("#debug-2").text(amount);
        
        
        var total_dmrz_div = null; //Differenzbetrag
        var total_5_div = null;
        var total_5_save = null;
        
        total_5_div =  amount * 0.05; //5% Ausweisung
        total_5_save = total_5_div;
        if( $("#pre-active").is(':checked') == true ){
          total_dmrz_div = amount * 0.005 + amount * $("#pre-select").val(); //Differenzbetrag
          total_5_save = total_5_div - total_dmrz_div;
        }else{
          total_dmrz_div = amount * 0.005;
          total_5_save = total_5_div - total_dmrz_div;
        }
        
        
        // $("#amount").val(format(amount));
        
        // DISPLAY
        var tmp = amount - total_dmrz_div;
        // tmp = parseFloat(tmp).toFixed(2);    
        $("#total-dmrz").val( format(tmp) ).css( 'color', '#12365b').css('font-weight','bold'  );
        
        // DISPLAY
        var tmp = amount - total_5_div;
        // tmp = parseFloat(tmp).toFixed(2);        
        $("#total-5").val( format(tmp) ).css('font-weight','bold');
        
        // DISPLAY
        var tmp = total_5_save; //var
        // tmp = parseFloat(total_5_save).toFixed(2);
        $("#total-save").val( format(tmp) ).css( 'color', 'green').css('font-weight','bold').css('font-size','18px');
		
		// DISPLAY NEU
        var tmp = total_dmrz_div;
        // tmp = parseFloat(total_5_save).toFixed(2);
        $("#gebuehr").val( format(tmp) ).css( 'color', '#12365b').css('font-weight','bold');
            
      }
    }
    
    $("#amount").keyup(calculate);
    $("#pre-active").change(calculate);
    $("#pre-select").change(preCalculate);
    
    /////////////////////////////
    // TOOLTIPS
    $("#info-box-1").tooltip({ track: true, delay: 0, showURL: false, opacity: 1, fixPNG: true, showBody: " - ", extraClass: "pretty", top: -15, left: 10  });
    $("#info-box-2").tooltip({ track: true, delay: 0, showURL: false, opacity: 1, fixPNG: true, showBody: " - ", extraClass: "pretty", top: -15, left: 10  });
    $("#info-box-3").tooltip({ track: true, delay: 0, showURL: false, opacity: 1, fixPNG: true, showBody: " - ", extraClass: "pretty", top: -15, left: 10  });
    $("#info-box-4").tooltip({ track: true, delay: 0, showURL: false, opacity: 1, fixPNG: true, showBody: " - ", extraClass: "pretty", top: -15, left: 10  });
    $("#info-box-5").tooltip({ track: true, delay: 0, showURL: false, opacity: 1, fixPNG: true, showBody: " - ", extraClass: "pretty", top: -15, left: 10  });
    $("#info-box-6").tooltip({ track: true, delay: 0, showURL: false, opacity: 1, fixPNG: true, showBody: " - ", extraClass: "pretty", top: -15, left: 10  });
	$("#info-box-7").tooltip({ track: true, delay: 0, showURL: false, opacity: 1, fixPNG: true, showBody: " - ", extraClass: "pretty", top: -15, left: 10  });
	$("#info-box-9").tooltip({ track: true, delay: 0, showURL: false, opacity: 1, fixPNG: true, showBody: " - ", extraClass: "pretty", top: -115, left: 10  });
});

