You wanted to control all this from an external file right? Just make a file named 'funcs.js' or something like that, and in it put all your functions that are common among all pages.
Code:
function popWin1() { window.open('file.htm','name','width=300, height=300, scrollbars); }This will open 'file.htm' into a 300x300 window named 'name' with scrollbars.
Then link funcs.js to all the pages that will use the popWin1() function with this code inserted into the <HEAD>
Code:
<script language="javascript" src="js/funcs.js"></script>
This assumes that you have placed 'funcs.js' file into the subfolder 'js'.
Then, just call the popWin1() function from whatever event you'd like, or place it in a link, like this:
Code:
<a href="javascript:popWin1()">Popup Window 1</a>
Alternatively you could pass the URL as a parameter or something like that.