function debug(txt){
if(top.DEBUG){
top.DEBUG.document.write(txt+'<BR>\n');
window.defaultStatus='Mode Debug is On';
}}

// Function that finds an item of the menu
function searchChild(obj,idNode) {
if (obj.id==idNode) { return true; }
else {
	if (obj.hasChildNodes()==false) { return false;}
	else {
		var col=obj.childNodes;
		res=false;
		for (var i=0; i<col.length; i++) {
			if (col[i].tagName=="DIV") { res=(res||searchChild(col[i],idNode)) }	
			if (col[i].tagName=="SPAN" && col[i].id==idNode) { return col[i]; }
		}
		return res;
	}
}
}

// === Mandatory ==
// Function that selects the active item of the menu
function openNavMenu(node) {
	debug("Ouvre menu à " + node)
	obj=document.getElementById("AREVA_LEFT_MENU");
	founded=searchChild(obj,node);
	// if the menu item exists then change the style
	if (founded.hasChildNodes()) { founded.firstChild.className="lui" }
}
function test(){alert("test");}
// Function that collapse or deploy a sub level of the menu
function deployMenu(node) {
	// desactivated
	if (false) {
	objspan=document.getElementById(node)
	// a sub level of the menu is the following div node
	objdiv=objspan.nextSibling
	visible=objdiv.style
	if (visible.display=="none") {visible.display="block"} else {visible.display="none"}
	}
	}

// === Mandatory ==
// Function that generates the links for the menu
function showLevelLink(param,text,href,target,action){
newObj=document.createElement('SPAN')
newObj.setAttribute('id',param);
newLinkObj=document.createElement('A');
if (href!='') {
newLinkObj.setAttribute('href',href);	
newLinkObj.setAttribute('target',target);}
else {
newLinkObj.setAttribute('href','javascript:void('+action+');');
}
if (action=="True") { newLinkObj.onclick=function(){deployMenu(this.parentNode.id)}; }
newTextObj=document.createTextNode(text);
newLinkObj.appendChild(newTextObj);
newObj.appendChild(newLinkObj);	
return newObj
}
// === Mandatory ==
// Function that generates the sub levels for the menu
function showLevelContent(param,param2){
newObj=document.createElement('div')
newObj.setAttribute('name',param);
newObj.setAttribute('class',param2);	
return newObj
}