See script link for details.
http://pastebin.de/9619
This script version is obsolete now and can be deleted. I would have done this, if it were possible.
http://pastebin.de/9619