Focus Map?

I am trying to get the focus map of a picture… Is there a way to get a map kind of like a zdepth, but for the focus, that can be gotten from a single 2d pic??? I can get close on some pics, but not quite what I am wanting??? anybody got any ideas?

I am using photoshop 7 so if you have an action that will do it then that would be great…

Aaron