On the Design and Construction of Agent-mediated Electronic Institutions