function montharr(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11){ this[0]=m0 this[1]=m1 this[2]=m2 this[3]=m3 this[4]=m4 this[5]=m5 this[6]=m6 this[7]=m7 this[8]=m8 this[9]=m9 this[10]=m10 this[11]=m11 } function mese(nmonth) { var realdate=new Date() var mydate=new Date() if (nmonth>=0) mydate.setMonth(nmonth) // prende come mese il mese passato alla funzione var myday=mydate.getDay() var mymonth=mydate.getMonth() var myweekday=mydate.getDate() var weekday=myweekday var year=mydate.getYear() if (year<2000) year+=1900 var ad=new Array("Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato") var am=new Array("Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre") var day=ad[myday] var month=am[mymonth] mymonth=mymonth+1 var OG; var monthDays = new montharr(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); OG = mydate.getDate(); if (((year%4==0) && (year%100!= 0)) || (year%400==0)) monthDays[1] = 29; nDays = monthDays[mydate.getMonth()]; firstDay = mydate; firstDay.setDate(1); startDay = (firstDay.getDay()-1); if (startDay < 0) startDay=6; document.write(""); document.write(""); document.write(""); // Caselle vuote document.write(""); column = 0; for (i=0; i"); column++; document.write(""); } var fst=0 for (i=1; i<=nDays; i++) { document.write(""); if ((i == OG) && (realdate.getMonth() == mydate.getMonth())) document.write("") if (fst == 1) { document.write(""); fst=0 } column++; if (column == 7) { document.write(""); column = 0; } } document.write("
"); document.write(month+" "+year); document.write("
"); document.write("LMMGVSD
"); if ((i == OG) && (realdate.getMonth() == mydate.getMonth())) document.write("") // segna in rosso oggi if (mymonth==1 && i==1) fst = 1 if (mymonth==1 && i==6) fst = 1 if (mymonth==4 && i==16) fst = 1 // pasquetta 2001 if (mymonth==4 && i==25) fst = 1 if (mymonth==5 && i==1) fst = 1 if (mymonth==8 && i==15) fst = 1 if (mymonth==11 && i==1) fst = 1 if (mymonth==12 && i==8) fst = 1 if (mymonth==12 && i==25) fst = 1 // natale if (mymonth==12 && i==26) fst = 1 // s. stefano if (column == 6) fst = 1 if ((fst == 1) && (i != OG)) document.write("") document.write(i); document.write("
"); }