
function muestraInfo(ncapa,obj,divelm,cr,path){
//	alert("muestraInfo");
	//alert("muestraInfo(" + ncapa + "," + obj + "," + divelm + "," + cr + "," + path + ")");
	if(!_isrequesting){
		var _idinsti;
		var _page;

		//alert(ncapa);
		//alert(ncapa.substring(1,6));

		if(cr==1){
			if(obj!=null){
				if(obj.id.substring(0,2)=="ah"){
					//alert(obj.id);
					obj.style.fontWeight='bold';
					obj.style.color='red';
				}		
			}
		}

		if(ncapa.substring(0,2)=="lt"){
			_idinsti=ncapa.substring(7);
			_elementID="d" + ncapa.substring(3);
			_page="getLletres.asp";
			_robj=obj;
			_objfnt="actTreeObj()";
		}else if(ncapa.substring(1,6)=="-idi-"){
			_idinsti=ncapa.substring(6);
			_elementID=divelm;
			_page="getFills.asp";
			_robj=obj;
			_objfnt="actTreeObj2()";
		}else{
			_idinsti=ncapa.substring(5);
			_elementID=ncapa;
			_page="getFills.asp";
			_robj=obj;
			_objfnt="actTreeObj()";
		}
		

		_flag1=divelm;
		//alert(_page + "?gr=" + jgroup + "&idInstitucio=" + escape(_idinsti) + "&cr=" + cr + "&path=" + path);
		sendRequest(_page + "?gr=" + jgroup + "&idInstitucio=" + escape(_idinsti) + "&cr=" + cr + "&path=" + path);
	}
}

function actTreeObj(){
	if(_robj){
		_robj.onclick = function() {
							var node = this.nextSibling;
												
							while (1) {
								if (node != null) {
									if ((node.tagName == "UL") || (node.tagName == "DIV")){
										
										var d = (node.style.display == "none")
										node.style.display = (d) ? "block" : "none";
										this.className = (d) ? "treeopen" : "treeclosed";
										
										return false;
									}
									node = node.nextSibling;
								} else {
									return false;
								}
							}
							return false;
						}

		_robj.className = "treeopen";
	}
	

	initMenusDIV(document.getElementById(_flag1));
}

function actTreeObj2(){
	//alert(_elementID);
	var _aux=_elementID;
	initMenusDIV(document.getElementById(_flag1));
	mostrar_letras(_elementID);

	if(_robj){
		_robj.onclick = function(){
							mostrar_letras(_aux);
							return false;
						}
	}
	
}
