function writeParents2(val,tree,link,style,sep) {
   if (!tree) tree = catTree;
   var curNode;
   curNode = catTree.getNode(val,"ukatnr");
   if (!curNode) {
      if (WARN_CATEGORY_NOT_FOUND) {
         //alert("Node "+val+" not found!");
         return;
      }
      else {
         window.document.write(DEFAULT_PARENT_NAME);
      }
   }

// alert(curNode.userObject.name);
   var catString = "";
   if (!style) style = "cat-link";  
   if (!sep) sep = " / ";
   while (curNode.parent) {
      if (!curNode.userObject) continue;
      var tmp = catString;
      if (link)
         catString="<a href='" + replaceForUrl(curNode.userObject.name) + "," + curNode.userObject.ukatnr + ".html' class='"+style+"'>"+curNode.userObject.name+"</a>";
      else
         catString=curNode.userObject.name;
      if (tmp) catString = catString+sep+tmp;
         curNode = curNode.parent;
   }
   window.document.write(catString);
}