Javascript doesn't allow reading or writing of files on either server or client machines( abridged quote from page6 'visual quickstart guide: Javascript for the world wide web by T Negrino and D Smith, peachpit press), so I would be surprised if you can do this in Javascript. This is mainly due to security issues.
To do this you would need to use a server-side script, (python, perl etc.), use PHP, ASP.NET, Java or use ActiveX controls that are downloaded. You may still have issues with these if the client is using XP SP2 or something similar.
Sorry, I can't help any more than this