<!--
fShow1 = 10; fHide1 = 10;
mShow = 10;  mHide = 10;
//tShow = 400; tHide = 1500;
tShow = 100; tHide = 500;

fs = '-';    fh = '-';      fi = '-';
ms = '-';    mh = '-';      mi = '-';
ts = '-';    th = '-';      ti = '-';
ftms = null; ftmh = null;
ttms = null; ttmh = null;
mtms = null; mtmh = null;

function getarr(name, n0, ln)
{
  tq = name;
  aq=new Array();  
  if (n0==1) {aq[0]= tq; mq = 1}  else mq = 0;
  while(tq.length > ln)
  { tq = tq.substr(0,tq.length-2);
    aq[mq]= tq;
    mq += 1;
  }
  return aq;
}


function fshow(element, name, mlr)
{
  var s = { x: 0, y: 0 };
  while (element.offsetParent) 
  { s.x += element.offsetLeft;
    s.y += element.offsetTop;
    element = element.offsetParent;
  }
  psl = s.x; psl += 30;  pst = s.y;   if (mlr==0) pst += 15; else pst += 30;

  fs = name;  fh = fi;

  if (fh!='-' && fh!=fs)
  { clearTimeout(ftmh);
    ftmh = setTimeout("if(fs != fh){document.all(fh).style.display = 'none'}", fShow1)
  }
  ftms = setTimeout("if(fs != '-'){fi = fs; document.all(fs).style.display = ''; document.all(fs).style.top = pst; document.all(fs).style.left = psl}", fShow1);
}


function fhide(name)
{
  fs = '-';   fh = name;
  clearTimeout(ftms);
  clearTimeout(ftmh);
  ftmh = setTimeout("if(fs != fh){document.all(fh).style.display = 'none'}; if(fh!=fi && fi!='-'){document.all(fi).style.display = 'none'}", fHide1)
}

// общее меню сайта


function mshow(element, name)
{
  var s = { x: 0, y: 0 };
  while (element.offsetParent) 
  { s.x += element.offsetLeft;
    s.y += element.offsetTop;
    element = element.offsetParent;
  }

  msl = 10 + s.x; 
  mst = mtop + s.y;

  clearTimeout(ttmh);
  ttmh = setTimeout("if(ti != '-'){document.all(ti).style.display = 'none'}", mShow);

  ms = name;  mh = mi;
  if (mh!='-' && mh!=ms)
  { clearTimeout(mtmh);
    mtmh = setTimeout("if(ms != mh){document.all(mh).style.display = 'none'}", mShow)
  }
  mtms = setTimeout("if(ms != '-'){mi = ms; document.all(ms).style.display = ''; document.all(ms).style.top = mst; document.all(ms).style.left = msl;}", mShow);
}

function mhide(name)
{
  ms = '-';   mh = name;
  clearTimeout(mtms);
  clearTimeout(mtmh);
  mtmh = setTimeout("if(ms != mh && mi.length <= mh.length){document.all(mh).style.display = 'none'}; if(mh!=mi && mi!='-'){document.all(mi).style.display = 'none';}", mHide)
}

// товарное меню 

function tshow(name, ftpos)
{
  clearTimeout(mtmh);
  mtmh = setTimeout("if(mi != '-'){document.all(mi).style.display = 'none'}", tShow)

  fp = ftpos;
  ts = name;  th = ti;  tq = ti;

  if (th!='-' && th!=ts && th.length >= ts.length)
  { 
    aq = getarr(ti,1,3);
    for (i = 0; i < aq.length; i++) {chStyleOff(aq[i]);}
    clearTimeout(ttmh); 
    ttmh = setTimeout("for (i = 0; i < aq.length; i++){document.all(aq[i]).style.display = 'none'}", tShow)
    
  }
  clearTimeout(ttms);
  ttms = setTimeout("if(ts != '-'){ti = ts; document.all(ts).style.display = ''; document.all(ts).style.top = fp; chStyleOn(ts)}", tShow);
}

function thide(name)
{
  ts = '-';  th = name;

  clearTimeout(ttms);
  clearTimeout(ttmh);
  ttmh = setTimeout("if(ts != th && ti.length <= th.length){document.all(th).style.display = 'none'; chStyleOff(th);}; if(th!=ti && ti!='-' && ti.length <= th.length){document.all(ti).style.display = 'none'; chStyleOff(ti);}", tHide)
}

function hdTBL(name)
{
  ts = '-';   th = name;  
  aq = getarr(name,1,3);
  clearTimeout(ttms);
  clearTimeout(ttmh);
  ttmh = setTimeout("if(ts != th){ for (i = 0; i < aq.length; i++){document.all(aq[i]).style.display = 'none'; chStyleOff(aq[i]);}; if(th!=ti && ti!='-' && ti.length <= th.length){document.all(ti).style.display = 'none'; chStyleOff(ti);} };", tHide)
}



//-->

