
var Today=new Date();
var ThisDay=Today.getDay();
var ThisDate=Today.getDate();
var ThisMonth=Today.getMonth()+1;
var ThisYear=Today.getFullYear();  //included if you wish to insert the year
function DayTxt (DayNumber) {
var Day=new Array();
Day[0]="Domenica";
Day[1]="Lunedi";
Day[2]="Martedi";
Day[3]="Mercoledi";
Day[4]="Giovedi";
Day[5]="Venerdi";
Day[6]="Sabato";
return Day[DayNumber];
}
var DayName=DayTxt(ThisDay);
function MonthTxt (MonthNumber) {
var Month=new Array();
Month[1]="Gennaio";
Month[2]="Febbraio";
Month[3]="Marzo";
Month[4]="Aprile";
Month[5]="Maggio";
Month[6]="Giugno";
Month[7]="Luglio";
Month[8]="Agosto";
Month[9]="Settembre";
Month[10]="Ottobre";
Month[11]="Novembre";
Month[12]="Dicembre";
return Month[MonthNumber];
}
var MonthName=MonthTxt(ThisMonth);
var d = new Date();
var h = d.getHours();
document.write("<div id='CalendarioSalutoDx'>" + "&nbsp;" + "<span class='CalendarioGiorno'>" + DayName + "<\/span>" + "&nbsp;" + "<span class='CalendarioGiornoN'>" + ThisDate + "<\/span><span class='CalendarioMeseAnno'>" + "&nbsp;" + MonthName + "&nbsp;" + ThisYear + "<\/span>" + "<\/div>");
if (h < 2) document.write("<div id='CalendarioSaluto'>"+" Buon Giorno! "+"<\/div>");
else if (h < 3) document.write("<div id='CalendarioSaluto'>" + " Buon Giorno! " + "<\/div>");
else if (h < 7) document.write("<div id='CalendarioSaluto'>" + " Buon Giorno! " + "<\/div>");
else if (h < 12) document.write("<div id='CalendarioSaluto'>" + " Buon Giorno! " + "<\/div>");
else if (h < 17) document.write("<div id='CalendarioSaluto'>" + " Buon Pomeriggio! " + "<\/div>");
else if (h < 23) document.write("<div id='CalendarioSaluto'>" + " Buona Sera! " + "<\/div>");
else document.write("<div id='CalendarioSaluto'>" + " Buona Notte! " + "<\/div>");

