code: function buildSlotSegLevels(segs) {
  	var levels = [];
  	var i, seg;
  	var j;
  
  	for (i=0; i<segs.length; i++) {
  		seg = segs[i];
  
  		// go through all the levels and stop on the first level where there are no collisions
  		for (j=0; j<levels.length; j++) {
  			if (!computeSlotSegCollisions(seg, levels[j]).length) {
  				break;
  			}
  		}
  
  		(levels[j] || (levels[j] = [])).push(seg);
  	}
  
  	return levels;
  }
docs: Builds an array of segments "levels". The first level will be the leftmost tier of segments if the calendar is left-to-right, or the rightmost if the calendar is right-to-left.