private int insertCssClass(int delta, String path, int index, boolean forTotals, boolean closeAttribute, String... additionalCssClasses) {
		index++;
		
		int lastIndexOf = path.lastIndexOf('-');
		String parentClass = forTotals 
			? (lastIndexOf == -1 
					? "" 
					: path.substring(0, lastIndexOf)) 
			: path;
			
		insert(delta, "class='", path, "-", index, 
				(parentClass.length() == 0 ? "" : " "), parentClass);
		
		if (additionalCssClasses != null) {
			for (String cssClass : additionalCssClasses) {
				if (cssClass != null) {
					insert(delta, " ", cssClass);
				}
			}
		}
		if (closeAttribute) {
			insert(delta, "'");
		}
		return index;
	}