var pozitie_produse = 23; //indexul araylui lista_sitemap la care se afla rubrica produse
//var lista_sitemap = Array();

/*
for (i=0; i<sitemap_raw.length; i++) {
	bare = "";
	if (sitemap_raw[i][0] > 0) {
		for (j=1; j<=sitemap_raw[i][0]; j++) {
			bare += "|";
		}
	}
	stil = "";
	if (sitemap_raw[i][0] = 0) {
		stil = " style=\"padding-left:10px;\"";
	}
	lista_sitemap[i] = Array(bare + "<a href='" + sitemap_raw[i][1] + "'" + stil + ">" + sitemap_raw[i][2] + "</a>","");
}
*/
index = 0;

for (i=0; i<sitemap_raw.length; i++) {
	bare = "";
	if (sitemap_raw[i][0] > 0) {
		for (j=1; j<=sitemap_raw[i][0]; j++) {
			bare += "|";
		}
	}
	stil = "";
	if (sitemap_raw[i][0] = 0) {
		stil = " style=\"padding-left:10px;\"";
	}
	lista_categorii[index] = Array(bare + "+<a href='" + sitemap_raw[i][1] + "'" + stil + ">" + sitemap_raw[i][2] + "</a>","");
	index++;
	if (index == pozitie_produse+1) {
		for (k=0; k<produse_raw.length; k++) {
			bare = "|";
			if (produse_raw[k][0] > 0) {
				for (j=1; j<=produse_raw[k][0]; j++) {
					bare += "|";
				}
			}
			lista_categorii[index] = Array(bare + "+<a href='../produse/loader.php?id=" + produse_raw[k][1] + "'>" + produse_raw[k][2] + "</a>","");
			index++;
		}
	}
}


/*
for (i=0; i<lista_sitemap.length-1; i++) {
	if (lista_sitemap[i][0].indexOf("Gama de produse")>0) {pozitie_produse=i;}
}

for (i=0; i<=pozitie_produse; i++) { //bag prima bucata de map
	var temp = lista_sitemap[i][0];
	temp = temp.replace("<a","+<a")
	lista_categorii[i] = Array(temp,"");
}

for (i=pozitie_produse+1; i<=pozitie_produse+tree_produse.length; i++) { //bag produsele
	var temp = tree_produse[i-pozitie_produse-1][0];
	temp = temp.replace(" class='a_produs'","");
	temp = temp.replace("<a","+<a")
	lista_categorii[i] = Array("|"+temp,"");
}

for (i=pozitie_produse+tree_produse.length+1; i<lista_sitemap.length+tree_produse.length; i++) { //bag restu de map
	var temp = lista_sitemap[i-tree_produse.length][0];
	temp = temp.replace("<a","+<a")
	lista_categorii[i] = Array(temp,"");
}
*/