function mxOrgChartLayout(graph, branchOptimizer, parentChildSpacing, siblingSpacing)
{
	mxGraphLayout.call(this, graph);
	
	switch(parseInt(branchOptimizer))
	{
		case 0:
			this.branchOptimizer = mxOrgChartLayout.prototype.BRANCH_OPT_LINEAR;
			break;
		case 1:
			this.branchOptimizer = mxOrgChartLayout.prototype.BRANCH_OPT_HANGER2;
			break;
		case 3:
			this.branchOptimizer = mxOrgChartLayout.prototype.BRANCH_OPT_FISHBONE1;
			break;
		case 4:
			this.branchOptimizer = mxOrgChartLayout.prototype.BRANCH_OPT_FISHBONE2;
			break;
		case 5:
			this.branchOptimizer = mxOrgChartLayout.prototype.BRANCH_OPT_1COLUMN_L;
			break;
		case 6:
			this.branchOptimizer = mxOrgChartLayout.prototype.BRANCH_OPT_1COLUMN_R;
			break;
		case 7:
			this.branchOptimizer = mxOrgChartLayout.prototype.BRANCH_OPT_SMART;
			break;
		default: //and case 2
			this.branchOptimizer = mxOrgChartLayout.prototype.BRANCH_OPT_HANGER4;
	}
	
	this.parentChildSpacing = parentChildSpacing > 0 ? parentChildSpacing : 20;
	this.siblingSpacing = siblingSpacing > 0 ? siblingSpacing : 20;
}
Class: mxOrgChartLayout

Extends <mxGraphLayout> to implement organization chart layout algorithm.
The vertices need to be connected for this layout to work, vertices
with no connections are ignored.

Example:

(code)
var layout = new mxOrgChartLayout(graph);
layout.execute(graph.getDefaultParent());
(end)