The identification of primary photons or specifying stringent limits on the
photon flux is of major importance for understanding the origin of ultra-high
energy (UHE) cosmic rays. We present a new Monte Carlo program allowing
detailed studies of conversion and cascading of UHE photons in the geomagnetic
field. The program named PRESHOWER can be used both as an independent tool or
together with a shower simulation code. With the stand-alone version of the
code it is possible to investigate various properties of the particle cascade
induced by UHE photons interacting in the Earth's magnetic field before
entering the Earth's atmosphere. Combining this program with an extensive air
shower simulation code such as CORSIKA offers the possibility of investigating
signatures of photon-initiated showers. In particular, features can be studied
that help to discern such showers from the ones induced by hadrons. As an
illustration, calculations for the conditions of the southern part of the
Pierre Auger Observatory are presented.Comment: 41 pages, 9 figures, added references in introduction, corrected
energy in row 1 of Table 3, extended caption of Table