function init_autosave()
{
    new PeriodicalExecuter(
      function(pe) {
        $('final').value = 0;
        $('autosave').request({ 
            onSuccess: function(transport, json) {
              $('id').value = json.id;
            }
          }
        );
        $('final').value = 1;
        //pe.stop();
      }, 30);
}
