You can find the theory of the 'm-vgID method', developed by Miguel Sofer, at http://www.utdt.edu/~mig/trees.tar.gz
More OpenACS related is this thread: https://openacs.org/forums/message-view?message_id=16799 but note that the actual implementation is slightly changed.