Interlayer effects in high-Tc superconductors