
     var diasMes = new Array();

     diasMes[0] = 31;
     diasMes[1] = 28;
     diasMes[2] = 31;
     diasMes[3] = 30;
     diasMes[4] = 31;
     diasMes[5] = 30;
     diasMes[6] = 31;
     diasMes[7] = 31;
     diasMes[8] = 30;
     diasMes[9] = 31;
     diasMes[10] = 30;
     diasMes[11] = 31;

     function Calendario() {
						 
       var meses= "EneFebMarAbrMayJunJulAgoSepOctNovDic";
       var hoy= new Date();
       var dia;
       var anio;
       var nDias;

       anio = hoy.getYear();
       if (navigator.appName == "Netscape")
          anio += 1900;

       dia = hoy.getDate();

       // es bisiesto ?
       if (((anio % 4 == 0) && (anio % 100 != 0)) || (anio % 400 == 0))
           diasMes[1] = 29;

       // número de días del mes
       nDias = diasMes[hoy.getMonth()];

       // busca el primer día del mes
       primerDia = hoy;
       primerDia.setDate(1);

       // calcula que día es el 1 del mes
       diaInicial = primerDia.getDay();

       document.writeln("<left>");
       document.write("<Table bgcolor='#FFFFFF'>");
       document.write("<TR><TH COLSPAN=7 ALIGN=center><FONT SIZE = 1>");
       document.write(meses.substring(hoy.getMonth() * 3, (hoy.getMonth()+1) * 3));
       document.write(". ");
       document.write(anio);

       document.write("<TR><TH ALIGN=CENTER><FONT SIZE = 1>");
       document.write("Lun<TH ALIGN=CENTER><FONT SIZE = 1>Mar<TH ALIGN=CENTER><FONT SIZE = 1>");
       document.write("Mie<TH ALIGN=CENTER><FONT SIZE = 1>Jue<TH ALIGN=CENTER><FONT SIZE = 1>");
       document.write("Vie<TH ALIGN=CENTER><FONT SIZE = 1>Sab<TH ALIGN=CENTER><FONT SIZE = 1>Dom");

       // escribe los blancos necesarios
       document.write("<TR>");
       column = 0;
       for (i=1; i<diaInicial; i++)
       {
          document.write("<TD ALIGN=CENTER><FONT SIZE=1>");
          column++;
          document.write("</FONT>");
       }

       for (i=1; i<=nDias; i++)
       {
          document.write("<TD ALIGN=CENTER><FONT SIZE = 1>");
          if (i == dia)
              document.write("<FONT COLOR=\"#FF0000\" SIZE=1>")
          document.write(i);
          if (i == dia)
              document.write("</FONT>");
          column++;
          if (column == 7)
          {
              document.write("<TR>"); // nueva fila
              column = 0;
          }
       }
       document.write("</TABLE>");
       document.writeln("</CENTER>");
	   
	  <!-- document.write("</div>");
       //return '';
     }
function alerta(){
	alert("Hola");
}
   /*  document.write(Calendario());
    document.write("</FONT>");*/
