We have studied the influence of X-ray illumination by external source
on the vertical structure of accretion disks in active galactic nucle
i (AGN). We have shown that besides comptonization also atomic cooling
and heating processes are important because of strong density gradien
t in the vertical direction. We have demonstrated that the condition o
f hydrostatic equilibrium leads to the existence of narrow two-phase m
edium zones between an accretion disk and a corona. We discuss the str
ucture of such a two-medium zone and the possible consequences of its
existence. Our results can be adopted to accretion disks in galactic X
-ray binaries.