// para usar desde HTML
//      [optional formatting]<SCRIPT SRC="/Tools/Week_Of.js"></SCRIPT>[/optional formatting]
// NOTE: `date.getMonth()` returns `0` for Jan, `1` for Feb, ..., `11` for Dec  <-------
function NombreMes(iMes) {
   NombresMeses = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
   return NombresMeses[iMes];
}

function NombreDia(iDia){
   NombresDias = new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado");
   return NombresDias[iDia];
}

// inicio
hoy = new Date();

dia=hoy.getDate();

ano = hoy.getYear();
if(ano < 1900) {ano += 1900};  // problemas Y2K->Netscape

mes=hoy.getMonth();
diasemana=hoy.getDay();

textoano=String(ano);
nrogif1=textoano.substring(0,1);nrogif2=textoano.substring(1,2);nrogif3=textoano.substring(2,3);nrogif4=textoano.substring(3,4);

borde=0;
document.write("<font face=\"Verdana,Arial,Helvetica\" color=\"#333333\">" + NombreDia(diasemana) + " " + dia + " de " + NombreMes(mes)  + " de " + textoano + "</font>");
// final
