  A waveguide coincides with a three-dimensional domain G having finitely many
cylindrical outlets to infinity; the boundary of G is smooth. In G, we consider
the stationary Maxwell system with real spectral parameter k and identity
matrices of dielectric and magnetic permittivity. The boundary of G is supposed
to be perfectly conductive. In the presence of charges and currents we
investigate the solvability of the corresponding boundary value problem
supplemented with "intrinsic" radiation conditions at infinity. For all k in
the continuous spectrum of the problem (including the thresholds and
eigenvalues), we describe a basis in the space of continuous spectrum
eigenfunctions, define the scattering matrix, and prove it is unitary. To this
end, we extend the Maxwell system to an elliptic one and study the latter in
detail. The information on the Maxwell boundary value problem comes from that
obtained for the elliptic problem.
