After many tests I found the solution:
I had all that code on a mouseclick handler,
to make it function I declared the FileReference only one
time out of the function and the URLrequest plus the
FileReference.download inside the handler.
Error handlers doesn't show me any errors (tested online, on
local it gives me security errors) but the file is not download as
well.
(Vista 32bit + FF and IE)
After many tests I found the solution:
I had all that code on a mouseclick handler,
to make it function I declared the FileReference only one
time out of the function and the URLrequest plus the
FileReference.download inside the handler.