  One of the main challenges facing upcoming CMB experiments will be to
distinguish the cosmological signal from foreground contamination. We present a
comprehensive treatment of this problem and study how foregrounds degrade the
accuracy with which the Boomerang, MAP and Planck experiments can measure
cosmological parameters. Our foreground model includes not only the
normalization, frequency dependence and scale dependence for each physical
component, but also variations in frequency dependence across the sky. When
estimating how accurately cosmological parameter can be measured, we include
the important complication that foreground model parameters (we use about 500)
must be simultaneously measured from the data as well. Our results are quite
encouraging: despite all these complications, precision measurements of most
cosmological parameters are degraded by less than a factor of 2 for our main
foreground model and by less than a factor of 5 in our most pessimistic
scenario. Parameters measured though large-angle polarization signals suffer
more degradation: up to 5 in the main model and 25 in the pessimistic case. The
foregrounds that are potentially most damaging and therefore most in need of
further study are vibrating dust emission and point sources, especially those
in the radio frequencies. It is well-known that E and B polarization contain
valuable information about reionization and gravity waves, respectively.
However, the cross-correlation between polarized and unpolarized foregrounds
also deserves further study, as we find that it carries the bulk of the
polarization information about most other cosmological parameters.
