Agora – Democracy in ancient Athens

Democracy was established in Athens at around 508 B.C. long before Pericles. How were the members of the Senate elected.