
		function tick() {
  var hours, minutes, seconds, ap;
  var intHours, intMinutes, intSeconds;
  var today;

  today = new Date();

  intHours = today.getHours();
  intMinutes = today.getMinutes();
  intSeconds = today.getSeconds();

  if (intHours == 0) {
     hours = "12:";
     ap = "am";
  } else if (intHours < 12) { 
     hours = intHours+":";
     ap = "am";
  } else if (intHours == 12) {
     hours = "12:";
     ap = "pm";
  } else {
     intHours = intHours - 12
     hours = intHours + ":";
     ap = "pm";
  }

  if (intMinutes < 10) {
     minutes = "0"+intMinutes+":";
  } else {
     minutes = intMinutes+":";
  }

  if (intSeconds < 10) {
     seconds = "0"+intSeconds+" ";
  } else {
     seconds = intSeconds+" ";
  } 

  timeString = hours+minutes+seconds+ap;

  window.setTimeout("tick();", 100);
  
  //// date
        var months=new Array(13);
        months[1]="01";
        months[2]="02";
        months[3]="03";	
        months[4]="04";
        months[5]="05";
        months[6]="06";
        months[7]="07";
        months[8]="08";
        months[9]="09";
        months[10]="10";
        months[11]="11";
        months[12]="12";

        var today=new Date();

        var lmonth=months[today.getMonth() + 1];

        var date=today.getDate();

        var year=today.getFullYear();



        var todaysdate= (date + ":" + lmonth + ":" + year);
        
  /////bring date and time together      
        
        var timeDate= ("time: " + timeString + "<br>" + "date: " + todaysdate);


        Clock.innerHTML = timeDate;
}

