To make functions visible to scripts throughout an application, you must explicitly define the scope in which the function is visible. This objective can be accomplished in various ways:
Using with statements
Dynamically adding methods to objects
Assigning functions to global variables