var UA = new Array ()
UA [0] = "любая обл."
UA [1] = "Винницкая обл."
UA [2] = "Волынская обл."
UA [3] = "Днепроп. обл."
UA [4] = "Донецкая обл."
UA [5] = "Житомир. обл."
UA [6] = "Закарп. обл."
UA [7] = "Запорож. обл."
UA [8] = "Ив.Франк. обл."
UA [9] = "Киевская обл."
UA [10] = "Кировогр. обл."
UA [11] = "Крым"
UA [12] = "Луганская обл."
UA [13] = "Львовская обл."
UA [14] = "Николаев. обл."
UA [15] = "Одесская обл."
UA [16] = "Полтавск. обл."
UA [17] = "Ровенская обл."
UA [18] = "Сумская обл."
UA [19] = "Терноп. обл."
UA [20] = "Харьков. обл."
UA [21] = "Херсон. обл."
UA [22] = "Хмельниц. обл."
UA [23] = "Черкас. обл."
UA [24] = "Чернигов. обл."
UA [25] = "Черновиц. обл."
var RU = new Array ()
RU [0] = "любая обл."
RU [1] = "Агинский Бурят. окр."
RU [2] = "Адыгея Р."
RU [3] = "Алтай Р."
RU [4] = "Алтайский край"
RU [5] = "Амурская обл."
RU [6] = "Архангельская обл."
RU [7] = "Астраханская обл."
RU [8] = "Башкортостан Р."
RU [9] = "Белгородская обл."
RU [10] = "Брянская обл."
RU [11] = "Бурятия Р."
RU [12] = "Владимирская обл."
RU [13] = "Волгоградская обл."
RU [14] = "Вологодская обл."
RU [15] = "Воронежская обл."
RU [16] = "Дагестан Р."
RU [17] = "Еврейская авт. обл."
RU [18] = "Ивановская обл."
RU [19] = "Ингушская Р."
RU [20] = "Иркутская обл."
RU [21] = "Кабардино-Балкар. Р."
RU [22] = "Калининградская обл."
RU [23] = "Калмыкия Р."
RU [24] = "Калужская обл."
RU [25] = "Камчатская обл."
RU [26] = "Карачаево-Черкес. Р."
RU [27] = "Карелия Р."
RU [28] = "Кемеровская обл."
RU [29] = "Кировская обл."
RU [30] = "Коми Р."
RU [31] = "Коми-Пермяцкий окр."
RU [32] = "Корякский окр."
RU [33] = "Костромская обл."
RU [34] = "Краснодарский край"
RU [35] = "Красноярский край"
RU [36] = "Курганская обл."
RU [37] = "Курская обл."
RU [38] = "Ленинградская обл."
RU [39] = "Липецкая обл."
RU [40] = "Магаданская обл."
RU [41] = "Марий Эл Р."
RU [42] = "Мордовия Р."
RU [43] = "Московская обл."
RU [44] = "Мурманская обл."
RU [45] = "Ненецкий окр."
RU [46] = "Нижегородская обл."
RU [47] = "Новгородская обл."
RU [48] = "Новосибирская обл."
RU [49] = "Омская обл."
RU [50] = "Оренбургская обл."
RU [51] = "Орловская обл."
RU [52] = "Пензенская обл."
RU [53] = "Пермская обл."
RU [54] = "Приморский край"
RU [55] = "Псковская обл."
RU [56] = "Ростовская обл."
RU [57] = "Рязанская обл."
RU [58] = "Самарская обл."
RU [59] = "Саратовская обл."
RU [60] = "Саха (Якутия) Р."
RU [61] = "Сахалинская обл."
RU [62] = "Свердловская обл."
RU [63] = "Северная Осетия, Р."
RU [64] = "Смоленская обл."
RU [65] = "Ставропольский край"
RU [66] = "Таймырский окр."
RU [67] = "Тамбовская обл."
RU [68] = "Татарстан, Р."
RU [69] = "Тверская обл."
RU [70] = "Томская обл."
RU [71] = "Тува, Р."
RU [72] = "Тульская обл."
RU [73] = "Тюменская обл."
RU [74] = "Удмуртская, Р."
RU [75] = "Ульяновская обл."
RU [76] = "Усть-Ордын. Бурят. окр"
RU [77] = "Хабаровский край"
RU [78] = "Хакасия, Р."
RU [79] = "Ханты-Мансийский окр."
RU [80] = "Челябинская обл."
RU [81] = "Чеченская, Р."
RU [82] = "Читинская обл."
RU [83] = "Чувашская, Р."
RU [84] = "Чукотский окр."
RU [85] = "Эвенкийский окр."
RU [86] = "Ямало-Ненецкий окр."
RU [87] = "Ярославская обл."
var BY = new Array ()
BY [0] = "любая обл."
BY [1] = "Брестская обл."
BY [2] = "Витебская обл."
BY [3] = "Гомельская обл."
BY [4] = "Гродненская обл."
BY [5] = "Минская обл."
BY [6] = "Могилевская обл."
var KZ = new Array ()
KZ [0] = "любая обл."
KZ [1] = "Акмолинская обл."
KZ [2] = "Актюбинская обл."
KZ [3] = "Алматинская обл."
KZ [4] = "Атырауская обл."
KZ [5] = "Восточно-Казахстан. обл."
KZ [6] = "Джамбульская обл."
KZ [7] = "Западно-Казахстан. обл."
KZ [8] = "Карагандинская обл."
KZ [9] = "Кустанайская обл."
KZ [10] = "Кызыл-Ординская обл."
KZ [11] = "Мангистауская обл."
KZ [12] = "Павлодарская обл."
KZ [13] = "Северо-Казахстан. обл."
KZ [14] = "Южно-Казахстан. обл."


function Change_area_select(country, area, current_area)  {
 
var barea = document.getElementById (area);
var bcountry = document.getElementById (country);
 
for (var c = 0; c < barea.options.length; c++) {
barea.options[c] = null;
c--; }
 
barea.options[0] = new Option ('');;
 
if ((bcountry.value == 'UA') || (bcountry.value == 'RU') || (bcountry.value == 'BY') || (bcountry.value == 'KZ')) {
 
barea.disabled=false;
if (bcountry.value == 'UA') {
var sel_array2 = eval ('UA')
}
if (bcountry.value == 'RU') {
var sel_array2 = eval ('RU')
}
if (bcountry.value == 'BY') {
var sel_array2 = eval ('BY')
}
if (bcountry.value == 'KZ') {
var sel_array2 = eval ('KZ')
}
         for (var c = 0; c < sel_array2.length; c++) {
                 barea.options[c] = new Option (sel_array2 [c]);
                 if (sel_array2 [c] == current_area) { barea.options[c].selected=true; }
        }
} else {
barea.disabled=true;
}
 
}


function checkgruz_userbox()  {
  if (document.Form_name.dfrom.value=='')
  {
    alert('Введите дату загрузки');
    return
  }

  if (document.Form_name.country_from.value=='')
  {
    alert('Укажите страну загрузки');
    return
  }

/*
if ((document.Form_name.country_from.value=='UA')||
      (document.Form_name.country_from.value=='RU')||
      (document.Form_name.country_from.value=='KZ')||
      (document.Form_name.country_from.value=='BY'))
  {
   if (document.Form_name.area_from.value=='')
   {
    alert('Укажите область загрузки');
    return
   }
  }
*/

 if (document.Form_name.country_to.value=='')
  {
    alert('Укажите страну разгрузки');
    return
  }

/*
  if ((document.Form_name.country_to.value=='UA')||
      (document.Form_name.country_to.value=='RU')||
      (document.Form_name.country_to.value=='KZ')||
      (document.Form_name.country_to.value=='BY'))
  {
   if (document.Form_name.area_to.value=='')
   {
    alert('Укажите область разгрузки');
    return
   }
  }
*/

if (document.Form_name.city_from.value=='')
  {
    alert('Укажите город загрузки');
    return
  }

  if (document.Form_name.city_to.value=='')
  {
    alert('Укажите город разгрузки');
    return
  }

  if (document.Form_name.gruz.value=='')
  {
    alert('Укажите название груза');
    return
  }

  if (document.Form_name.truck.value=='')
  {        
    alert('Укажите тип машины');
    return
  }

  if (document.Form_name.weight.value=='')
  {        
    alert('Укажите вес');
    return
  }
 document.Form_name.submit();
}


function checkcar_userbox()  {
  if (document.Form_name.dfrom.value=='')
  {
    alert('Введите дату загрузки');
    return
  }

  if (document.Form_name.country_from.value=='')
  {
    alert('Укажите страну загрузки');
    return
  }

 if (document.Form_name.country_to.value=='')
  {
    alert('Укажите страну разгрузки');
    return
  }

if (document.Form_name.city_from.value=='')
  {
    alert('Укажите город загрузки');
    return
  }

  if (document.Form_name.truck.value=='')
  {        
    alert('Укажите тип машины');
    return
  }

 document.Form_name.submit();
}


function checkcar_www()  {
  if (document.Form_name.dfrom.value=='')
  {
    alert('Введите дату загрузки');
    return
  }

  if (document.Form_name.country_from.value=='')
  {
    alert('Укажите страну загрузки');
    return
  }

 if (document.Form_name.country_to.value=='')
  {
    alert('Укажите страну разгрузки');
    return
  }

if (document.Form_name.city_from.value=='')
  {
    alert('Укажите город загрузки');
    return
  }

  if (document.Form_name.truck.value=='')
  {        
    alert('Укажите тип машины');
    return
  }

  if (document.Form_name.www_tel.value=='')
  {        
    alert('Укажите телефоны/факсы');
    return
  }

  if (document.Form_name.kod.value!='63749')
  {        
    alert('Не верный проверочный код.');
    return
  }

 document.Form_name.submit();
}


function checkgruz_www()  {
  if (document.Form_name.dfrom.value=='')
  {
    alert('Введите дату загрузки');
    return
  }

  if (document.Form_name.country_from.value=='')
  {
    alert('Укажите страну загрузки');
    return
  }

/*
if ((document.Form_name.country_from.value=='UA')||
      (document.Form_name.country_from.value=='RU')||
      (document.Form_name.country_from.value=='KZ')||
      (document.Form_name.country_from.value=='BY'))
  {
   if (document.Form_name.area_from.value=='')
   {
    alert('Укажите область загрузки');
    return
   }
  }
*/

 if (document.Form_name.country_to.value=='')
  {
    alert('Укажите страну разгрузки');
    return
  }

/*
  if ((document.Form_name.country_to.value=='UA')||
      (document.Form_name.country_to.value=='RU')||
      (document.Form_name.country_to.value=='KZ')||
      (document.Form_name.country_to.value=='BY'))
  {
   if (document.Form_name.area_to.value=='')
   {
    alert('Укажите область разгрузки');
    return
   }
  }
*/

if (document.Form_name.city_from.value=='')
  {
    alert('Укажите город загрузки');
    return
  }

  if (document.Form_name.city_to.value=='')
  {
    alert('Укажите город разгрузки');
    return
  }

  if (document.Form_name.gruz.value=='')
  {
    alert('Укажите название груза');
    return
  }

  if (document.Form_name.truck.value=='')
  {        
    alert('Укажите тип машины');
    return
  }

  if (document.Form_name.weight.value=='')
  {        
    alert('Укажите вес');
    return
  }

  if (document.Form_name.www_tel.value=='')
  {        
    alert('Укажите телефон/факс');
    return
  }

  if (document.Form_name.kod.value!='63749')
  {        
    alert('Не верный проверочный код.');
    return
  }

 document.Form_name.submit();
}
