function dato(){

d = new Array(
"Søndag",
"Mandag",
"Tirsdag",
"Onsdag",
"Torsdag",
"Fredag",
"Lørdag"
);
m = new Array(
"Januar",
"Februar",
"Mars",
"April",
"Mai",
"Juni",
"Juli",
"August",
"September",
"Oktober",
"November",
"Desember"
);

today = new Date();
day = today.getDate();
year = today.getYear();

if (year < 2000)    
year = year + 1900; 

end = ".";
if (day==1 || day==21 || day==31) end=".";
if (day==2 || day==22) end=".";
if (day==3 || day==23) end=".";
day+=end;

//document.write(" ");
document.write(d[today.getDay()]+" "+day+" "+m[today.getMonth()]+" ");
document.write(year);
//document.write("</font>");
}
