Absorption and lateral shift of beams incident upon lossy multilayered media