McCain isn’t senile; he knows exactly how to play people like a fiddle. It didn’t work in 2008 on a national scale, but it worked in a state/local election. But that’s democracy for you. Given a choice, voters kept reelecting Robert Byrd even when he was clearly incapable of doing his job.
McCain also had a huge war chest. Money is the Mother’s milk of politics. The One will raise $1 billion for his 2012 reelection run.