recurring events


I have a question about recurring events.

To create (update and delete) events in database, I listen to these 3 javascript events :

I have a problem when editing a single event from a series.

When editing a single event, I receive 2 javascript events
onEventAdded : OK for this one, I have to create a new event with field event_pid set with the id of the recurring event
onEventChanged : this event is called, and the eventObject has an id that look like recurringEventId#xxxxxxxxxx

Idem when removing an event, I receive a ‘onEventAdded’ (OK, I have to create an event with null rec_type and an event_pid) and a ‘onBeforeEventDelete’.

The problem is that, in both cases, I don’t know what to do when receiving the second event.

Thanks for your help !