	var opacidadOut = 100;
	var timerIDOut = 0;
	ie5 = (document.all && document.getElementById);
	ns6 = (!document.all && document.getElementById);
	
	function fadeOut(bloque) {
		if(opacidadOut > 35){
			opacidadOut-=3;
			if(ie5) document.getElementById(bloque).filters.alpha.opacity = opacidadOut;
			if(ns6) document.getElementById(bloque).style.MozOpacity = opacidadOut/100;
		} else {
			fadeControlIn(bloque);
			return;
		}
		timerIDOut = setTimeout('fadeOut(\''+bloque+'\')',20);
		}
	function fadeControlOut(bloque) {
		clearTimeout(timerIDOut);
		if(ie5) document.getElementById(bloque).filters.alpha.opacity = 90;
		if(ns6) document.getElementById(bloque).style.MozOpacity = 0.9;
		opacidadOut = 90;
		fadeOut(bloque);
	}
	var opacidadIn = 0;
	var timerIDIn = 0;
	ie5 = (document.all && document.getElementById);
	ns6 = (!document.all && document.getElementById);
	
	function fadeIn(bloque) {
		if(opacidadIn < 90){
			opacidadIn+=3;
			if(ie5) document.getElementById(bloque).filters.alpha.opacity = opacidadIn;
			if(ns6) document.getElementById(bloque).style.MozOpacity = opacidadIn/100;
		}  else {
			fadeControlOut(bloque);
			return;
		}
		timerIDIn = setTimeout('fadeIn(\''+bloque+'\')',20);
		}
	function fadeControlIn(bloque) {
		clearTimeout(timerIDIn);
		if(ie5) document.getElementById(bloque).filters.alpha.opacity = 35;
		if(ns6) document.getElementById(bloque).style.MozOpacity = 35/100;
		opacidadIn = 35;
		fadeIn(bloque);
	}
	
	function baila(id) {
		fadeControlOut(id);
	}
	
	
	function ventana(URL,ancho,alto) 
	{
		day = new Date();
		id = day.getTime();
		x = (screen.width - ancho)/2
		y = (screen.height - alto)/2
		eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=0,width="+ancho+",height="+alto+",left=" + x + ",top = " + y + "');");
		
	}
	
	function menu(id,clic) {
		var hijos = document.getElementById('menu').getElementsByTagName('*');
		
		clic = parseInt(clic,10);
		
		for (var i=0; i<hijos.length; i++) {
			if ((clic) == i) {
				hijos.item(i).className="activo";					
			} else {
				hijos.item(i).className="";
			}
		}	
		
		if (document.getElementById('div_activo').value!='sub0') {
			if (document.getElementById('div_activo').value!=id) {
				document.getElementById(document.getElementById('div_activo').value).style.display='none';
				document.getElementById(id).style.display='';
			}
		} else {
			document.getElementById(id).style.display='';
		}
		document.getElementById('div_activo').value = id;
	}
	
	function mandaIndex(menu) {
		document.acciones.menu.value = menu;
		document.acciones.submit();
	}