over_header = new Array();
over_menu = new Array();

for(i=1;i>=3;i++)
{
  over_header[i] = 0;
  over_menu[i] = 0;
}

function Turn(id, mode)
{
  if(mode)
    eval("setTimeout(\"On(" + id + ");\",200)");
  else
    eval("setTimeout(\"Off(" + id + ");\",200)");
}

function On(id)
{
  eval("document.getElementById('smenu" + id + "')").style.visibility =
  "visible";
  eval("document.getElementById('smenu" + id + "')").style.display =
  "block";
}

function Off(id)
{
  if(!over_menu[id] && !over_header[id])
    {
    eval("document.getElementById('smenu" + id + "')").style.visibility =
    "hidden";
	eval("document.getElementById('smenu" + id + "')").style.display =
	  "none";
    }
}

var path = '';
var file = ''+document.location
var ind_prod = file.indexOf("/products/");
var ind_proj = file.indexOf("/projects/");
var ind_news = file.indexOf("/news/");
if (ind_prod != -1 || ind_proj != -1 || ind_news != -1) {
	path = '../../';
	if (ind_prod != -1) {
		var ind = ind_prod + 10; //индекс подпапки
		ind = file.indexOf("/", ind)+1; //индекс следующей подпапки
		if (file.indexOf("/", ind) != -1) path = '../../../';
	}
	if (ind_proj != -1) {
		var ind = ind_proj + 10; //индекс подпапки
		ind = file.indexOf("/", ind)+1; //индекс следующей подпапки
		if (file.indexOf("/", ind) != -1) path = '../../../';
	}
	if (ind_news != -1) {
		var ind = ind_news + 6; //индекс подпапки
		ind = file.indexOf("/", ind)+1; //индекс следующей подпапки
		if (file.indexOf("/", ind) != -1) path = '../../../';
	}
}
document.writeln('<table width="100%" style="border-collapse:collapse">');
document.writeln('<tr align="center">');
document.writeln('<td width="20%">');
document.writeln('<div id="smenu1" class="smenu" onmouseover="over_menu[1]=1;" onMouseOut="Turn(1,0); over_menu[1]=0;" align="left">');
document.writeln('<a href="'+path+'about.htm">О компании</a><br />');
document.writeln('<a href="'+path+'partners.htm">Партнеры</a><br />');
document.writeln('<a href="'+path+'licence.htm">Сертификаты</a><br />');
document.writeln('<a href="'+path+'contacts.htm">Контакты</a><br />');
document.writeln('</div>');
document.writeln('<a class="menu" href="'+path+'about.htm" onMouseOut="Turn(1,0); over_header[1]=0;" onmouseover="Turn(1,1); over_header[1]=1;">О компании</a>');
document.writeln('</td>');
document.writeln('<td width="20%">');
document.writeln('<div id="smenu2" class="smenu" style="width:150" onmouseover="over_menu[2]=1;" onMouseOut="Turn(2,0); over_menu[2]=0;" align="left">');
document.writeln('<a href="'+path+'news.htm">Новости</a><br />');
document.writeln('<a href="'+path+'events.htm">Выставки и семинары</a><br />');
document.writeln('</div>');
document.writeln('<a class="menu" href="'+path+'news.htm" onMouseOut="Turn(2,0); over_header[2]=0;" onmouseover="Turn(2,1); over_header[2]=1;">Новости</a>');
document.writeln('</td>');
document.writeln('<td width="20%">');
document.writeln('<div id="smenu3" class="smenu" style="width:200" onmouseover="over_menu[3]=1;" onMouseOut="Turn(3,0); over_menu[3]=0;" align="left">');
document.writeln('<a href="'+path+'products.htm">Продукция</a><br />');
document.writeln('<a href="'+path+'product_brands.htm">Указатель по производителям</a><br />');
document.writeln('<a href="'+path+'product_types.htm">Указатель по группам продукции</a><br />');
document.writeln('<a href="'+path+'projects.htm">Проекты</a><br />');
document.writeln('</div>');
document.writeln('<a class="menu" href="'+path+'products.htm" onMouseOut="Turn(3,0); over_header[3]=0;" onmouseover="Turn(3,1); over_header[3]=1;">Продукция</a>');
document.writeln('</td>');
document.writeln('<td width="20%">');
document.writeln('<a class="menu" href="'+path+'contacts.htm">Контакты</a>');
document.writeln('</td>');
document.writeln('<td width="20%"></td>');
document.writeln('</tr>');
document.writeln('</table>');
