Hi,
Not sure you can open a "save as" dialog box in javaScript. Assuming you can, the 'onload' event on the <body> tag only fires once the page is completely loaded.
<body onload="functionAfterPageLoads()">
Cheers,
Richard
(Johannesburg, South Africa)