THERMODYNAMICS OF PROTONATION AND COMPLEX-FORMATION OF MULTIFUNCTIONAL POLYMERS