// Handles expandlable panels (ExpandablePanel webcontrol)
function ExpandHandler()
{
	this.COLLAPSED = "collapsed";
	this.EXPANDED = "expanded";
	this.CONTENT = "content";
	this.NONE = "none";
	this.BLOCK = "block";
	
	this.expand = function(id, group)
	{
		if (group)
		{
			if (group.expanded != null)
			{
				this.collapse(group.expanded);
				group.collapse();
			}
		}
		document.getElementById(id + this.COLLAPSED).style.display = this.NONE;
		document.getElementById(id + this.EXPANDED).style.display = this.BLOCK;
		document.getElementById(id + this.CONTENT).style.display = this.BLOCK;
		if (group)
		{
			group.expand(id);
		}
	}
	
	this.collapse = function(id, group)
	{
		document.getElementById(id + this.COLLAPSED).style.display = this.BLOCK;
		document.getElementById(id + this.EXPANDED).style.display = this.NONE;
		document.getElementById(id + this.CONTENT).style.display = this.NONE;
		if (group)
		{
			group.collapse();
		}
	}
}

function ExpandGroup(name)
{
	this.expanded = null;
	
	this.expand = function(id)
	{
		this.expanded = id;
	}
	
	this.collapse = function()
	{
		this.expanded = null;
	}
}
