3d to 2d coorinates

Could someone please give me a code to convert the 3d coordinates of an object into 2d coordinates

Look for gluProject here http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/001544.html

Thanks!!