Adding the time in Javascript

Ok first it only displays the time on the users computer which is good and bad. First it is not accurate since it is client side but good because you do not have to adjust for time zones. So here it is:

function tS() {
x=new Date();
x.setTime(x.getTime());
return x;
}
function lZ(x) {
return (x>9)?x:'0'+x;
}
function tH(x){
if(x==0){
x=12;
}
return (x>12)?x-=12:x;
}
function dT(){
window.status=''+eval(oT)+'';
document.title=''+eval(oT)+'';
if(fr==0){
fr=1; document.write(''+eval(oT)+'');
}
tP.innerText=eval(oT);
setTimeout('dT()',1000);
}
function aP(x){
return (x>11)?'pm':'am';
}
var fr=0,oT="tH(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())+' '+aP(tS().getHours())";

Fixed the post above, put the code in the right tags :)

If anyone has tried this please confirm so we know it works. Nice work Voldron!

It works i put it on my site here

the code was a bit messy, i modified it a bit... hope you dont mind

Well i just got it off hotscripts and posted it so that people could just take it, I didn't do it. But hey i am being honest in there is no wrong in that.

It is ok dabluedude if you wanted to make it nice and pretty go right ahead