Time dependence of the resonant and near resonant photon moleculaar interactions