function CategoryNode(pId, pTypeId, pPointerId, pName) {
	this.Id = pId;
	this.TypeId = pTypeId;
	this.PointerId = pPointerId;
	this.RealId = pPointerId ? pPointerId : pId;
	this.Name = pName;
	this.Parent = null;

	this.Children = new Object();
	this.NbChildren = 0;
	
	this.addChild = CNAddChild;
	this.getChild = CNGetChild;
}

function CNAddChild(pChild) {
	this.Children[pChild.Id] = pChild;
	pChild.Parent = this;
	this.NbChildren++;
}

function CNGetChild(pId) {
  return this.Children[pId];
}
