// Anytime Anywhere Web Page Clock Generator
// Clock Script Generated at
// http://www.rainbow.arch.scriptmania.com/tools/clock

function timeSource(){
   x=new Date();
   x.setTime(x.getTime());
   return x;
}
function leadingZero(x){
   return (x>9)?x:'0'+x;
}
function twelveHour(x){
   if(x==0){
      x=12;
   }
   return (x>12)?x-=12:x;
}
function displayTime(){
   if(fr==0){
      fr=1;
      document.write('<span id="tP">'+eval(outputTime)+'</span>');
   }
   document.getElementById('tP').innerHTML=eval(outputTime);
   setTimeout('displayTime()',1000);
}
function amPMsymbol(x){
   return (x>11)?'pm':'am';
}
function fixYear4(x){
   return (x<500)?x+1900:x;
}
var dayNames=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
var monthNames=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
var fr=0;
var outputTime="dayNames[timeSource().getDay()]+' '+timeSource().getDate()+' '+monthNames[timeSource().getMonth()]+' '+fixYear4(timeSource().getYear())+' '+':'+':'+' '+twelveHour(timeSource().getHours())+':'+leadingZero(timeSource().getMinutes())+':'+leadingZero(timeSource().getSeconds())+' '+amPMsymbol(timeSource().getHours())";



// Use the following within your HTML to Start/display your clock
// <script language="JavaScript">displayTime();</script>
//call the script using
// <script language="JavaScript" src="path/clock.js"></script>
//exactly where you want the clock in the flow of your HTML.