This is a slightly altered mirror of a script by Borislav Manolov, released under the GPL. The original script is here.