I went you your website and found what I needed, but am having trouble setting up a client side script so I only have to enter the code once. I place the javascript file file in my top of my website and added a script line to my .master page.
Code:
<script type="text/javascript" language="javascript" src="~/ClientSideScript.js"></script>
When I click on the link to print, all it does is take to to the top of my page. Any thoughts? The javascript does work if I put it into directly in the container for the head on an individual page.