Electromagnetic Analysis of Planar Layered Structures