function OpenWindow(theURL,winName) {
  window.open(theURL,winName,'scrollbars=yes,resizable=yes,width=390,height=340,left=5,top=5');
} 

function OpenPrint(theURL,winName) {
  window.open(theURL,winName,'toolbar=yes,scrollbars=yes,resizable=yes,width=700,left=0,top=0');
}

function login(fname) {
  f = eval("document.forms." + fname);
  if(f.UserName.value == "" || f.Password.value == "") {
    alert("Пожалуйста, ведите свой логин и пароль!\nPlease enter your username and password!"); return false;}
  else f.submit();
}

function makeMonthArray() {
  this.length = 12;
  this[1] = "января"; this[2] = "февраля"; this[3] = "марта"; this[4] = "апреля"; this[5] = "мая"; this[6] = "июня";
  this[7] = "июля"; this[8] = "августа"; this[9] = "сентября"; this[10] = "октября"; this[11] = "ноября"; this[12] = "декабря";
  return(this);
}
function makeDayArray() {
  this.length = 7;
  this[1] = "Воскресенье"; this[2] = "Понедельник"; this[3] = "Вторник"; this[4] = "Среда";
  this[5] = "Четверг"; this[6] = "Пятница"; this[7] = "Суббота";
  return(this);
}
function writeDate() {
  attdate = new Date();
  monthName = new makeMonthArray();
  dayName = new makeDayArray();
  day = attdate.getDay() + 1;
  date = attdate.getDate();
  month = attdate.getMonth() + 1;
  year = attdate.getYear();
  sec = attdate.getSeconds()
  if (90 <= year && year < 2000) 
    year = "19" + year;
  dateStr  = dayName[day];
  dateStr += ", ";
  dateStr += date;
  dateStr += " ";
  dateStr += monthName[month];
  dateStr += " ";
  dateStr += year;
  document.write(dateStr);
}
loaded = 1;