OK, you must have messenger installed for the ymsgr one to be a link, it registers on your computer a new protocol and association, so it acts just like a link.
I just put together this basic test page for you to see:
http://www.freddys-utilities.co.uk/roomtest.html
Look at the source code to see how it's achieved. Hope you understand it. If not, show me the page where you are trying to do it and I will tell you where it has gone wrong.
"Nhyrvana"'s option above requires you already be logged into yahoo! and the YOUR NAME to be edited to the person currently logged in on a machine, you would need to implement that with javascript to replace the name variable, but it does lose the ads.