Does anyone know how, through scripting, we may be able to identify that a user is in a particular group? Here's what I am trying to do:

I want to permission some wiki spaces to particular groups only.
But I also need to have some pages link to those spaces that are more public.
I would like to write some script to render or hide links based on whether or not the authenticated user is in a given group.

Thanks in advance for your help, and thanks for all the help given thus far.

==================================
Cody Burleson