Saving a JPG dile with JavaScript

Hi, does anyone know if it’s possible to save an image to a hard drive using JavaScript.

A JPG image from a Flash movie is displayed in an HTML file and what I’d like is for there to be a save button underneath, where the user can save it to their desktop.

I’ve researched this and come up with nothing useful. Does anyone know if it can be accomplished?