<!--

//define array of main menu cell ids
var tcell_ids = new Array("about_us_cell", "city_adv_cell", "contacts_cell", "counteragents_cell");

//define array of bottom menu cell ids
var bcell_ids = new Array("about_us_bcell", "contacts_bcell", "counteragents_bcell");

//define array of main menu drop-down block ids
var dd_ids = new Array("about_us_dd", "city_adv_dd", "contacts_dd", "counteragents_dd");

//hides the content of all of main menu drop-down blocks
function hideAllDDContent()
{
  for(var i = 0; i < dd_ids.length; i++)
    document.getElementById(dd_ids[i]).className = "dd_h";
}

//shows an appropriate content of drop-down top-menu block
function showDDContent(layer_id)
{
  hideAllDDContent();
  document.getElementById(layer_id).className = "dd_v";
}

//changes backgrounds of all menu's cells to white (web-page's background)
function unhighlightAllCells(menu_type)
{
  if(menu_type == 'top')
  {
    for(var i = 0; i < tcell_ids.length; i++)
      document.getElementById(tcell_ids[i]).style.background = "#FFF";
  }
  else if(menu_type == 'bottom')
  {
    for(var i = 0; i < bcell_ids.length; i++)
      document.getElementById(bcell_ids[i]).style.background = "#FFF";
  }
}

//changes backgrounds of all menu's cells to grey - highlighting the menu
function highlightCell(cell, menu_type)
{
  unhighlightAllCells(menu_type);
  cell.style.background = "#F0E7E7";
}

//toggles the state of all top-menu's cells to either the bottom border is present or is not
function toggleBBorders(cell_id)
{
  for(var i = 0; i < tcell_ids.length; i++)
    document.getElementById(tcell_ids[i]).className = (tcell_ids[i] == cell_id) ? "notunderlined" : "underlined";
}

function changeRowBg(row, color)
{
  row.style.background=color;
}

function changeImg(imgID, imgRef)
{
  document.getElementById(imgID).src = imgRef;
}

//-->
