n: ' + params.nodes;
      });
      network.on('stabilized', function (params) {
        document.getElementById('stabilization').innerHTML = 'Stabilization took ' + params.iterations + ' iterations.';
      });
      network.on('animationFinished', function() {
        statusUpdateSpan.innerHTML = finishMessage;
      })
    }

    function fitAnimated() {
      updateValues();

      var options = {offset: {x:offsetx,y:offsety},
        duration: duration,
        easingFunction: easingFunction
      };
