Variability of chromospheric and photospheric lines in solar cycle 21