function Miesiace() {
this.IleDni=new Array("", 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
this.Dzien=new Array("", "Pn", "Wt", "Sr", "Cz", "Pt", "So", "Nd");
}

function Kalendarz(){
Kol=0;
nTydzien=Teraz1.getDay(Teraz1.setDate(1));
nTydzien=(nTydzien==0 ? 7 : nTydzien)
Rok=Teraz.getYear()+"";
Rok=20+""+Rok.substring(Rok.length-2,Rok.length);
if (Teraz.getYear()%4==0) Czas.IleDni[2]=29;

document.write("<table align=center border=0 cellpadding=2 cellspacing=0>");
for (i=1; i<=7; i++) document.write("<th><Font size=2 color=#637560>"+Czas.Dzien[i]+"</th>");
document.write("</tr><tr>");
for (i=1; i<nTydzien; i++) {
 document.write("<td></td>");
 Kol++};
for (i=1; i<=Czas.IleDni[Teraz.getMonth()+1]; i++) {
 document.write("<th");
 if (Kol==6) document.write(" bgcolor=#BACDB7");
 document.write("><Font size=2 color=#003196>"+i+"</th>");
 Kol++;
 if (Kol==7) {
  document.write("<tr>");
  Kol=0};
 };
document.write("</tr></table><br  />");
}
Czas=new Miesiace;
Teraz=new Date();
Teraz1=new Date();
Kalendarz();
