I have found, on Findmypast.co.uk, a Mate's Register Ticket for a James McElhago born at Irvine, Ayr, on 22nd November 1822. His height was 5'10 3/4", fresh complexion, brown hair and hazel eyes. He had a scar on his left eye. He first went to sea as an apprentice in 1835, when he would have been 13. The Ticket was issued at London on 6 April 1846 when he was 24 and says that he could write. It says that when unemployed he resided at Irvine.
But where does James fit in to the Ayrshire Family Tree? In attempting to reconstruct that tree I have six children listed for Robert McElhago and Elizabeth Jamieson of Irvine. They were born between 1789 and 1803. Clearly one of their sons could have had a child in 1822. Their third son James married Jane Harvey and had children between 1821 and 1837 so could well have had James in 1822. Their fourth son was Robert born 1796 who may have married and had a son Robert in 1821, who married Elizabeth Boyd. Robert was also a seaman and could well have had a sibling James born 1822. A third possibility is that both Robert and James could have been sons of James and Jane. Perhaps this is the most likely scenario.