Resonant and surface polaritons in quantum wells