Variables that frequently need to be added or updated such as latest pages, events and star ratings are put in a smaller "data.js" file.
Functions specific to one section of the site are in individual "standard.js" files in each section folder.
When only one page uses a special function it is placed in the HTML page. For example the Ex-member pages have functions to write page content (based on data held in "xmem.js")
Types of functions.
Before and while loading
Straight after loading
Events as a result of viewer action