Resonant photoemission at the 5p and 4f thresholds of mercury