Yes, it might work if placed at the end of the document, but placing it in the header and running it onload would be the way most people would do it, and it doesn't clutter up the body contents that way.
But why is it so important that it doesn't run onload?
Yes, I alread know the code isn't working! There is something which keeps the onclick from firing at all, I don't know what yet. I thought it was working when I tested it because it popped up in a new window like it should. I didn't notice the base target tag and I was writing that response while you posted yours, so I didn't know it wasn't working at that time.
For some **** reason it won't run the code at all when it's put in as a string, I have to create a costom function instead...