sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			this.style.zIndex=200; //this line added to force flyout to be above relatively positioned stuff in IE
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

// Comprobación de los campos que no deben quedar vacíos al conectar
function comprobar()
{
	if(document.formulario.txtusuario.value=='')
	{
		alert('Debe introducir un nombre de Usuario');
		document.formulario.txtusuario.focus();
		return(1);
	}
	if(document.formulario.txtpassword.value=='')
	{
		alert('Debe introducir una Contrase\xf1a');
		document.formulario.txtpassword.focus();
		return(1);
	}
	return(0)
}

// Descarga ejecutable para la conexión remota
function ConectaAhora(){
	var navegador = navigator.appName
 	
	location = "cliente2.exe";
	
	if(navegador == "Microsoft Internet Explorer")
	{
		setTimeout("self.close();",7000);
	}
	else
	{
		setTimeout("self.close();",30000);
	}
}

// Agregar a Favoritos
function agregar(){

	var titulo = String(document.title);
	var url = String(window.location);
	
	if(navigator.appName=="Microsoft Internet Explorer")
	{
		window.external.AddFavorite(url,titulo);
	}
	else if(window.sidebar) // Firefox
	{
		window.sidebar.addPanel(titulo, url, "");
	}
	else if(window.opera && window.print) // Opera
	{
		var elem = document.createElement('a');
		elem.setAttribute('href',href);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	}
	else // Otros Navegadores Web
	{
		alert ("Presione Crtl+D para agregar a este sitio en sus Favoritos");  
	}
}

// Calcular el año actual
function AnioActual(){
	var fecha = new Date();
	var anio = fecha.getFullYear();
	document.write(anio);
}
