     console.log "Latest URN: #{latest_urn}"
     callback(latest_urn)
 
+scroll_to_bottom = ->
+  $('html, body').animate({scrollTop: $(document).height()-$(window).height()},600,'linear')
+
 save_collection_form = ->
   collection = $('#collection_select').val()
   localStorage[collection] = true

    if $(child).attr('id') && !$(child).prop('disabled') && ($(child).attr('type') != 'hidden')
      localStorage["#{collection}:#{$(child).attr('id')}"] = get_value_for_form_input(child)
  $('#collection_form').after $('<div>').attr('class','alert alert-success').attr('id','save_success').append('Saved.')
  $('html, body').animate({scrollTop: $(document).height()-$(window).height()},600,'linear')
  $('#save_success').fadeOut 1800, ->
    $(this).remove()


    fusion_tables_query "INSERT INTO #{collection} (#{column_names.join(', ')}) VALUES (#{row_values.join(', ')})", (data) ->
      clear_collection_form()
      $('#collection_form').after $('<div>').attr('class','alert alert-success').attr('id','submit_success').append('Submitted.')
      scroll_to_bottom()
      $('#submit_success').delay(1800).fadeOut 1800, ->
        $(this).remove()

