   
   @onHasChanges = (fn) ->
     @_onHasChanges = fn
+
+  @onSyncStart = (fn) ->
+    @_onSyncStart = fn
 
   @onSyncComplete = (fn) ->
     @_onSyncComplete = fn

          @_changes[id].submitted = false
          @_onSyncError errors if @_onSyncError
          return false
      if @_changesCount > 0
        @_onHasChanges @_changesCount if @_onHasChanges
      else
        @_onSyncComplete() if @_onSyncComplete
      true
    else

          )
          options.statusDisplay.append ' ', a
    
    @onHasChanges ->
      setTimeout (-> sync true), 100
    
    if options.syncBeforeUnload
      window.onbeforeunload = (e) ->
