Inserting multiple functions in the user's file
Actions can insert multiple functions--the main behavior function plus any number of helper functions--into the HEAD section. Two or more behaviors can even share helper functions as long as the function definition is exactly the same in each Action file. One way of ensuring that shared functions are identical is to store each helper function in an external JavaScript file and insert it into the appropriate Action files using <SCRIPT SRC="externalFile.js">.
When the user deletes a behavior, Adobe Dreamweaver attempts to remove any unused helper functions that are associated with the behavior. If other behaviors are using a helper function, it is not deleted. Because the algorithm for deleting helper functions errs on the side of caution, Adobe Dreamweaver might occasionally leave an unused function in the user's document.