
function clock()
  	{
  		// alert("made it to the function");  		
  		var now = new Date();
  		// alert(now);
  		var amPm = "AM"
  		var hours = now.getHours();
  			if (hours>12)
  			{
  				amPm = "PM";
  				hours = (hours-12);
  			}	
  				
  			if (hours<10)
  			{
  				hours = ("0" + hours);
  				// alert(hours);
  			}
  			
  		var minutes = now.getMinutes();
  			if (minutes<10)
  			{
  				minutes = ("0" + minutes);
  				// alert(minutes);
  			}
  		
  		var seconds = now.getSeconds();  		
  			if (seconds<10)
  			{
  				seconds = ("0" + seconds);
  				// alert(seconds);
  			}	
  				
  		currentTime=setTimeout("clock()",1000);
  		document.getElementById("clock_digits").innerHTML= ("Current Time is: " + hours + ":" + minutes + ":" + seconds + " " + amPm);  		
  	}  
