User:Reiazur/global.js

function clock(seconds){ var obj = new Date; var hour=obj.getHours; var minutes=obj.getMinutes; var dn="PM"; if(hour<12){ dn="AM"; }         else if(hour>12){ hour-=12; }         if(minutes<=9){ minutes="0"+minutes; }        if(seconds!=null || seconds!=""){ var seconds = obj.getSeconds; if(seconds<=9){ seconds="0"+seconds; }             document.getElementById("clockhereseconds").innerHTML=hour+":"+minutes+":"+seconds+" "+dn; setTimeout("clock('withseconds')",1000) } document.getElementById("clockhere").innerHTML=hour+":"+minutes+" "+dn; setTimeout("clock",1000); } onload=clock;