Lorem ipsum
Class aptent taciti sociosqu ad litora
]; var uCatsBoard = [//]; function buildCategories(module, cats) { var element = document.createElement("ul"); document.getElementById("module_" + module).appendChild(element); for (var i = 0; i < cats.length; i++) { var category = cats[i]; var categoryElement = document.createElement("li"); categoryElement.setAttribute("id", "module_" + module + "_category_id_" + category[0]); categoryElement.innerHTML = "" + category[3] + " [" + category[6] + "]"; if ((category[2] != 0) || (category[1] == 0)) { element.appendChild(categoryElement); } else { var parentUl = document.createElement("ul"); document.getElementById("module_" + module + "_category_id_" + category[1]).appendChild(parentUl); parentUl.appendChild(categoryElement); } } } buildCategories("publ", uCatsPubl); buildCategories("board", uCatsBoard);