Unfortunately JavaScript is written in these tiny tiny bits by most authors, with no, or little regard, to using the script on a page in conjunction with other scripts.
Because scripts are usually added by hand, there's also a desire for most authors to make it as little work to add the script to a page as possible. So a number of hacks are used to make the script "auto detect" itself on a page and run automatically.
Generally speaking I've found two techniques to be helpful in making JavaScript work better in conjunction with other scripts.
a) try and replace automatic-initalization with explicit initalization. Scripts often use the onLoad event to init themselves, and it's better to have an explicit call to the init function in the code. Another way they init themselves is by detecting specific element names, or classes. Again, having an explicit call is better.
b) where necessary rename function names that clash with other scripts.
Cheers
Bruce