Uhhh... I believe that I will leave it as an exercise for the user.
Let's just say that there is a variety of ways that one might do it;
certainly either of the solutions that you hint to above might work.
I could even imagine one or two more.
I do not mean to be too mysterious, but it seems sufficient to me
that there are implementations in the field today that solve a
similar problem.
later...
...walker
-- Jim Walker <walker@dazel.com> System Architect/DAZEL Wizard DAZEL Corporation, Austin, TX