﻿// Función para mostrar el menu desplegable
var t;

function activar()
{
	clearTimeout(t);
}

function mostrar_ilim()
{
	var capa = document.getElementById('menu_ilim');
    capa.style.visibility = "visible";
}

function mostrar_serv()
{
	var capa = document.getElementById('menu_serv');
    capa.style.visibility = "visible";
}

function mostrar_prod()
{
	var capa = document.getElementById('menu_prod');
    capa.style.visibility = "visible";
}

function mostrar_noticias()
{
	var capa = document.getElementById('noticias');
    capa.style.visibility = "visible";
}
function mostrar_faq()
{
	var capa = document.getElementById('faq');
    capa.style.visibility = "visible";
}

function ocultar_submenus()
{
	/*var capa1 = document.getElementById('equipo');
    capa1.style.visibility = "hidden";
	var capa2 = document.getElementById('servicios');
    capa2.style.visibility = "hidden";*/
	var capa3 = document.getElementById('menu_prod');
    capa3.style.visibility = "hidden";
	var capa4 = document.getElementById('menu_serv');
    capa4.style.visibility = "hidden";
	var capa5 = document.getElementById('menu_ilim');
    capa5.style.visibility = "hidden";
}
function retardo()
{
	t=setTimeout('ocultar_submenus()',800);
}

// fin del menú desplegable

//popup's imagenes

function PopUp(img){
	foto1= new Image();
	foto1.src=(img);
	Control(img);
}

function Control(img){
	if((foto1.width!=0)&&(foto1.height!=0)){
		verFoto(img);
	}
	else{
		funcion="Control('"+img+"')";
		intervalo=setTimeout(funcion,20);
	}
}

function verFoto(img){
	ancho=foto1.width+20;
	alto=foto1.height+20;
	anchoPantalla=screen.width;
	altoPantalla=screen.height;
	cadena="width="+ancho+",height="+alto+",left="+(anchoPantalla-foto1.width)/2+",top="+(altoPantalla-foto1.height)/2;
	ventana=window.open(img,"",cadena);
	ventana.document.writeln ('<html>');
	ventana.document.writeln ('<head>'); 
    ventana.document.writeln ('<title></title>');
	ventana.document.writeln ('</head>');
	ventana.document.writeln ('<body>');
	ventana.document.writeln ('<img src="'+img+'" style="border:2px #e5e5e5 solid;";');
	ventana.document.writeln ('</body>');
	ventana.document.writeln ('</html>');
}