  This paper is a step towards a version of the theta-lifting (or Howe
correspondence) in the framework of the geometric Langlands program. We
consider the (unramified) dual reductive pair H=GO_{2m}, G=GSp_{2n} over a
smooth projective curve X (our H is assumed to be split on an etale two-sheeted
covering Y of X).
  Let Bun_G and Bun_H be the stack of G-torsors and H-torsors on X. We define
and study functors F_G and F_H between the derived categories D(Bun_G) and
D(Bun_H) that are analogs of the classical theta-lifting operators.
  One of the main results is the geometric Langlands functoriality for the dual
pair (H=GO_2, G=GL_2), where GO_2 is the direct image of the multiplicative
group from a nontrivial etale covering Y to X. The functor F_G from D(Bun_H) to
D(Bun_G) commutes with Hecke operators with respect to the corresponding map of
Langlands L-groups G^L\to H^L.
  As an application, we calculate Waldspurger periods of cuspidal automorphic
sheaves on Bun_{GL_2} and Bessel periods of theta-lifts from Bun_{GO_4} to
Bun_{GSp_4}. Based on these calculations, we give three conjectural
constructions of certain automorphic sheaves on Bun_{GSp_4} (one of them makes
sense for D-modules only).
