General Conditions of Confinement of the Electromagnetic Wave at the Metal-Dielectric Interface