  In analogy with the free factors of a free group we define special factors of
Generalized Baumslag-Solitar (GBS) groups as non-cyclic subgroups which appear
in splittings over infinite cyclic groups. We give an algorithm which, given a
GBS group $G$ and an element $g \in G$, decides whether there exists a special
factor $H < G$ such that $g \in H$. This algorithm is analogous to an algorithm
by Whitehead for free groups. Furthermore we prove that given $g \in G$ there
exists a unique minimal special factor containing $g$ and give an algorithm
which finds it.
