function renderNode(isSel,nameSpan,spacerSpan,node) {
		var isMainCat = false;
		var ordLen = node.userObject.ordernr.length;
		var catStyle;
		if (ordLen == 5) {
			isMainCat = true;
			catStyle = "cat1";
		}
		else if (ordLen == 7) {
			catStyle = "cat2";
		}
		else if (ordLen == 9) {
			catStyle = "cat3";
		}
		else {
			catStyle = "cat4";
		}
		if (isSel)
			catStyle+="-sel"
        var spacerW = 15*spacerSpan;    
		var spacerHtml = "";  		
		var h;
		var click = " onclick='window.document.location.href=\""+searchFriendlyUrl(node.userObject.name,node.userObject.ukatnr) +"\"'";
		if (isMainCat) {
			if (isSel)
				h ="<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td class='"+catStyle+"' "+click+"><img src='../pics/pfeil.gif' width='7' height='8'>&nbsp; "+node.userObject.name+" </td></tr></table>";
			else	
				h ="<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td class='"+catStyle+"' "+click+" onmouseover='this.className=\""+catStyle+"-hov\"' onmouseout='this.className=\""+catStyle+"\"'><img src='../pics/pfeil.gif' width='7' height='8'>&nbsp; "+node.userObject.name+" </td></tr></table>";
		}
		else if (!isSel)
			h ="<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td class='"+catStyle+"' "+click+"onmouseover='this.className=\""+catStyle+"-hov\"' onmouseout='this.className=\""+catStyle+"\"'><img src='../pics/pfeil.gif' width='7' height='8'>&nbsp; "+node.userObject.name+" </td></tr></table>";
        else
			h ="<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td class='"+catStyle+"' "+click+"><img src='../pics/pfeil.gif' width='7' height='8'>&nbsp; "+node.userObject.name+" </td></tr></table>";
		
		return h;
	}
	
	function endRenderNode(node) {
		if (node.userObject.ordernr.length == 5) {
			return "";
		}
		return "";
	}
	
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);
}

function karte(adressekarte) {
var nummerzufahl = 1 + 100*(Math.random());
var nummerzufahl2 = Math.round(nummerzufahl);
var kartezeigen = " <strong><a href='#zzz' onClick=\"window.open('" + adressekarte + "', '" + nummerzufahl2 + "','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,width=1000,height=720,left=0,top=0')\"><img src='/uploads/karte.gif' alt='Karte Südtirol'></a></strong>";
window.document.writeln(kartezeigen);
}

function showsearch() {
window.document.write("<form action=\"/php/search.php\" method=\"get\" name=\"formsearch\" id=\"formsearch\" style=\"margin-top:10px; margin-left: 780px; margin-bottom: 0px; padding: 0px;\"><input name=\"search\" type=\"text\" class=\"text2\" value=\"Suche\" size=\"19\" maxlength=\"40\" onclick=\"window.document.formsearch.search.value=''\" /><a href=\"javascript:window.document.formsearch.submit()\"><img src=\"../pics/fernglas.gif\" alt=\"Suche starten\" width=\"15\" height=\"13\" hspace=\"2\" border=\"0\" align=\"absmiddle\" /></a></form>");
}