function tick() {
 ClockDiv = document.getElementById("Clock");
 intSeconds += 1;
 if(intSeconds == 60) {
   intSeconds = 0; intMinutes += 1;
 }
 if(intMinutes == 60) {
   intMinutes = 0; intHours += 1;
 }
 if(intHours == 24) intHours = 0;
 
 /*if (intHours == 0) { hours = "12:"; ap = "Полночь";
 } else if (intHours < 12) { hours = intHours+":"; ap = "AM";
 } else if (intHours == 12) { hours = "12:"; ap = "PM";
 } else { hours = (intHours-12) + ":"; ap = "PM"; }*/
 hours = intHours+":";

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

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

 //timeString = hours+minutes+seconds+ap;
 timeString = hours+minutes+seconds;

 ClockDiv.innerHTML = timeString;

 setTimeout("tick();", 1000);
}