function makeMonthArray() {
        this.length=12;
        this[1] = "Gennaio", this[2] = "Febbraio"; this[3] = "Marzo";
        this[4] = "Aprile"; this[5] = "Maggio"; this[6] = "Giugno";
        this[7] = "Luglio"; this[8] = "Agosto"; this[9] = "Settembre";
        this[10] = "Ottobre"; this[11] = "Novembre"; this[12] = "Dicembre";
        return(this);
}
function makeDayArray() {
        this.length=7;
        this[1] = "Domenica", this[2] = "Lunedi"; this[3] = "Martedi";
        this[4] = "Mercoledi", this[5] = "Giovedi"; this[6] = "Venerdi";
        this[7] = "Sabato";
        return(this);
}
function writeDate() {
        attdate = new Date();
        monthName = new makeMonthArray();
        dayName = new makeDayArray();    
        day = attdate.getDay() + 1;
        date = attdate.getDate();
        month = attdate.getMonth() + 1;
        year = attdate.getYear();
        sec = attdate.getSeconds()

        if (year >= 100 && year <= 1999) 
		  {year = year+1900}
		else 
			{year =  year}
		
        dateStr  = dayName[day];
        dateStr += ", ";
        dateStr += date;
        dateStr += ". ";
        dateStr += monthName[month];
        dateStr += " ";
        dateStr += year;
        dateStr += ".";
        document.write(dateStr);
}