You can sort contacts in the following ways:
Alphabetically: To sort contacts alphabetically, click on the Contact Name (A to Z) button on the instant messenger pane. This button toggles every time you click on it. To sort your contacts in the reverse order alphabetically, click on the Contact Name (Z to A).
Based on their online status: To sort contacts based on their online status, click on the downward arrow below the instant messenger toolbar.
The following options are available:
Show Online First: Select this option if you want the online buddies to appear first.
Show Offline First: Select this option if you want the offline buddies to appear first.