Radiative lifetimes of the bound excited states of magnesium and beryllium.