I think you have already been given the best solution. Use InContainer().

As discussed in a previous thread InContainer always calls TranslateNAme() which can add substatial overhead to the script. A cleaner solution is to use TranslateName() to get the user's OU and then use a modified Incontainer() that only compares strings representations of the OU's DN.

I will post the code after I get to work.
_________________________
Home page: http://www.kixhelp.com/hb/