// Archivo: functions.js
// Creado: 01/12/2005
// Webmaster: Marcos López
// Descripción: Contiene las funciones necesarias para animar el menú horizontal

var bgMemory;	// save color information
var fgMemory;
var statusinfo = false;
var statustxt = 'ASEVAL';
function mOver(cell, id)
{
      cell.style.cursor = 'hand';
      cell.style.backgroundColor='#e6e6e6';
	if (typeof document.getElementById(id + "cc") == "object")
	{
		Elem = document.getElementById(id + "cc");
		bgMemory = Elem.style.backgroundColor;
		Elem.style.backgroundColor='#e6e6e6';
	}
	if (typeof document.getElementById(id + "l") == "object")
	{
		Elem = document.getElementById(id + "lk");
		fgMemory = Elem.style.color;
		Elem.style.color='#3D6484';
	}
	window.status=statustxt;
	statusinfo = true;
	return true;
}
function mOut(cell, id)
{

      cell.style.cursor = 'hand';
      cell.style.backgroundColor='';
      window.status="";
	if (typeof document.getElementById(id) == "object")
	{
		Elem = document.getElementById(id + "cc");
		Elem.style.backgroundColor = bgMemory;
	}
	if (typeof document.getElementById(id + "lk") == "object")
	{
		Elem = document.getElementById(id + "lk");
		Elem.style.color = fgMemory;
	}
        window.status=statustxt;
	statusinfo = false;
	return true;
}
function mClick(cell)
{
   if(event.srcElement.tagName=='TD')
   {
      cell.children.tags('A')[0].click();
   }
}
function mostrarHora()
{
	fecha=new Date();
// Calcular la hora actual
	var hora=fecha.getHours();
	var minutos=(fecha.getMinutes()<10)?"0"+fecha.getMinutes():fecha.getMinutes();
	var segundos=(fecha.getSeconds()<10)?"0"+fecha.getSeconds():fecha.getSeconds();
	var horaActual=hora+":"+minutos+":"+segundos;
// Obtener la fecha actual
        var anyo=fecha.getYear();
	if (anyo < 1000)
		anyo+=1900;
	var dia=fecha.getDay();
	var mes=fecha.getMonth();
	var diaMes=fecha.getDate();
	if (diaMes<10)
		diaMes=diaMes;
	var arrayDias = new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sábado");
	var arrayMeses = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
	var fechaActual = arrayDias[dia] + ", " + diaMes + " de " + arrayMeses[mes] + " de " + anyo;

	if (document.all)
           document.all.reloj.innerHTML= fechaActual + "<br>" + horaActual;
        else{
           document.layers['reloj'].document.write=horaActual;
           document.layers['reloj'].document.close();
        }
	setTimeout("mostrarHora()",1000);
}
