    /* Rundet eine Zahl auf eine bestimmte Stellenzahl */
    function RelativesRunden(Wert, Stellen)
    { // Autor: Ralf Pfeifer, www.ArsTechnica.de

      if (Wert == 0)
         return 0
      else
        with (Math) {
            // Bereinigung der Stellenzahl
            Stellen = floor(abs(Stellen))
            if (Stellen == 0) { Stellen = 1 }

            var Exponent = round(log(abs(Wert)) * LOG10E)
            if (abs(Wert) < pow(10, Exponent)) { Exponent-- }
            var Potenz = pow(10, 1 + Exponent - Stellen)
            return ((Wert < 0) ? "-" : "") + round(abs(Wert) / Potenz) * Potenz
        }

     }

    /* Wandelt das Dezimalkomma in einen Dezimalpunkt um */
    function InZahl (Wert)
    {   // Erstellt von Ralf Pfeifer (www.arstechnica.de)
        var PosPunkt = Wert.indexOf(".",0);
        var PosKomma = Wert.indexOf(",",0);
        if (PosKomma < 0) PosKomma = Wert.length;

        // Dezimalpunkte zur Tausendergruppierung entfernen
        while ((0 <= PosPunkt) && (PosPunkt < PosKomma))
        {
            Wert = Wert.substring(0, PosPunkt) + Wert.substring(PosPunkt + 1, Wert.length);
            PosPunkt = Wert.indexOf(".",0);
            PosKomma--;
        }

        // Enthaelt die Variable 'Wert' ein Komma ?
        PosKomma = Wert.indexOf(",",0);
        if (PosKomma >= 0)
           { Wert = Wert.substring(0, PosKomma) + "." + Wert.substring(PosKomma + 1, Wert.length); }

        return parseFloat(Wert);
        }