//Script que coloca la fecha y la hora en el título de la página
function MakeArray(size)
  { this.length=size;
    for(var i=1; i <= size; i++)
    { this[i]="";
    }
    return this;
  }
  function showclock()
  { var now=new Date();
    var day=now.getDay();
    var date=now.getDate();
    var month=now.getMonth()+1;
    var year=now.getYear();
    var hours=now.getHours();
    var minutes=now.getMinutes();
    var seconds=now.getSeconds(); 
    days=new MakeArray(7);
    days[0]="Domingo";
    days[1]="Lunes";
    days[2]="Martes";
    days[3]="Miércoles";
    days[4]="Jueves";
    days[5]="Viernes";
    days[6]="Sábado";
    months=new MakeArray(13);
    months[1]="Enero";
    months[2]="Febrero";
    months[3]="Marzo";
    months[4]="Abril";
    months[5]="Mayo";
    months[6]="Junio";
    months[7]="Julio";
    months[8]="Agosto";
    months[9]="Septiembre";
    months[10]="Octubre";
    months[11]="Noviembre";
    months[12]="Diciembre"; 
    var vdate="";
    vdate += (days[day]) + ", ";
    vdate += date + " ";
    vdate += (months[month]) + " ";
    if (now.getYear() < 1000)
      vdate += now.getYear() + 1900
    else
      vdate += now.getYear();
    var vtime="";
    vtime += ((hours < 10) ? "0" : "") + hours;
    vtime += ((minutes < 10) ? ":0" : ":") + minutes;
    vtime += ((seconds < 10) ? ":0" : ":") + seconds;
    var vtitle="";
    vtitle="Universidad Iberoamericana Puebla"; 
    if (document.all || document.getElementById)
    { window.setTimeout("showclock()",1000);               // update frequency
      document.title = vtitle+" :: "+vdate+" - "+vtime;
    }
    else
    { if ((seconds == 0) || (seconds == 10) || (seconds == 20) || (seconds == 30) || (seconds == 40) || (seconds == 50))
        window.setTimeout("showclock()",10000)
      else
        window.setTimeout("showclock()",1000);
      self.status = vdate+"     "+vtime+"     "+vtitle
    }
  }
  showclock()
