


function showMenu(layer, x0, y0, x1, y1, finalAlpha, spring, downVelocity){
	l = document.getElementById(layer);
	if (l != null){
		l.style.MozOpacity = 0;
		MM_showHideLayers(layer,'','show')
		show(layer, 0, finalAlpha);
	//	var obj = MM_findObj(layer);
	//	obj.style.left = x0;
	//	obj.style.top = y0;
	//	obj.style.left = x1;
	//	obj.style.top = y1;
	//	if (spring==1){
	//		moveToXSpring(layer, x1, 0);
	//		moveToYSpring(layer, y1, 0);
	//	}
	//	else{
	//		if (downVelocity == '') downVelocity = 5;
	//		moveToY(layer, y1, downVelocity, x1);
	//	}
		MM_showHideLayers('hideMenus','','show');
	}
}

function show(layer, a, a2){
	a = a + 10.0;
	if (ie){//Internet Explorer
		MM_changeProp(layer,'','style.filter','alpha(Opacity='+a+')','DIV');
	}
	else{//Netscape
		l = document.getElementById(layer);
		if (a < 100) l.style.MozOpacity = a/100.0;
	}
	if (a < a2){
		setTimeout("show('"  +layer+"' , "+a+ "," + a2 + ")", 20);
	}
	else{
		MM_changeProp(layer,'','style.filter','alpha(Opacity='+a+')','DIV');
		l = document.getElementById(layer);
		if (a < 100) l.style.MozOpacity = a2/100.0;
		else l.style.MozOpacity = 0.99;
	}
}

function moveToX(layer, x, incX){
	var obj = MM_findObj(layer);
	var x0 = parseInt(obj.style.left);
	if ( (x0<x && incX>0) || (x0>x && incX<0) ){
		var tx = (x - x0)/5.0;
		incX = incX/1.3+tx;
		obj.style.left = parseInt(obj.style.left) + incX;
		setTimeout("moveToX('" +layer+ "',"+ x + "," + incX + ")", 40);
	}
	else{
		obj.style.left = x;
	}
}

function moveToY(layer, y, incY, x1){
	var obj = MM_findObj(layer);
	var y0 = parseInt(obj.style.top);
	if ( (y0<y && incY>0) || (y0>y && incY<0) ){
		var ty = (y - y0)/5.0;
		incY = incY/1.3+ty;
		obj.style.top = parseInt(obj.style.top) + incY;
		setTimeout("moveToY('" +layer+ "',"+ y + "," + incY + "," + x1 + ")", 40);
	}
	else{
		obj.style.top = y;
		moveToX(layer, x1, 5);
	}
}

function moveToXSpring(layer, x, incX){
	var obj = MM_findObj(layer);
	var x0 = parseInt(obj.style.left);
	if (x != x0){
		var tx = (x - x0)/5.0;
		incX = incX/1.3+tx;
		obj.style.left = parseInt(obj.style.left) + incX;
		setTimeout("moveToXSpring('" +layer+ "',"+ x + "," + incX + ")", 40);
	}
	else{
		obj.style.left = x;
	}
}

var menuEnMoviment = 0;

function moveToYSpring(layer, y, incY){
	var obj = MM_findObj(layer);
	var y0 = parseInt(obj.style.top);
	if (y != y0){
		var ty = (y - y0)/5.0;
		incY = incY/1.3+ty;
		obj.style.top = parseInt(obj.style.top) + incY;
		setTimeout("moveToYSpring('" +layer+ "',"+ y + "," + incY+ ")", 40);
	}
	else{
		obj.style.top = y;
		menuEnMoviment = 0;
	}
}

var bHideMenus = 0;
function hideMenus(){
	bHideMenus = 0;
	setTimeout("hideM()", 1000);
}

function hideM(){
	if (bHideMenus != 1){
		ocultaMenusH();
		ocultaSubmenus1();
		MM_showHideLayers('hideMenus','','hide');
	}
	else{
		setTimeout("hideM()", 1000);
	}
}

function ocultaSubmenus1(){
	MM_showHideLayers('menu1-op','','hide');
	MM_showHideLayers('menu2-op','','hide');
	ocultaSubMenus_apartat2_SERVICIOS();
	MM_showHideLayers('menu3-op','','hide');
	MM_showHideLayers('menu5-op','','hide');
	ocultaSubMenus_apartat5_ACTUALIDAD();
	ocultaSubMenus_apartat5_3_ACTUALIDAD();

	MM_showHideLayers('languageSelection','','hide');

}

function ocultaSubMenus_apartat2_SERVICIOS()
{
	MM_showHideLayers('menu2-op1-op','','hide');
	MM_showHideLayers('menu2-op4-op','','hide');
	MM_showHideLayers('menu2-op5-op','','hide');
}

function ocultaSubMenus_apartat5_ACTUALIDAD()
{
	ocultaSubMenus_apartat5_3_ACTUALIDAD();
	MM_showHideLayers('menu5-op3-op','','hide');
}

function ocultaSubMenus_apartat5_3_ACTUALIDAD()
{
	MM_showHideLayers('menu5-op3-op3-op','','hide');
}



