The sample code from which this was derived came from:
http://www.iosart.com/firefox/xpcom/ written by Alex Sirota.

