A Model of the Generation of Electrocortical Rhythms