I agree with Jptalon – we do not own functional crystal balls, so without code we are unable to help.
Well-written scripts will work in a local scope and only expose very few, maybe just one or even none external references. If they do, they usually use a certain namespace. For example, the well-known jQuery library will only expose the jQuery object and the '$' shorthand notation synonym for it. Well-written plugins in return will only attach themselves in a subnamespace of jQuery's namespace.
But, as stated before, to actually help you with your problem, seeing code is essential.