Role of autoionizing state in resonant high-order harmonic generation and attosecond pulse production.