function  doMath() {
var one = eval(document.theForm.elements[0].value)
var two = eval(document.theForm.elements[1].value)  
var three = eval(document.theForm.elements[2].value)
var prod = Math.round(two  *  ( one - two ) * 0.02466 * three)/1000
alert(" Вес " + three + " м трубы " + one + "x" + two  +  " равен "  +  prod  +  " тонн ")
}
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;
