function showHiddenact(){
 d = document.getElementById('hiddenact');
 if(d != null)
 d.style.visibility="visible";
}

function hideHiddenact(){
 d = document.getElementById('hiddenact');
 if(d != null)
 d.style.visibility="hidden";
}

var occupied_header = new Array();
var occupied_menu = new Array();
var hide_banner;

hide_banner = 0;

for(i=1;i<=20;i++) {
 occupied_header[i] = 0;
 occupied_menu[i] = 0;
}


function CreateLayer(text, id, t, l,m) {
 var str='';
 if(document.layers){
  if(m==1) str="<LAYER ID=menu" + id + " TOP=" + t + " LEFT=" + l + " onmouseover=\"occupied_menu[" + id + "]=1;\" onmouseout=\"Turn('" + id + "',0);occupied_menu[" + id + "]=0;\" VISIBILITY=hide Z-INDEX=2 bgcolor=\"#0066CC\">" + text + "</LAYER>";
  else if(m==2){
   id = id.substring(0,1);
   str="<LAYER ID=menu" + id + "a TOP=" + t + " LEFT=" + l + " onmouseover=\"occupied_menu[" + id + "]=1;occupied_header[" + id + "]=1;\" onmouseout=\"Turn('" + id + "',0);occupied_menu[" + id + "]=0;occupied_header[" + id + "]=0\" VISIBILITY=hide Z-INDEX=2 bgcolor=\"#EF1010\">" + text + "</LAYER>";
  }
 } //if layers
 else if(document.all || document.getElementById) str="<div id=menu" + id + " style=\"position:absolute;top:" + t + ";left:" + l + ";visibility:hidden;width:100%;z-index:100;\" onmouseover=\"occupied_menu[" + id + "]=1;\" onmouseout=\"Turn('" + id + "',0);occupied_menu[" + id + "]=0;\">" + text + "</div>";

 if(str!='') document.write(str);
} //function CreateLayer

function Turn(id, mode) {
 if(document.layers || document.all ||document.getElementById) {
  if(mode){eval("setTimeout(\"On(" + id + ");\",100)");}
  else    {eval("setTimeout(\"Off(" + id + ");\",100)");}
 }
}

 function On(id){
  if(occupied_header[id]) {
   if(document.all ||document.getElementById) hideHiddenact();
   name = 'i' + id;
   if(document.all ||document.getElementById){eval("menu" + id).style.visibility = 'visible';}
   else if(document.layers)                  {eval("document.layers['menu" + id + "']").visibility = "show";}
  }
 }

 function Off(id){
  if(!occupied_menu[id] && !occupied_header[id]) {
    if(document.all ||document.getElementById) showHiddenact();

   name = 'i' + id;
   if(document.all ||document.getElementById){eval("menu" + id).style.visibility = 'hidden';}
   else if(document.layers)                  {eval("document.layers['menu" + id + "']").visibility = "hide";}
  }
 }

txt = new Array();

txt[0] = "<table cellspacing=0 cellpadding=0 width=100% border=0>"+
          "<tr>"+
           "<td width=160px nowrap></td>"+
           "<td width=100% align=center>"+
         "<table cellspacing=0 cellpadding=2 align=center border=0>"+
          "<tr height=18>"+
           "<td width=212px nowrap rowspan=20></td>"+
           "<td width=110 nowrap bgcolor=#fff728><a class=tm href=/p14/index.html><span class=hov>Котлы</span></a></td>"+
           "<td width=304px nowrap rowspan=20></td>"+
          "</tr>"+
          "<tr height=18>"+
           "<td width=110 nowrap bgcolor=#fff728><a class=tm href=/p15/index.html><span class=hov>Теплообменники</span></a></td>"+
          "</tr>"+
          "<tr height=18>"+
           "<td width=110 nowrap bgcolor=#fff728><a class=tm href=/p16/index.html><span class=hov>Водоподготовка</span></a></td>"+
          "</tr>"+
          "<tr height=18>"+
           "<td width=110 nowrap bgcolor=#fff728><a class=tm href=/p17/index.html><span class=hov>Насосы</span></a></td>"+
          "</tr>"+
          "<tr height=18>"+
           "<td width=110 nowrap bgcolor=#fff728><a class=tm href=/p18/index.html><span class=hov>Арматура</span></a></td>"+
          "</tr>"+
          "<tr height=18>"+
           "<td width=110 nowrap bgcolor=#fff728><a class=tm href=/p19/index.html><span class=hov>Прайс-лист</span></a></td>"+
          "</tr>"+
         "</table>"+

           "</td>"+
           "<td width=154px nowrap></td>"+
          "</tr>"+
         "</table>";

txt[1] = "<table cellspacing=0 cellpadding=0 width=100% border=0>"+
          "<tr>"+
           "<td width=160px nowrap></td>"+
           "<td width=100% align=center>"+
         "<table cellspacing=0 cellpadding=2 width=607 align=center border=0>"+
          "<tr height=18>"+
           "<td width=307px nowrap rowspan=20></td>"+
           "<td width=200 nowrap bgcolor=#fff728><a class=tm href=/p10/index.html><span class=hov>Ремонт и реконструкция котельных</span></a></td>"+
           "<td width=100px nowrap rowspan=20></td>"+
          "</tr>"+
          "<tr height=18>"+
           "<td width=200 bgcolor=#fff728><a class=tm href=/p11/index.html><span class=hov>Проектирование</span></a></td>"+
          "</tr>"+
          "<tr height=18>"+
           "<td width=200 bgcolor=#fff728><a class=tm href=/p12/index.html><span class=hov>Строительно-монтажные работы</span></a></td>"+
          "</tr>"+
          "<tr height=18>"+
           "<td width=200 bgcolor=#fff728><a class=tm href=/p13/index.html><span class=hov>Экспертиза промышленной безопасности</span></a></td>"+
          "</tr>"+
         "</table>"+

           "</td>"+
           "<td width=154px nowrap></td>"+
          "</tr>"+
         "</table>";

txt[2] = "<table cellspacing=0 cellpadding=0 width=100% border=0>"+
          "<tr>"+
           "<td width=160px nowrap></td>"+
           "<td width=100% align=center>"+
         "<table cellspacing=0 cellpadding=2 width=607 align=center border=0>"+
          "<tr height=18>"+
           "<td width=110 nowrap bgcolor=#fff728><a class=tm href=/p1/index.html><span class=hov>О компании</span></a></td>"+
           "<td width=497px nowrap rowspan=20></td>"+
          "</tr>"+
          "<tr height=18>"+
           "<td width=110 nowrap bgcolor=#fff728><a class=tm href=/p39/index.html><span class=hov>Проекты</span></a></td>"+
          "</tr>"+
          "<tr height=18>"+
           "<td width=110 bgcolor=#fff728><a class=tm href=/p40/index.html><span class=hov>Вакансии</span></a></td>"+
          "</tr>"+
         "</table>"+

           "</td>"+
           "<td width=154px nowrap></td>"+
          "</tr>"+
         "</table>";

CreateLayer(txt[0], 1, 224, 0, 1);
CreateLayer(txt[1], 2, 224, 0, 1);
CreateLayer(txt[2], 3, 224, 0, 1);

function rollHandler() {
 //var srcElement = window.event.srcElement;
 //if(srcElement.className=='hov'){srcElement.style.backgroundColor =(srcElement.style.backgroundColor=='')?('red'):('');}
} //function rollHandler

document.onmouseover = rollHandler;
document.onmouseout = rollHandler;

