Well, I don't know how one would retrieve the name as configured in the Messenger settings, because we don't have a decent API for that. However, it is possible (and quite simple in fact) to retrieve the network name and description of the current computer.
js code:
var MAX_COMPUTERNAME_LENGTH = 31;
function GetComputerName() {
var nLength = MAX_COMPUTERNAME_LENGTH + 1;
var lpBuffer = Interop.Allocate(2*nLength+4);
var lpSize = Interop.Allocate(4);
lpSize.WriteDWORD(0, nLength);
var Result = Interop.Call("kernel32", "GetComputerNameW", lpBuffer, lpSize);
var sName = (Result === 0) ? false : lpBuffer.ReadString(0);
lpBuffer.Size = 0;
lpSize.Size = 0;
return sName;
}
To get the computer's description, you simply need to check whether there's a valid REG_SZ key value named "srvcomment" in "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" and read that.