Edited for compatibiity with latest php, which does not like reading uninitialized values.  Lots of formatting because the indentation was inconsistent.  Also switched to cuddly braces to try and get more of the crazy logic on a page in this very long file.
Edited for compatibiity with latest php, which does not like reading
uninitialized values.  Lots of formatting because the indentation was
inconsistent.  Also switched to cuddly braces to try and get more of
the crazy logic on a page in this very long file.

ChurchCRM/CRM,ChurchCRM/CRM,focuz07/CRM,bradgearon/ChurchCRM,ChurchCRM/CRM,bradgearon/ChurchCRM,bradgearon/ChurchCRM,ChurchCRM/CRM,bradgearon/ChurchCRM,focuz07/CRM,ChurchCRM/CRM,focuz07/CRM,bradgearon/ChurchCRM,focuz07/CRM