  We compute the reionization histories of hydrogen and helium due to the
ionizing radiation fields produced by stars and quasars. For the quasars we use
a model based on halo-merger rates that reproduces all known properties of the
quasar luminosity function at high redshifts. The less constrained properties
of the ionizing radiation produced by stars are modeled with two free
parameters: (i) a transition redshift, z_tran, above which the stellar
population is dominated by massive, zero-metallicity stars and below which it
is dominated by a Scalo mass function; (ii) the product of the escape fraction
of stellar ionizing photons from their host galaxies and the star-formation
efficiency, f_esc f_*. We constrain the allowed range of these free parameters
at high redshifts based on the lack of the HI Gunn-Peterson trough at z<6 and
the upper limit on the total intergalactic optical depth for electron
scattering, tau_es<0.18, from recent cosmic microwave background (CMB)
experiments. We find that quasars ionize helium by a redshift z~4, but cannot
reionize hydrogen by themselves before z~6. A major fraction of the allowed
combinations of f_esc f_* and z_tran lead to an early peak in the ionized
fraction due to metal-free stars at high redshifts. This sometimes results in
two reionization epochs, namely an early HII or HeIII overlap phase followed by
recombination and a second overlap phase. Even if early overlap is not
achieved, the peak in the visibility function for scattering of the CMB often
coincides with the early ionization phase rather than with the actual
reionization epoch. Consequently, tau_es does not correspond directly to the
reionization redshift. We generically find values of tau_es>7%, that should be
detectable by the MAP satellite.
