Cognitive function in patients with alcoholic and nonalcoholic chronic liver disease.