check out the leechblock plugin for firefox.