From intrapsychic to ecological theories in social psychology: Outlines of a functional theory approach