I have to agree with zeropash: copying files with javascript is brain-damaged. Of course, copying files server-side is ok, but javascript is client-side. For some server-side web-programming, look at php for starters.
I hope that nothing short of long-haired source hacking on mozilla will let you copy files with javascript; not because I want you to fail, but because letting that happen is... I'm just more and more disgusted with microsoft for each passing day.
sorry for being so pessimistic, and best of luck with the programming
Jonas Kölker