Adding some helper functions

For anyone who wants to integrate ajax downloading over the net, use
these handler functions.