<!--
var dayarray=new Array("diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte")
var montharray=new Array("de gener","de febrer","de mar&ccedil;","d&rsquo;abril","de maig","de juny","de juliol","d&rsquo;agost",
	"de setembre","d&rsquo;octubre","de novembre","de desembre")

function getthedate()
{
var mydate=new Date()
var year=mydate.getYear()
if (year<1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
//if (daym<10)
//daym="0"+daym
//var dn="am"
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()

timenow=mydate.getTime();
var thehour=mydate.getHours();

if (thehour>18) 
var temps="Bon vespre,";
else if (thehour>14) 
var temps="Bona tarda,";
else if (thehour>6)
var temps="Bon dia,";
else if (thehour>2) 
var temps="Bona matinada,";
else if (thehour=12||thehour>=1||thehour>21) 
var temps="Bona nit,";

/*
if (hours>=12)
dn="pm"
if (hours>12)
{
hours=hours-12
}
if (hours==0)
hours=12
*/

if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate="<font color=800000 face=Times New Roman size=4><center>"+
	 "&nbsp;&nbsp;&nbsp;&nbsp;"+temps+"&nbsp;amics. Avui &eacute;s "+dayarray[day]+", "+daym+" "+montharray[month]+" del "+
	 ""+year+". Hora local: "+hours+":"+minutes+":"+seconds+"</center></font>"

/*
var cdate="<small><font color=800000 face=Times New Roman size=4>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Avui &eacute;s "+dayarray[day]+", "+daym+" de "+montharray[month]+" del "+year+". "+hours+":"+minutes+":"+seconds+" "+dn
+"</font></small>"
*/

if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit()
{
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}
//-->

