Exact calculations of p-polarized electromagnetic fields incident on grating surfaces: Surface polariton resonances