copying the zbuffer to the alpha channel of an FBO

Hi,

as the subject says I would like to copy the contents of the zbuffer to the alpha channel of a render target.
Is this possible ?

The reason I want to do this is to make a water surface more opaque when it is further away.

Koen