<!--
  function uniPopUp (url, width, height) {
    PopUpWindow = window.open(url, '','titlebar=no, toolbar=no, location=no, scrollbars=yes, directories=no, status=no, menubar=no, resizable=no, width=' + width + ', height=' + height);
    PopUpWindow.focus();
  }
  function CurrentTime(containerNode, startTimeStamp, timeFormat) {
   var self = this,
   timer,
   weekDays = ["воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота"],
   months = ["январь", "февраль", "март", "апрель", "май", "июнь", "июль", "август", "сентябрь", "октябрь", "ноябрь", "декабрь"],
   now = new Date(),
   prevTickTimeStamp,
   currTickTimeStamp;
  
  
   function addLeadingZero(v) {
   var s = v < 0 ? "-" : "";
   v = Math.abs(v);
  
   return s + (v < 10 ? "0" + v : v);
   }
  
   function generateTimeString24H() {
   return addLeadingZero(now.getUTCHours()) + ":" + addLeadingZero(now.getUTCMinutes()) + ":"
    + addLeadingZero(now.getUTCSeconds()) + ", " + weekDays[now.getUTCDay()] + " " + addLeadingZero(now.getUTCDate()) + ", " + months[now.getUTCMonth()] + " "
   + now.getUTCFullYear();
   }
  
   function generateTimeString12H() {
   var hours = now.getUTCHours(),
   dayPart = "AM";
  
  if (hours > 12) {
   hours -= 12;
   dayPart = "PM";
   }
   if (hours == 0) {
   hours = 12;
   }
   return addLeadingZero(hours) + ":" + addLeadingZero(now.getUTCMinutes()) + ":"
   + addLeadingZero(now.getUTCSeconds()) + " " + dayPart + ", " + weekDays[now.getUTCDay()] + " " + addLeadingZero(now.getUTCDate()) + ", " + months[now.getUTCMonth()] + " "
   + now.getUTCFullYear();
   }
  
   function secondTick() {
   currTickTimeStamp = new Date().getTime();
   now.setTime((currTickTimeStamp - prevTickTimeStamp) + startTimeStamp);
  
   containerNode.nodeValue = self.timeFormat == CurrentTime.F24 ? generateTimeString24H() : generateTimeString12H();
   }
  
   this.timeFormat = typeof timeFormat == "undefined" ? CurrentTime.F24 : timeFormat;
  
   this.start = function () {
   clearInterval(timer);
   prevTickTimeStamp = (new Date()).getTime();
   timer = setInterval(secondTick, 1000);
   }
  }
  
  CurrentTime.F24 = 0;
  CurrentTime.F12 = 1;
  
  CurrentTime.setTimeFormat = function (timeFormat) {
   this.timeFormat = timeFormat;
  }
  
  CurrentTime.getTimeFormat = function () {
   return this.timeFormat;
  }
//-->
