Javascript Popup Window from Dynamically Loaded Text

Hi,

Part of my website loads text from external textfiles, I have already included links in the text files, but I would now like to use javascript on these links to make a popup window.

Can I insert javascript in to the text file? Or do I need to put it in flash, and somehow make the text files links load it?

Help please! :beam: