Role of resonance absorption in terahertz radiation generation from solid targets.