I have a page that calls window.print(); at the bottom of the page. I have no way of accessing the code around window.print(); Its generated by the server and I can\'t tou
"Basically because of IE I need to..."
If you only need support for IE, see the onbeforeprint event.
window.onbeforeprint = function () { // some code }
The benefit here is that the code will not run in browsers that don't support onbeforeprint, which is pretty much every browser except IE.