if(level < 0) return -1;
	public final static long getParentId(DocumentImpl doc, long gid) {		int level = doc.getTreeLevel(gid);		return (gid - doc.getLevelStartPoint(level))			/ doc.getTreeLevelOrder(level)			+ doc.getLevelStartPoint(level - 1);	}