<!--
var Temporizador
var TiempoCapa
var i
var TamanoHelpwidth
var TamanoHelpheight

function setCookie(nom,valor) {
		exp=new Date();
		time=90*60*60*24*1000;
		exp.setTime(exp.getTime()+time);
		document.cookie=escape(nom)+"="+escape(valor)+"; "+"expires="+exp.toGMTString()
}

function getCookiePopup(name) {
	var cuki = document.cookie;
	var index = cuki.indexOf(name + "=");
	if (index == -1) return null;
	index = cuki.indexOf("=", index) + 1;
	var endstr = cuki.indexOf(";", index);
	if (endstr == -1) endstr = cuki.length;
	return unescape(cuki.substring(index, endstr));
}

function mostrarMenus(xMenu){
	var xAct = mostrarMenus.arguments[1];
	//alert(xAct);
	var xM = xMenu.parentNode.getElementsByTagName('ul')[0];
	
	if (xM) {
		if (xAct) {
				xM.style.display='block';
				xM.className='verMenu';
				setCookie(xMenu.parentNode.id,'verMenu');
				amagarhelp();
			}
		else {
			if (xM.className!="verMenu") {
				xM.style.display='block';
				xM.className='verMenu';
				setCookie(xMenu.parentNode.id,'verMenu');
				amagarhelp();
			}
			else {
			xM.style.display='none';
			xM.className='ocultarMenu';
			setCookie(xMenu.parentNode.id,'ocultarMenu');
			//mostrarhelp(xM.className);
				}
			}
		}
		else {
			if (xM.style.display!='block') {
				xM.style.display='block';
				xM.className='verMenu';
				setCookie(xMenu.parentNode.id,'verMenu');
				amagarhelp();
				}
			else {
				xM.style.display='none';
				xM.className='ocultarMenu';
				setCookie(xMenu.parentNode.id,'ocultarMenu');
				}
			}
			amagarhelp();
	}
function mostrarhelp(node, dreta){	
	i=0;
						
		if (!document.getElementById("help")) {
				var ul = node;
				//mentres no trobem el seguent el ul afegim a la capa el nom de cada li (fill) 
				while (!ul.nodeName || ul.nodeName.toLowerCase() != "ul") ul = ul.nextSibling;
				//al heretar tots els estils del pare hem de fer que per cada cas l'estil del fill sigui block 
				//ja que el pare es none
				var clone = ul.cloneNode(true);
				clone.style.display	= "block";
		
				var help = document.createElement("div");
				help.id="help"
				help.appendChild(clone);
				//help.style.filter = "alpha(opacity=99)";
				//help.style.opacity = "0.99";
				help.style.color="white";
				help.style.background = "#cccc99";
				help.style.padding = "5px 5px 0px 0px";				
				help.style.position = "absolute";
				help.style.fontweight="bold";
				help.style.overflow="hidden";
				//help.style.top = window.event.y-4;
				document.getElementsByTagName("body")[0].appendChild(help);				
				var pos = getPosition(node);
				var pos_help = getPosition("help");
				help.style.top = pos.top+"px";
				if (!dreta) {
					help.style.left = (pos.left + pos.width-15)+"px"
					
				} else {
					
					help.style.left = (pos.left - pos_help.width+14)+"px"
				}
				TamanoHelpwidth=pos_help.width;
				TamanoHelpheight=pos_help.height;
				redimCapa();
			}			
			return true;
}// mostrarMenus
function redimCapa(){
//alert(Capa)
var help = document.getElementById("help");
	if ((i>=(TamanoHelpwidth)) || (i>=(TamanoHelpheight)))
	{
		clearTimeout(Temporizador)
		help.style.width = TamanoHelpwidth + "px";
		help.style.height = TamanoHelpheight + "px";
		help.style.filter = "alpha(opacity=99)";
		help.style.opacity = "0.99";
	}else{
	i=i+5;
	help.style.width =i+"px";
	help.style.height =i+"px";
	help.style.filter = "alpha(opacity="+i+")";
	//help.style.opacity = "0.99";
	Temporizador = setTimeout('redimCapa()',10);
	
	}
}

function amagarhelp() {
	var help = document.getElementById("help");
	if (help) {
		help.parentNode.removeChild(help);
	}
	clearTimeout(Temporizador);
}
function getPosition(obj) {
 obj = (typeof obj == 'string' ? document.getElementById(obj) : obj);
 var offsetLeft = 0;
 var offsetTop = 0;
 var offsetWidth = obj.offsetWidth;
 var offsetHeight = obj.offsetHeight;
 
 while(obj) {
  offsetLeft += obj.offsetLeft;
  offsetTop += obj.offsetTop;
  obj = obj.offsetParent;
 }
 
 return {top : offsetTop, left : offsetLeft, width : offsetWidth, height : offsetHeight };
}

//-->