You can easily enable a user to change his or her Windows Live Messenger status by using either the Display Picture ControlPresence Status Control or the Profile Control.
To enable a user to change status with the Windows Live Messenger Library, you should call the set_status accessor function of the presence object for the user.
To change the user's status

Example
The following code example shows a simple interface to change the user's status. The JavaScript code contains an array of the selectable PresenceStatus values, and a function that changes the status when a value is chosen from a drop-down list (<select> element). The HTML contains the UI code.
Example
JavaScript
function selectStatusChanged()
{
var selectStatus = Document.GetElementById('selectStatus');
var presenceStatus = [
Microsoft.Live.Messenger.PresenceStatus.appearOffline,
Microsoft.Live.Messenger.PresenceStatus.away,
Microsoft.Live.Messenger.PresenceStatus.beRightBack,
Microsoft.Live.Messenger.PresenceStatus.busy,
Microsoft.Live.Messenger.PresenceStatus.idle,
Microsoft.Live.Messenger.PresenceStatus.inACall,
Microsoft.Live.Messenger.PresenceStatus.online,
Microsoft.Live.Messenger.PresenceStatus.outToLunch ];
if (_user.get_presence().get_status() !== Microsoft.Live.Messenger.PresenceStatus.offline)
{
_user.get_presence().set_status(presenceStatus[selectStatus.selectedIndex]);
}
}
HTML
<div>
<p>Change Your Status:</p>
<select id="selectStatus" onchange="selectStatusChanged()">
<option>Appear Offline</option>
<option>Away</option>
<option>Be Right Back</option>
<option>Busy</option>
<option>Idle</option>
<option>In a Call</option>
<option selected>Online</option>
<option>Out to Lunch</option>
</select>
</div>

See Also