This script creates a new render element using a falloff shader to emulate a zdepth render element. The min and max values are added to the cameras attributes. This gives you the ability to animate the min and max values of the zdepth and to be able visualize those values in the viewport.
It installs as a macro script in the mikes scripts category.
Update 05/26/2011:
I changed the default values from 100 min and 200 max to 0 min and 0 max.
Update 02/10/2012:
I turned off filtering.