Hi Don,
Those variables are set in "slave" pages using the property adp tag.
See https://openacs.org/doc/acs-templating/guide/master.html for more information.
Essentially, when you call your page foo.tcl/adp and it declares a property called header_stuff, it passes that value up the template stack to the master.
This allows you to set variables in the master at the page level, without changing the master template scripts.
To modify the behaviour of htmlAreas, see the acs-templating package parameters. If the solution is not there, let us know what you are looking to change.
Regards,
Ryan