Cancer screening in a middle-aged general population: factors associated with practices and attitudes