Assessment of functional capacity and the risk of falls in the elderly with mild and moderate stage dementia