If you’re oflfline, it will display image like this:

And if you’re online, it will display icon like this:

It's very simple to create it. You just copy the code below and put it on your "Page Element" or sidebar.
<a href="ymsgr:sendIM?plekocot">
<img src="http://opi.yahoo.com/online?u=plekocot&m=g&t=2
&l=us"/>
</a>
Change the red text (kendhin_x) with your YM id.
Look at the green number "1", you can change it. What the result of doing this? you will different image/icon as your YM status.
<a href="ymsgr:sendIM?plekocot">
<img src="http://opi.yahoo.com/online?u=plekocot&m=g&t=2
&l=us"/>
</a>
Change the red text (kendhin_x) with your YM id.
Look at the green number "1", you can change it. What the result of doing this? you will different image/icon as your YM status.