depth, mouse clicks and x,y space

In orthographic projection, i received a mouse click. Because my glOrtho() call used the width and height of my view, i knew exactly where to draw an object (ie the mouse click x,y and my z could be anything)

Now that I’m working with a frustum, I’m not sure where to draw an object based on the input of a mouse click. I don’t seem to understand what my x/y coordinate space is at a given z.

Can someone help me understand or tell me where i’m thinking about it wrong?

Look at the gluUnproject function. It should help to start.