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();
return x;
function lZ(x) {
return (x>9)?x:'0'+x;
function tH(x){
return (x>12)?x-=12:x;
function dT(){
fr=1; document.write(''+eval(oT)+'');
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