(Barking mad) - Shortened from barking up the wrong tree. From the early days of hunting with dogs who went to a tree without any quarry in it. It means to be reaching the wrong conclusion when told something, but has come to mean someone rather insane or having strange ideas.