Functions for dynamic documents