  arr = new Array();
  arr[0]=arr[1]=arr[2]=arr[3]=false;

  function Browser() {
    var b=navigator.appName;
    if (b.indexOf('Netscape')!=-1) this.b="ns";
    else if ((b=="Opera") || (navigator.userAgent.indexOf("Opera")>0)) this.b = "opera";
    else if (b=="Microsoft Internet Explorer") this.b="ie";
    if (!b) {this.b="invalid"; this.invalid=true;}
    this.version=navigator.appVersion;
    this.v=parseInt(this.version);
    this.ns=(this.b=="ns" && this.v>=4);
    this.ns4=(this.b=="ns" && this.v==4);
      this.ns6=(this.b=="ns" && this.v==5);
    this.ie=(this.b=="ie" && this.v>=4);
    this.ie4=(this.version.indexOf('MSIE 4')>0);
    this.ie5=(this.version.indexOf('MSIE 5')>0);
    this.ie55=(this.version.indexOf('MSIE 5.5')>0);
    this.ie6=(this.version.indexOf('MSIE 6.0')>0);
    this.opera=(this.b=="opera");
    this.dom=(document.createElement && document.appendChild && document.getElementsByTagName)?true:false;
    this.def=(this.ie||this.dom); // most used browsers, for faster if loops
    var ua=navigator.userAgent.toLowerCase();
    if (ua.indexOf("win")>-1) this.platform="win32";
    else if (ua.indexOf("mac")>-1) this.platform="mac";
    else this.platform="other";
  }

  is=new Browser();
  
  function getImagePageLeft(img) {
    var x, obj;
    x = 0;
    obj = img;
    while (obj.offsetParent != null) {
      x += obj.offsetLeft;
      obj = obj.offsetParent;
    }
    x += obj.offsetLeft;
    return x;
  }
  
  function getImagePageTop(img) {
    var x, obj;
    x = 0;
   
    obj = img;
    while (obj.offsetParent != null) {
      x += obj.offsetTop;
      obj = obj.offsetParent;
    }
    // расстояние между подменю для експлорера
    x += obj.offsetTop+13;
    return x;
  }
  
  
  function obj_find(what, where)
  {
  var x,p;
  if(!where) where=document;
  if(!(x=where[what]) && where.all) x=where.all[what];
  if (!x) x = document.getElementById(what);
  for (i=0;!x&&i<where.forms.length;i++) x=where.forms[i][what];
  for(i=0;!x&&where.layers&&i<where.layers.length;i++) x=obj_find(what, where.layers[i].document);
  return x;
  }
  
  function sub_over(num)
  {
    var x,i,pos;
    
    for (i=0; i<61; i++) if (num != i) sub_out(i, 1);
    if ((x=obj_find('sub'+num)) != null)
    {
      v = 'show';
      if (x.style)
      {
        x = x.style;
        x.left = 0+'px';
        v = 'visible';
      }
      x.visibility=v;
      
      if (is.b == 'ie' || is.b == "opera") {
      	x.left = getImagePageLeft(document.getElementById('id'+num));
      	x.top = getImagePageTop(document.getElementById('id'+num));
      } else {
      	x.left = document.getElementById('id'+num).x-1+'px';
      	x.top = document.getElementById('id'+num).y+13+'px';	
      }
    }
    
  }
 
  
  function sub_out1(num, mode)
  {
    nnum = num;
    nmode = mode;
    if (mode == 1 || (mode == 0 && arr[num] == false))
    {
      if ((x=obj_find("sub"+num)) != null)
      {
        v = 'hide';
        if (x.style) {x = x.style; v='hidden';}
        x.visibility=v;
      }
    }
    else
    {
      setTimeout('sub_out1(nnum, nmode)', 1000);
    }
  }
  
  function sub_out(num, mode)
  {
    nnum = num;
    nmode = mode;
    if (mode == 0) setTimeout('sub_out1(nnum, nmode)', 1000);
    else if (mode == 1) sub_out1(nnum, nmode);
  }

function dosearch () {
  var forma=document.search;
    if(forma.string.value == "") {  
      return;
    } 
  document.search.submit(); 
  return true; 
} 


function do_send(lang){
 var forma=document.form_link;
 if(forma.email_send.value == "") {
   if (lang=='ru') {
     alert("Вы забыли ввести email получателя. Пожалуйста, повторите ввод.");
   }
   else {
     alert("You have overlooked to enter email the addressee. Repeat, please, the inquiry.");
   } 
   forma.email_send.focus();
   return;
 }
 if  (forma.email_send.value.match(re) == null)  {
   if (lang=='ru') {
     alert("Неправильно введен email получателя. Пожалуйста, повторите ввод.");
   }
   else {
     alert("Excuse. You have entered erroneous e-mail the addressee. Repeat, please, the inquiry.");
   }  
   forma.email_send.focus();
   return;
 }
if(forma.name.value == "") {
   if (lang=='ru') {
     alert("Вы забыли ввести имя. Пожалуйста, повторите ввод.");
   }
   else {
     alert("You have overlooked to enter a name. Repeat, please, the inquiry.");
   } 
   forma.name.focus();
   return;
 }
 if(forma.email.value == "") {
   if (lang=='ru') {
     alert("Вы забыли ввести ваш email. Пожалуйста, повторите ввод.");
   }
   else {
     alert("You have overlooked to enter yours email. Repeat, please, the inquiry.");
   }  
   forma.email.focus();
   return;
 }
 if  (forma.email.value.match(re) == null)  {
   if (lang=='ru') {
     alert("Неправильно введен ваш email. Пожалуйста, повторите ввод.");
   }
   else {
     alert("Excuse. You have entered erroneous yours e-mail. Repeat, please, the inquiry.");
   }  
   forma.email.focus();
   return;
 }
forma.submit();
return true;
}

var re = /^.+\@\[?(\w|[-.])+\.[a-zA-Z]{2,3}|[0-9]{1,3}\]?$/
function win_open(source_win,name_win,w,h,tool,menu,re,scr){
 ws=screen.availWidth;
 hs=screen.availHeight;
 l=(ws-w)/2;
 if (l<0){l=0;}
 t=(hs-h)/2;
 if (t<0){t=0;}
 param = "left="+l+",top="+t+",width="+w+",height="+h+",toolbar="+tool+",menubar="+menu+",resizable="+re+",scrollbars="+scr;
 var handle = window.open(source_win, name_win, param);
}
