Synthesis and properties of photoactive and electroactive polymers based on transition metal complexes