  var s = {};
  var menuNav = false;
  var menuTimeout = null;
  var menuTime = 200;
  var main_menuItemCount = 5;  //主菜单(id="sub...")数目，必须与实际个数相等
  var sub_menuItemCount = 13;  //子菜单(id="u...")总数目(不包括分隔线)，必须与实际个数相等

  function doonload() {
    for (var q=1; q<=sub_menuItemCount; q++) {
      s["u"+q] = document.getElementById("u"+q);
      s["u"+q].onmouseover = function() { menuNav = true; window.clearTimeout(menuTimeout); this.style.backgroundColor = "#ededed"; }
      s["u"+q].onmouseout = function() { this.style.backgroundColor = "#FFFFFF"; menuNav = false; window.clearTimeout(menuTimeout); menuTimeout = window.setTimeout("hidemenu()", menuTime, "JavaScript"); }
    }
    if (_isIE)
      { var overPrefix = "_over_ie"; }
    else
      { var overPrefix = "_over"; }
    for (var q=1; q<=main_menuItemCount; q++) {
      s["m"+q] = document.getElementById("m"+q);
      s["cm"+q] = document.getElementById("cm"+q);
      s["um"+q] = document.getElementById("um"+q);
      s["am"+q] = document.getElementById("am"+q);
      s["cm"+q].className = "m"+q+overPrefix;
      s["cm"+q].style.display = "none";
      s["um"+q].style.display = "none";
      s["m"+q].q = q;
      s["m"+q].onmouseover = function() {
        menuNav = true; window.clearTimeout(menuTimeout);
        for (var w=1; w<=main_menuItemCount; w++) {
          if (w != this.q) {
            s["cm"+w].style.display = "none";
            s["um"+w].style.display = "none";
            s["m"+w].style.color = "#FFFFFF";
            s["am"+w].style.color = "#89827c";
          }
        }
        this.style.color = "#0984B0";
        s["cm"+this.q].style.display = "";
        s["um"+this.q].style.display = "";
        s["am"+this.q].style.color = "#5c5a5a";
      }
      s["m"+q].onmouseout = function()
        { menuNav = false;
          window.clearTimeout(menuTimeout);
          menuTimeout = window.setTimeout("hidemenu()", menuTime, "JavaScript");
        }
    }

    if (!_isIE) {
      function change_sub(node) {
        for (var q=0; q<node.childNodes.length; q++) {
          if (node.childNodes[q].className != null) { node.childNodes[q].className = node.childNodes[q].className.replace("_ie", ""); }
          change_sub(node.childNodes[q]);
        }
      }
      for (var q=1; q<=5; q++) { change_sub(document.getElementById("um"+q)); }
    }

  }

  function hidemenu()
  {
    window.clearTimeout(menuTimeout);
    if (menuNav == true) { return;}
    menuNav = false;
    for (var w=1; w<=main_menuItemCount; w++)
    {
      s["cm"+w].style.display = "none";
      s["um"+w].style.display = "none";
      s["m"+w].style.color = "#FFFFFF";
      s["am"+w].style.color = "#89827c";
    }
  }

  //set next block of list items visible, where patern is block id commom part (like "area_1" and "area_2" = patern is "area")
  function moreListItems(patern){
    for(var i=1;i<100;i++){
      var curListBlock = document.getElementById(patern+"_"+i);
      if(curListBlock.style.display==''){
        curListBlock.style.display = "none";
        var nextListBlock = document.getElementById(patern+"_"+(i+1))
        if(nextListBlock==null){
          document.getElementById(patern+"_1").style.display = "";
        }else{
          nextListBlock.style.display = "";
        }
        break;
      }
    }
  }

  //opens tab on the page and navigate to anchor, where tabId - id of tab in tabbar, ancName - anchor name, url - page url (can be skiped for current page)
  function openTabAt(tabId,ancName,url){
    if(url){
      if(url.indexOf("http://")==-1)
        url = document.location.href.replace(/(.+\/)[^\/]+/g,"$1")+url;
      var cUrl = document.location.href.replace(/([^#]+)#.*/g,"$1");
      if(url!=cUrl){
        document.location.href = url+"#"+tabId+"@"+ancName
        return;
      }
    }
    a_tabbar.setTabActive(tabId);
    document.location = document.location.href.replace(/#.*/g,"")+"#"+ancName
  }