function search_level(level,subsite,idDoc,ind) {
// level est le tableau contenant les liens
// ind détermine l'élément à retourner
// 0: idNode, 1: Path actif, 2: Path Inactif
inds=1;
if (ind>0) {
	inds=0; }
selectionTrouve=false;
resultat="";
for(i=0;(i<level.length)&&(!selectionTrouve);i++){
	mms=level[i][inds];

	if ((mms.indexOf(idDoc)>-1)&&(mms.indexOf(subsite)>-1))  {

		if (ind==2) {
			resultat=level[i][3]; }
			else {
				if (ind==1) {
					resultat="<A href='"+level[i][1]+"'>"+level[i][3]+"</A>"; }
				else {
					resultat=level[i][0];
				}
		}
		selectionTrouve = true;
	}
}
return resultat;
}

function show_path(subsite,idDoc,idNode,separator,href,label)	{
// si idDoc contient "@" alors c'est un idNode
var homepage;
if (idNode.indexOf("@")>0) {
	currentActiveId=idNode; 
	}

	else {

// separator: "SEARCH" or "PATH"
	var currentActiveIndex = null;
	var currentIndex = null;
	var cpt = 0;
	var selectionTrouve = false;
	var m
	
// recherche l'idNode correspondant à l'information transmise dans les
// six niveaux de l'arborescence.

// CELL1: cas particulier de la homepage

if ((CELL_1[3].indexOf(idDoc)>-1)&&(CELL_1[3].indexOf(subsite)>-1))  {
currentActiveId=TabLevel0Index;
homepage=true;
debug("CELL: "+ currentActiveId);
}
else
// LEVEL 0
{
currentActiveId=search_level(TabLevel0Values,subsite,idDoc,0); 
debug("LEVEL 0: "+ currentActiveId);
}
// LEVEL 1
if (currentActiveId=="") {
currentActiveId=search_level(menuLevel1Values,subsite,idDoc,0);
debug("LEVEL 1: "+ currentActiveId);
}
// LEVEL 2
if (currentActiveId=="") {
currentActiveId=search_level(menuLevel2Values,subsite,idDoc,0); 
debug("LEVEL 2: "+ currentActiveId);
}
// LEVEL 3
if (currentActiveId=="") {
currentActiveId=search_level(menuLevel3Values,subsite,idDoc,0); 
debug("LEVEL 3: "+ currentActiveId);
}
// LEVEL 4
if (currentActiveId=="") {
currentActiveId=search_level(menuLevel4Values,subsite,idDoc,0); 
debug("LEVEL 4: "+ currentActiveId);
}
// LEVEL 5
if (currentActiveId=="") {
currentActiveId=search_level(menuLevel5Values,subsite,idDoc,0); 
debug("LEVEL 5: "+ currentActiveId);
}
// LEVEL 6
if (currentActiveId=="") {
currentActiveId=search_level(menuLevel6Values,subsite,idDoc,0); 
debug("LEVEL 6: "+ currentActiveId);
}
selectionTrouve = false;
}

if (currentActiveId!="") {
	debug("CELL: "+ TabLevel0Index);
// recherche le path en IdNodes
if (currentActiveId==TabLevel0Index)  {
	m="<UL id='fil'><li class='last'><a href='"+CELL_1[3]+"'>AREVA Inc Home</a></li>";
	return m;
}

	if(currentActiveId){
		for(i=0; (i<lstSelectedIdNodesIndex.length)&&(!selectionTrouve); i++){
		
			
			if(lstSelectedIdNodesIndex[i] == currentActiveId){
				selectionTrouve = true;
				cpt = i;
			}
		}
		if(selectionTrouve){
			selectionTrouve = false;
			currentActiveIndex = (lstSelectedIdNodesValues[cpt]).split(",");
		}
	}

// transforme le path d'idNode en Path de liens
j=currentActiveIndex.length;
h=1;
if (separator=="SEARCH") {h=2;}

for (k = 1 ;  (k<j) ; k++) {
if (k == j-1) { c=" class='last'"; h=1; if (separator=="PATH") {h=2; } }
else { 
	if (k==1) { c=" class='first'"; }
	else {
		c="";
		if (separator=="SEARCH") {h=2;} 
	}
}

if (k==1) { m = "<UL id='fil'><li" + c + ">" + search_level(menuLevel1Values,currentActiveIndex[1],"@",h) + " </li>";}  
// cas particulier des news
if(currentActiveIndex[1]=="home/Summary_EN@82022") { texte="<a href='/scripts/"+subsite+"/publigen/content/templates/show.asp?P="+idDoc+"'>"+label+"</a>"; }
	else 
	{ texte=search_level(menuLevel2Values,currentActiveIndex[2],"@",h); }
if (k==2) { m=m  + "<li" + c + ">" + texte + " </li>";}  
// fin
if (k==3) { m=m + "<li" + c + ">" + search_level(menuLevel3Values,currentActiveIndex[3],"@",h)+ " </li>";}  
if (k==4) { m=m + "<li" + c + ">" + search_level(menuLevel4Values,currentActiveIndex[4],"@",h)+ " </li>";}  
if (k==5) { m=m+ "<li" + c + ">" + search_level(menuLevel5Values,currentActiveIndex[5],"@",h)+ " </li>";}  
if (k==6) { m=m + "<li" + c + ">" + search_level(menuLevel6Values,currentActiveIndex[6],"@",h)+ " </li>";}  
}
m = m + "</UL>";
}
else { 
// Rien trouvé
m = "<UL id='fil'><li class='first'>News </li><li class='last'><a href='/scripts/"+subsite+"/publigen/content/templates/show.asp?P="+idDoc+"'>"+label+"</a> </li></ul> " ; }
// fin de la fonction show path
return m;
}