//<!-- ++++++++++++++++++++++ Ultima actualizacion +++++++++++++++ -->   Ultima 
          

// carga una matriz (array) con valores
function Item(){
     this.length = Item.arguments.length 
     for (var i = 0; i < this.length; i++)
     this[i] = Item.arguments[i]
}

function FechaUltimaActualizacion(pfecha){
   var ndia = new Item('Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado');
   var nmes = new Item('Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre');
   //var fecha = new Date(document.lastModified);
   var fecha = new Date(pfecha);
   var dia=fecha.getDate(fecha);
   var diaSemana = fecha.getDay(fecha); //  0=Domingo, 1=lunes, etc
   var mes=fecha.getMonth(fecha);
   var anyo=fecha.getYear(fecha);
   var anyoCorregido;
   var FechaSalida;
   if (anyo<10) {
        anyoCorregido = "200" + eval(anyo)
      }
      else if (anyo<80) {
           // anyo tiene 2 dígitos 19xx (más de 80)
           anyoCorregido = "20" + anyo
      }
      else if (anyo<=99) {
           // ano tiene 2 dígitos 20xx (menor de 80)
           anyoCorregido = "19" + anyo
      }
      else if (anyo<1000) {
            // ano tiene 3 dígitos (100 es 2000)
           anyoCorregido = eval(anyo) + eval(1900)
      }
      else {// anyo tiene 4 dígitos
           anyoCorregido = anyo
      }
  
   FechaSalida=" "+dia+" / "+mes+" / "+ anyoCorregido +" "
   FechaSalida= ndia[diaSemana ] + ", " + dia + " de " + nmes[mes] + " de " + anyoCorregido
   //document.write(FechaSalida)
   return FechaSalida
   //document.write(" "+dia+" / "+mes+" / "+ anyoCorregido +" ")
} 
