A revenue sharing mechanism for federated search and advertising