function monthArray() {

	this[0] = "Gennaio";	this[1] = "febbraio";	this[2] = "Marzo";

	this[3] = "Aprile";	this[4] = "maggio";	this[5] = "Giugno";

	this[6] = "Luglio";	this[7] = "Agosto";	this[8] = "Settembre";

	this[9] = "Ottobre";	this[10] = "Novembre";	this[11] = "Dicembre";

    return (this);

}



function dayArray() {

	this[0] = "Domenica";	this[1] = "Lunedi";	this[2] = "Martedì";

	this[3] = "Mercoledì";	this[4] = "Giovedì";	this[5] = "Venerdì";

	this[6] = "Sabato";

        return (this);

}





function formatYear(year)

{

  if (year > 1900) return year

  return year+1900;

}



function writeDate()

{

   days = new dayArray();

   months = new monthArray();

   d = new Date();

   day = d.getDate();

   month = d.getMonth();

   year = d.getYear();

   str = days[d.getDay()] + " " + day + " " + months[month] +" "+formatYear(year);

  document.writeln(str);

}



function writeTime()

{

   d = new Date();

   hour=d.getHours();

   min=d.getMinutes();

   sec=d.getSeconds();

   if (hour < 10) hour = "0"+hour;

   if (min < 10) min = "0"+min;

   if (sec < 10) sec = "0"+sec;

   str = hour+"h"+min;

   document.writeln(str);

}


