  We present a modified version of the friends-of-friends (FOF) structure
finding algorithm, designed specifically to locate groups or clusters of
galaxies in photometric redshift datasets. The main objective of this paper is
to show that this extended friends-of-friends (hereafter EXT-FOF) algorithm
yields results almost identical to the original FOF, if applied to a
spectroscopic redshift dataset, and a rather conservative catalogue of
structures, in case of a dataset with simulated photometric redshifts.
Therefore, we create group catalogues for the first Center for Astrophysics
Redshift Survey (CFA1), as well as for the Las Campanas Redshift Survey (LCRS),
both of which being spectroscopic surveys, using FOF-algorithms. We then apply
our new algorithm to said surveys and compare the resulting structure
catalogue. Furthermore, we bestow simulated photometric redshifts on the LCRS
galaxies, and use the EXT-FOF to detect structures, that we compare in size and
composition to the ones found in the original, spectroscopic dataset. We will
show that the properties of this modified algorithm are well understood and
that it is suited for finding structures in photometric datasets.
  This is the first paper in a series of papers, dealing with the application
of our new cluster finding algorithm to various photometric redshift galaxy
surveys.
