function User(userID, login, fullName, firstName, lastName, color)
{
	if (userID !== undefined && login === undefined && fullName === undefined && firstName === undefined && 
		lastName === undefined && color === undefined)
	{
		// Just look up an existing user
		return User.prototype.users[userID];
	}
	else
	{
		// Create a new instance.
		this.id = userID;
		this.login = login;
		this.fullName = fullName;
		this.firstName = firstName;
		this.lastName = lastName;
		this.color = color;
		
		// Cache the instance for later lookups.
 		User.prototype.users[userID] = this;
	}
	
	return this;
};


User.prototype.users = {};


User.all = function()
{
	return User.prototype.users;
};


/**
 * Gets the user object belonging the passed ID and calls the passed function
 * with this as parameter. If the user object is not available, an update of
 * the user cache is scheduled before.
 */
User.auto_update_call = function(user_id, fn)
{
  if (user_id in User.prototype.users) {
    fn(User.prototype.users[user_id]);
  } else {
    User.getUsers(function() {
      // Expect it to be there after the update
      fn(User.prototype.users[user_id]);
    });
  }
};

User.getUsers = function(completionCallback)
{
	// Asynchronously request the list of users from the server.
	requestQueue.register(django_url + 'user-list',
							'GET',
							undefined,
							function (status, text, xml) {
								User.prototype.handleGetUsers(status, text, xml);
								if (completionCallback !== undefined) {
									completionCallback();
								}
							});
};


User.prototype.handleGetUsers = function(status, text, xml)
{
	if (status == 200 && text)
	{
		var jsonData = $.parseJSON(text);
		for (var i = 0; i < jsonData.length; i++)
		{
			var userData = jsonData[i];
			new User(userData.id, userData.login, userData.full_name, userData.first_name, userData.last_name, 
			         new THREE.Color().setRGB(userData.color[0], userData.color[1], userData.color[2]));
		}
	}
	else
	{
		alert("The list of users could not be retrieved:\n\n\t" + text + "\n\n(" + status + ")");
	}
};

@@ -1979,13 +1979,23 @@
 %7B%0A%09%09
-alert
+new ErrorDialog
 (%22Th
@@ -2036,19 +2036,15 @@
 eved
-:%5Cn%5Cn%5Ct%22 + 
+.%22,%0A%09%09%09
 text
@@ -2052,16 +2052,24 @@
 + %22%5Cn%5Cn(
+Status: 
 %22 + stat
@@ -2077,16 +2077,23 @@
 s + %22)%22)
+.show()
 ;%0A%09%7D%0A%7D;%0A

Use new error dialog in user retrieval in front-end