Copyright (C) 2004, 2006-2009, Glenn Randers-Pehrson
-----------------------------------------------------------------------------