
// то что будет открываться без кукисов
// - 1 - новости сервера (всегда показывать)
// - 2 - опрос
// - 3 - потоки
// то что всегда показывается без кукисов
//var cv_cnst = "99";//,1,2,3";
//var cv = "99";//,1,2,3";

// блок функций для меню с "постеменным проявлением"
function high(which2)
{
  theobject=which2
  highlighting=setInterval("highlightit(theobject)",30)
}
function low(which2)
{
  theobject=which2
  clearInterval(highlighting)
  document.images[which2].filters.alpha.opacity=60
}
function highlightit(cur2)
{
  if (document.images[cur2].filters.alpha.opacity<100)
    document.images[cur2].filters.alpha.opacity+=5
     else if (window.highlighting)
   clearInterval(highlighting)
}
//-------

// функции для работы с кукисами
function GetCookie (name)
{
    var arg  = name + "=";
    var alen = arg.length;
    var clen = document.cookie.length;
    var i    = 0;

    while (i < clen)
    {
        var j = i + alen;
        if (document.cookie.substring(i, j) == arg)
          return getCookieVal (j);
        i = document.cookie.indexOf(" ", i) + 1;
        if (i == 0) break;
    }
    return '';
}

function getCookieVal( offset )
{
    var endstr = document.cookie.indexOf (";", offset);
    if (endstr == -1)
        endstr = document.cookie.length;
    return unescape(document.cookie.substring(offset, endstr));
}
//-----

// показать спрятать необходимый пункт и запись в кукисы изменений
function showmenu(id_tab,id)
{
        cv="";
        var tbl = document.all(id_tab);
        if (tbl!=null)
{
        if(tbl.style.display!="none")
        {
                cv = "1";
                tbl.style.display = "none";
        }
        else
        {
                tbl.style.display = "block";
        }
}
        document.cookie = id+"="+cv+"; expires=Thu, 31 Dec "+(cv!=""?"2030":"1980")+" 23:59:59 GMT; path=/;";
}


function question_block(vop)
{
 if (confirm(vop))
 {
  document.post_1.submit();
 }
}

function question(vop,lock)
{
 if (confirm(vop))
 {
 self.location=lock
 }
}


function ou(d)
{
d.style.backgroundColor='#FFFFFF';
}

function ov(d)
{
d.style.backgroundColor='#D3E1FE';
d.style.cursor= 'hand';
}

function cl(d)
{
d.children.tags('a')[0].click();
}


function ou_a(d)
{
//d.style.backgroundColor='#88B3E2';
d.style.backgroundColor='';
}

function ov_a(d)
{
d.style.backgroundColor='#88B3E2';//#E6F2FF';
d.style.cursor= 'hand';
}

function cl_a(d)
{
d.children.tags('a')[0].click();
}




function ReDir(url)
{
 if ((url!='')&(url!=' '))
 {
  self.location=url
 }
}

function ShowError(s)
{
 msg = "____________________________________________________\n\n";
 msg += "Форма неправильно заполнена.\n";
 msg += "Пожалуйста, откорректируйте форму и отошлите её снова.\n";
 msg += "____________________________________________________\n";

 alert(msg + s + "\n\n");
}

// генерация url
function GenLink(url,frm,txt,insfrm)
{
 // проверим чтобы ссылка не была пустой
 if (url.value=="")
  {
   window.alert("Не заполнено поле с сылкой");
   url.focus();
   return;
  };
 // проверим чтобы текст ссылки не был пустым
 if (txt.value=="")
  {
   window.alert("Не заполнено поле с текстом ссылки");
   txt.focus();
   return;
  };
 s="<a href=\""+url.value+"\"";
 if (frm.value!=="")
 {
  s=s+" target=\""+frm.value+"\""
 };
 s=s+">"+txt.value+"</a>";
 insfrm.value=s;
 insfrm.select();
 insfrm.focus();
// window.alert(s);
};

function Open(U,N,F) {
        window.open(U,N,F);
}

// проверка формы-баннера для подачи заявки на рассылку
function ChkFormBanner()
{
// массив сообщений
ar = new Array("\nИмя \t- Не введено ваше имя",
"\nE-mail \t- Не указан e-mail адрес",
"\nГород \t- Не указан город");

        // имя
        if (document.post_banner.fio.value==""){
           ShowError(ar[0]);
           document.post_banner.fio.focus();
             return false;
        }
        // e-mail
        if (document.post_banner.email.value==""){
           ShowError(ar[1]);
           document.post_banner.email.focus();
             return false;
        }
        // город
        if (document.post_banner.city.value==""){
           ShowError(ar[2]);
           document.post_banner.city.focus();
             return false;
        }
  return (true);
}

// проверка формы-доступа пользователя к своему месту
function ChkFormIntr()
{
// массив сообщений
ar = new Array("\nНомер \t- Не указан номер",
"\nЛогин \t- Не указан логин на доступ",
"\nПароль \t- Не указан пароль на доступ");

        // номер
        if (document.post_intr.number.value==""){
           ShowError(ar[0]);
           document.post_intr.number.focus();
             return false;
        }
        // login
        if (document.post_intr.login.value==""){
           ShowError(ar[1]);
           document.post_intr.login.focus();
             return false;
        }
        // password
        if (document.post_intr.password.value==""){
           ShowError(ar[2]);
           document.post_intr.password.focus();
             return false;
        }
  return (true);
}

function ShowErrorKaz(s)
{
 msg = "____________________________________________________\n\n";
 msg += "Форма дұрыс толтырылмаған..\n";
 msg += "Өтініш, форманы дұрыстаңыз және кейін қайта жіберіңіз.\n";
 msg += "____________________________________________________\n";

 alert(msg + s + "\n\n");
}

function ShowErrorEng(s)
{
 msg = "____________________________________________________\n\n";
 msg += "The form is incorrectly filled.\n";
 msg += "Please, modify the form and send her(it) again.\n";
 msg += "____________________________________________________\n";

 alert(msg + s + "\n\n");
}



<!--
function ShowHide(id_layer, shact)
{
 if (id_layer != '')
 {
  var itm = null;
  var img = null;

  //alert(opened_id);

  if (document.getElementById) { itm = document.getElementById(id_layer); }
  else if (document.all) { itm = document.all[id_layer]; }
  else if (document.layers) { itm = document.layers[id_layer]; }

  if (document.getElementById) { img = document.getElementById('img_' + id_layer); }
  else if (document.all) { img = document.all['img_' + id_layer]; }
  else if (document.layers) { img = document.layers['img_' + id_layer]; }

  if (!itm || !img) { /* do nothing */ }
  else if (itm.style)
  {
   if (itm.style.display == "none" && shact == "show") {
     itm.style.display = "";
         img.src = "./nav/zero.gif";
         }
   else if(shact == "hide") {
     itm.style.display = "none";
         img.src = "./nav/zero.gif";
         }
  }
  else { itm.visibility = "show"; }
 }
}

function HideMenu(id_layer)
{
 if (id_layer != '')
 {
  var itm = null;
  if (document.getElementById) { itm = document.getElementById(id_layer); }
  else if (document.all) { itm = document.all[id_layer]; }
  else if (document.layers) { itm = document.layers[id_layer]; }

  if (!itm) { /* do nothing */ }
  else if (itm.style)
  {
   if (itm.style.display = "") { itm.style.display = "none"; }
   else { itm.style.display = ""; }
  }
  else { itm.visibility = "show"; }
 }
}
//-->

