JustForWebmasters, make all the large book images the same size, so that you won't have to change the window size on each link. Then, just do this:
Put this code into your external scripts file:
Code:
function open_new_win(url) { window.open(url,'book_lg_view','width=400,height=400'); }Link your external scripts file into the page like beetle said, using:
Code:
<script type="text/javascript" src="whatever.js"></script>
Call the function via a link like this:
Code:
<a href="http://www.google.com" onclick="open_new_win('http://www.google.com'); return false;">Google!</a>