Capture and escape in the elliptic restricted three-body problem