Modeling friction on a mesoscale: master equation for the earthquakelike model.