 var hBar = new ItemStyle(45, 8, '', 1, 3, '15#EDF2FF', '10#9BB0EE', 'highText', 'highText', 'itemBorder', 
 'itemBorder', null, null, 'hand', 'default');
var subM = new ItemStyle(22, 4, '&gt;', -15, 3, '15#EDF2FF', '10#9BB0EE', 'lowText', 'highText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');
var subBlank = new ItemStyle(22, 1, '&gt;', -15, 3, '#CCCCDD', '#6699CC', 'lowText', 'highText',
 'itemBorderBlank', 'itemBorder', null, null, 'hand', 'default');
var button = new ItemStyle(22, 1, '&gt;', -15, 2, '#006633', '#CC6600', 'buttonText', 'buttonHover',
 'buttonBorder', 'buttonBorderOver', 80, 95, 'crosshair', 'default');
var pMenu = new PopupMenu('pMenu');
with (pMenu)
{

startMenu('root', true, 'window.page.elmPos("home").x + 12', 'window.page.elmPos("home").y + 15', 162, hBar, '', false);
addItem('<img alt="" src="grafika/menu_stemcell.gif" />&nbsp; &nbsp; &nbsp; StemCell<br /> &nbsp; Technologies', 'ST', 'sm:', hBar, 105);
addItem('<img alt="" src="grafika/menu_sarstedt.gif" />&nbsp; Sarstedt', 'SA', 'sm:', hBar, 80);
addItem('<img alt="" src="grafika/MercatorMedical_145.gif" />&nbsp; Mercator Medical', 'MM', 'sm:', hBar, 90);
//addItem('<img alt="" src="grafika/menu_thermo.gif" />&nbsp; Thermo Scientific', 'TH', 'sm:', hBar, 90);
//addItem('<img alt="" src="grafika/menu_stratagene.gif" />&nbsp; Stratagene', 'SG', 'sm:', hBar, 80);
// addItem('&nbsp; <img alt="stat4u" src="http://adstat.4u.pl/s4u.gif" /> Stratagene', 'SG', 'sm:', hBar, 25);


//StemCell
startMenu('ST', true, 155, 7, 110, subM);
addItem('PRODUKTY', 'STPr', 'sm:');
addItem('PRODUKTY cd. ', 'STPr2', 'sm:');
addItem('INFORMACJA TECHNICZNA / LITERATURA', 'STIn', 'sm:', subM, 50);
addItem('CENNIK', 'Login/logujst.php', '', hBar, 20);
addItem('ZAMÓWIENIA', 'order/Stem.php', '', hBar, 20);

//StemCell > Produkty
startMenu('STPr', true, 113, 7, 159, subM);
addItem('Produkty do separacji komórek', 'STPrPs', 'sm:', subM, 35);
addItem('Media do hodowli <br />komórek hematopoetycznych', 'STPrHp', 'sm:', subM, 50);
addItem('Media do hodowli mysich komórek embrionalnych ES-Cult', 'STPrEm', 'sm:', subM, 50);
addItem('Produkty  do hodowli komórek mezenchymalnych  MesenCult', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=284', '', hBar, 65);
addItem('Produkty do hodowli macierzystych komórek nerwowych NeuroCult', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=285', '', hBar, 50);
addItem('Produkty do bada&#324; macierzystych komórek endotelialnych EndoCult', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=product&id=500', '', hBar, 50);


//StemCell > Produkty cd.
startMenu('STPr2', true, 113, 7, 159, subM);
addItem('Komórki', 'https://www.stemcell.com/product_catalog/primhucells.asp', '', hBar, 20);
addItem('Surowice & Media bezsurowicze', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=product&id=287', '', hBar, 35);
addItem('Media do hodowli hybryd / Selekcji transfekowanych komórek Clonacell-HY', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=288', '', hBar, 50);
addItem('Cytokiny', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=289', '', hBar, 20);
addItem('Przeciwcia&#322;a / ELISA', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=290', '', hBar, 20);
addItem('Instrukcje / Materia&#322;y do standaryzacji', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=product&id=292', '', hBar, 35);
addItem('Produkty do hodowli komórkowych/Suplementy', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=293', '', hBar, 35);
addItem('Software', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=product&id=294', '', hBar, 20);

//StemCell > Produkty > Sep. Komórek
startMenu('STPrPs', true, 162, 7, 117, subM);
addItem('Komórki ludzkie ', 'STPrPsKl', 'sm:');
addItem('Komórki ludzkie  &nbsp;&nbsp;  cd. ', 'STPrPsKl2', 'sm:', subM, 35);
addItem('Komórki mysie', 'STPrPsKm', 'sm:');
addItem('Komórki szczurze', 'STPrPsKs', 'sm:');
addItem('Komórki innych ssaków naczelnych ', 'STPrPsKn', 'sm:', subM, 35);
addItem('Analiza HLA', 'http://www.stemcell.com/product_catalog/hla.asp', '', hBar, 20);
addItem('RosetteSep', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=477', '', hBar, 20);
addItem('SpinSep', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=478', '', hBar, 20);
addItem('EasySep', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=479', '', hBar, 20);
addItem('StemSep', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=480', '', hBar, 20);

//StemCell > Produkty > Hematopoeza
startMenu('STPrHp', true, 162, 7, 120, subM);
addItem('Media kompletne<br /> i podstawowe', 'STPrHpKp', 'sm:', subM, 35);
addItem('Media do hodowli d&#322;ugoterminowych', 'STPrHpDt', 'sm:', subM, 35);
addItem('Media bezsurowicze', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=329', '', hBar, 20);
addItem('Standaryzacje/kursy', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=292', '', hBar, 20);
addItem('Serwis', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=291', '', hBar, 20);
addItem('Aldefluor', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=493', '', hBar, 20);

//StemCell > Produkty > Embrionalny
startMenu('STPrEm', true, 162, 7, 110, subM);
addItem('Media do hodowli komórek niezró&#380;nicowanych', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=333', '', hBar, 50);
addItem('Media do ró&#380;nicowania in vitro', 'hhttp://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=334', '', hBar, 50);
addItem('Inne', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=426', '', hBar, 20);

//StemCell > Informacje
startMenu('STIn', true, 110, 7, 110, subM);
addItem('Procedury / Instrukcje', 'http://www.stemcell.com/technical/manuals.asp', '', hBar, 35);
addItem('Informacje o produktach', 'http://www.stemcell.com/technical/product_sheets.asp', '', hBar, 35);
addItem('Ulotki', 'http://www.stemcell.com/technical/product_flyers.asp', '', hBar, 20);
addItem('Biuletyny techniczne / Przegl&#261;dówki', 'http://www.stemcell.com/technical/bulletins.asp', '', hBar, 50);
addItem('Literatura', 'http://www.stemcell.com/technical/product_reference.asp', '', hBar, 20);
addItem('Pytania/Odpowiedzi', 'http://www.stemcell.com/technical/faq.asp', '', hBar, 20);
addItem('Pomoc techniczna', 'http://www.stemcell.com/technical/technical_help.asp', '', hBar, 20);
addItem('Porady', 'http://www.stemcell.com/technical/techtip.asp', '', hBar, 20);

//StemCell > Produkty > Sep. Komórek > Ludzkie
startMenu('STPrPsKl', true, 120, 7, 166, subM);
addItem('Limfocyty T (CD3+)', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=337', '', hBar, 20);
addItem('Limfocyty T CD4+', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=338', '', hBar, 20);
addItem('Limfocyty T CD4+ Naďve', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=352', '', hBar, 20);
addItem('Limfocyty T CD8+', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=340', '', hBar, 20);
addItem('Limfocyty T CD4+CD25+', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=339', '', hBar, 20);
addItem('Subpopulacje Limfocytów T', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=492', '', hBar, 20);
addItem('Limfocyty B', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=341', '', hBar, 20);
addItem('Komórki NK', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=342', '', hBar, 20);
addItem('Monocyty', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=343', '', hBar, 20);
addItem('Komórki dendrytyczne', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=463', '', hBar, 20);



//StemCell > Produkty > Sep. Komórek > Ludzkie cd
startMenu('STPrPsKl2', true, 120, 7, 166, subM);
addItem('Komórki hematopoetyczne (CD34+)', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=344', '', hBar, 50);
addItem('Komórki mezenchymalne', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=345', '', hBar, 20);
addItem('Bazofile', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=346', '', hBar, 20);
addItem('Eozynofile', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=347', '', hBar, 20);
addItem('Granulocyty', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=348', '', hBar, 20);
addItem('Komórki nowotworowe', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=349', '', hBar, 20);
addItem('Linia limfoidalna', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=350', '', hBar, 20);
addItem('Linia mieloidalna', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=351', '', hBar, 20);
addItem('Kr&#261;&#380;&#261;ce epitelialne komórki nowotworowe', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=399', '', hBar, 35);
addItem('Inne', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=353', '', hBar, 20);


//StemCell > Produkty > Sep. Komórek > Mysie
startMenu('STPrPsKm', true, 120, 7, 166, subM);
addItem('Limfocyty T', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=454', '', hBar, 20);
addItem('Limfocyty T CD4+', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=455', '', hBar, 20);
addItem('Limfocyty T CD8+', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=456', '', hBar, 20);
addItem('Subpopulacje Limfocytów T', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=457', '', hBar, 20);
addItem('Limfocyty B', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=458', '', hBar, 20);
addItem('Komórki NK', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=459', '', hBar, 20);
addItem('Monocyty', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=catalog_item&id=630', '', hBar, 20);
addItem('Komórki dendrytyczne', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=460', '', hBar, 20);
addItem('Komórki progenitorowe', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=461', '', hBar, 20);
addItem('Komórki mezenchymalne', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=345', '', hBar, 20);
addItem('Inne', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=462', '', hBar, 20);

//StemCell > Produkty > Sep. Komórek > Szczurze
startMenu('STPrPsKs', true, 120, 7, 146, subM);
addItem('Limfocyty T', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=469', '', hBar, 20);
addItem('Limfocyty T CD4+', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=470', '', hBar, 20);
addItem('Limfocyty T CD8+', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=471', '', hBar, 20);
addItem('Inne', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=472', '', hBar, 20);

//StemCell > Produkty > Sep. Komórek > Inne ssaki
startMenu('STPrPsKn', true, 120, 7, 146, subM);
addItem('Limfocyty T', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=473', '', hBar, 20);
addItem('Limfocyty T CD4+', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=474', '', hBar, 20);
addItem('Limfocyty T CD8+', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=475', '', hBar, 20);
addItem('Inne', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=476', '', hBar, 20);

//StemCell > Produkty > Hematopoeza > Kompletne
startMenu('STPrHpKp', true, 130, 7, 110, subM);
addItem('MethoCult do hodowli komórek ludzkich', 'http://www.stemcell.com/product_catalog/hucolassay.asp', '', hBar, 50);
addItem('MethoCult do hodowli komórek mysich', 'http://www.stemcell.com/product_catalog/mucolassay.asp', '', hBar, 50);
addItem('MethoCult do hodowli komórek z innych naczelnych', 'http://www.stemcell.com/product_catalog/colassaymonkey.asp', '', hBar, 50);
addItem('Inne gatunki', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=443', '', hBar, 20);

//StemCell > Produkty > Hematopoeza > Dlugoterminowe
startMenu('STPrHpDt', true, 130, 7, 110, subM);
addItem('MethoCult do hodowli komórek ludzkich', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=449', '', hBar, 50);
addItem('MethoCult do hodowli komórek mysich', 'http://www.stemcell.com/product_catalog/product_catalog_index.asp?type=category&id=450', '', hBar, 50);

//Sarstedt
startMenu('SA', true, 155, 7, 110, subM);
addItem('PRODUKTY', 'SAPr', 'sm:');
addItem('CENNIK', 'Login/logujsa.php', '', hBar, 20);
addItem('ZAMÓWIENIA', 'order/Sars.php', '', hBar, 20);

//Sarstedt > Produkty
startMenu('SAPr', true, 110, 7, 110, subM);
addItem('Produkty medyczne/do diagnostyki laboratoryjnej', 'SAPrMe', 'sm:', subM, 65);
addItem('Produkty do laboratoriów', 'SAPrLa', 'sm:', subM, 35);

//Sarstedt > Produkty > Medycyna
startMenu('SAPrMe', true, 113, 7, 110, subM);
addItem(' Systemy pobra&#324; krwi', 'http://www.sarstedt.com/php/main.php?inhalt=produktfamilien.php?gruppe_id=11', '', hBar, 35);
addItem(' Produkty do pobra&#324; innego typu materia&#322;ów', 'http://www.sarstedt.com/php/main.php?SID=5168c808892c618ad928f0bf8e1d531b&language=en', '', hBar, 50);
addItem(' Produkty do transportu materia&#322;u', 'http://www.sarstedt.com/php/main.php?inhalt=produktfamilien.php?gruppe_id=13', '', hBar, 50);

//Sarstedt > Produkty > Laboratorium
startMenu('SAPrLa', true, 113, 7, 150, subM);
addItem('Sprz&#281;t laboratoryjny jednorazowego i wielorazowego u&#380;ytku', 'http://www.sarstedt.com/php/main.php?inhalt=produktfamilien.php?gruppe_id=21', '', hBar, 50);
addItem('Produkty do hodowli komórkowych i tkankowych', 'http://www.sarstedt.com/php/main.php?inhalt=produktfamilien.php?gruppe_id=23', '', hBar, 50);
addItem('P&#322;ytki mikrotestowe', 'http://www.sarstedt.com/php/main.php?inhalt=produktfamilien.php?gruppe_id=22', '', hBar, 20);
addItem('Produkty do biologii molekularnej/PCR/ Real-Time PCR', 'http://www.sarstedt.com/php/main.php?inhalt=produktfamilien.php?gruppe_id=27', '', hBar, 55);
addItem('Produkty do mikrobiologii', 'http://www.sarstedt.com/php/main.php?inhalt=produktfamilien.php?gruppe_id=24', '', hBar, 20);
addItem('Urz&#261;dzenia laboratoryjne', 'http://www.sarstedt.com/php/main.php?inhalt=produktfamilien.php?gruppe_id=26', '', hBar, 20);

//Thermo
startMenu('TH', true, 155, 7, 110, subM);
addItem('PRODUKTY', 'THPr', 'sm:');
addItem('NFORMACJE <br />O PRODUKTACH', 'THIn', 'sm:', subM, 35);
addItem('CENNIK', 'Login/logujth.php', '', hBar, 20);
addItem('ZAMÓWIENIA', 'order/Thermo.php', '', hBar, 20);

//Thermo > Produkty
startMenu('THPr', true, 110, 7, 110, subM);
addItem('Pipety', 'http://www.thermo.com/com/CDA/Category/CategoryFrames/1,2213,369,00.html', '', hBar, 20);
addItem('Ko&#324;cówki do pipet', 'http://www.thermo.com/com/CDA/Category/CategoryFrames/1,2213,15164,00.html', '', hBar, 20);
addItem('Inne plastiki', 'http://www.thermo.com/com/CDA/Category/CategoryFrames/1,2213,299,00.html', '', hBar, 20);

//Thermo > Informacje
startMenu('THIn', true, 110, 7, 110, subM);
addItem('Katalog', 'http://www.thermo.com/com/cda/resources/resources_detail/1,,11772,00.html', '', hBar, 20);
addItem('Ulotki Finpipette', 'http://www.thermo.com/com/cda/resources/resources_detail/1,,11742,00.html', '', hBar, 20);
addItem('Ulotki Finntips', 'http://www.thermo.com/com/cda/resources/resources_detail/1,,11743,00.html', '', hBar, 20);

//Stratagene
startMenu('SG', true, 155, 7, 110, subM);
addItem('PRODUKTY', 'http://www.stratagene.com', '', hBar, 20);
addItem('CENNIK', 'cennikon.php', '', hBar, 20);
addItem('ZAMÓWIENIA', 'order/Strata.php', '', hBar, 20);

//Mercator Medical
startMenu('MM', true, 155, 7, 110, subM);
addItem('Rękawiczki lateksowe', '', '', hBar, 35);
addItem('Rękawiczki winylowe', '', '', hBar, 35);
addItem('Rękawiczki nitrylowe', '', '', hBar, 35);
addItem('Rękawiczki neoprenowe', '', '', hBar, 35);



}

addMenuBorder(pMenu, window.subBlank,
 null, '#666666', 1, '#CCCCDD', 2);

 addDropShadow(pMenu, window.subM,
  [70,"#EBEBEB",8,8,-4,-4], [90,"#F0F0F0",6,4,5,5]);
 addDropShadow(pMenu, window.subBlank,
  [40,"#333333",6,6,-4,-4], [40,"#666666",4,4,0,0]);

if ((navigator.userAgent.indexOf('rv:0.')==-1) &&
    !(isOp&&!document.documentElement) && !(isIE4&&!window.external))
{
 pMenu.showMenu = new Function('mN','menuAnim(this, mN, 10)');
 pMenu.hideMenu = new Function('mN','menuAnim(this, mN, -10)');

}

page.elmPos=function(e,p)
{
 var x=0,y=0,w=p?p:this.win;
 e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;
 if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}
 if (e && this.MS && navigator.platform.indexOf('Mac')>-1 && e.tagName=='A')
 {
  e.onfocus = new Function('with(event){self.tmpX=clientX-offsetX;' +
   'self.tmpY=clientY-offsetY}');
  e.focus();x=tmpX;y=tmpY;e.blur()
 }
 else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}
 return{x:x,y:y};
};

function menuAnim(menuObj, menuName, dir)
{
 // The array index of the named menu (e.g. 'mFile') in the menu object (e.g. 'pMenu').
 var mD = menuObj.menu[menuName][0];
 // Add timer and counter variables to the menu data structure, we'll need them.
 if (!mD.timer) mD.timer = 0;
 if (!mD.counter) mD.counter = 0;

 with (mD)
 {
  clearTimeout(timer);

  if (!lyr || !lyr.ref) return;
  if (!visNow && dir>0) dir = 0-dir;
  if (dir>0) lyr.vis('visible');
  lyr.sty.zIndex = dir>0 ? mD.zIndex + 1 : 1001;

  lyr.clip(0, 0, menuW+2, (menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75) );
  counter += dir;
  if (counter>100) { counter = 100; lyr.sty.zIndex = mD.zIndex }
  else if (counter<0) { counter = 0; lyr.vis('hidden') }
  else timer = setTimeout('menuAnim('+menuObj.myName+',"'+menuName+'",'+dir+')', 40);
 }
};

function addMenuBorder(mObj, iS, alpha, bordCol, bordW, backCol, backW)
{
 // Loop through the menu array of that object, finding matching ItemStyles.
 for (var mN in mObj.menu)
 {
  var mR=mObj.menu[mN], dS='<div style="position:absolute; background:';
  if (mR[0].itemSty != iS) continue;
  // Loop through the items in that menu, move them down and to the right a bit.
  for (var mI=1; mI<mR.length; mI++)
  {
   mR[mI].iX += bordW+backW;
   mR[mI].iY += bordW+backW;
  }
  // Extend the total dimensions of menu accordingly.
  mW = mR[0].menuW += 2*(bordW+backW);
  mH = mR[0].menuH += 2*(bordW+backW);

  // Set the menu's extra content string with divs/layers underneath the items.
  if (isNS4) mR[0].extraHTML += '<layer bgcolor="'+bordCol+'" left="0" top="0" width="'+mW+
   '" height="'+mH+'" z-index="980"><layer bgcolor="'+backCol+'" left="'+bordW+'" top="'+
   bordW+'" width="'+(mW-2*bordW)+'" height="'+(mH-2*bordW)+'" z-index="990"></layer></layer>';
  else mR[0].extraHTML += dS+bordCol+'; left:0px; top:0px; width:'+mW+'px; height:'+mH+
   'px; z-index:980; '+
   (alpha!=null?'filter:alpha(opacity='+alpha+'); -moz-opacity:'+alpha+'%; opacity:'+(alpha/100):'')+
   '">'+dS+backCol+'; left:'+bordW+'px; top:'+bordW+'px; width:'+(mW-2*bordW)+'px; height:'+
   (mH-2*bordW)+'px; z-index:990"></div></div>';
 }
};

function addDropShadow(mObj, iS)
{
 for (var mN in mObj.menu)
 {
  var a=arguments, mD=mObj.menu[mN][0], addW=addH=0;
  if (mD.itemSty != iS) continue;
  for (var shad=2; shad<a.length; shad++)
  {
   var s = a[shad];
   var alpha = (s[0]!=null && navigator.userAgent.indexOf('AppleWebKit') == -1);
   if (isNS4) mD.extraHTML += '<layer bgcolor="'+s[1]+'" left="'+s[2]+'" top="'+s[3]+'" width="'+
    (mD.menuW+s[4])+'" height="'+(mD.menuH+s[5])+'" z-index="'+(arguments.length-shad)+'"></layer>';
   else mD.extraHTML += '<div style="position:absolute; background:'+s[1]+'; left:'+s[2]+
    'px; top:'+s[3]+'px; width:'+(mD.menuW+s[4])+'px; height:'+(mD.menuH+s[5])+'px; -z-index:'+
    (a.length-shad)+'; '+
    (alpha?'filter:alpha(opacity='+s[0]+'); -moz-opacity:'+s[0]+'%; opacity:'+(s[0]/100):'')+
    '"></div>';
   addW=Math.max(addW, s[2]+s[4]);
   addH=Math.max(addH, s[3]+s[5]);
  }
  mD.menuW+=addW; mD.menuH+=addH;
 }
};


// METHOD TWO: DYNAMIC SHOW AND HIDE
// This can hide any element, like applets, movies and IFRAMEs, and it is more complicated :).
// To activate: Paste this into your menu data file (either POP_DATA or the frameset).
// This must be near the end of the file, after your menu animation settings in particular.
// It will automatically apply itself to all menus in that page.
// This function will have no effect on NS4's form behaviour.

PopupMenu.prototype.elementHide = function(mN, show)
{
 var hideTags = [];
 // <select> is hidden in all IE versions, and Opera < 7.0.
 if ((isIE && !isOp) || (isOp && !document.documentElement))
  hideTags[hideTags.length] = 'SELECT';
 // <iframe> is hidden in IE < 5.5, all Opera versions, and Mozilla < 1.0.
 if ((isIE && !isOp && !window.createPopup) || isOp ||
  navigator.userAgent.match('rv:0.')) hideTags[hideTags.length] = 'IFRAME';
 // <object> and <applet> are hidden in all browsers.
if (!isIE)
 hideTags[hideTags.length] = 'OBJECT';
 hideTags[hideTags.length] = 'APPLET';

 with (this.menu[mN][0])
 {
  if (!lyr || !lyr.ref) return;

  var oldFn = show ? 'ehShow' : 'ehHide';
  if (this[oldFn]) this[oldFn](mN);
  else this.menu[mN][0].lyr.vis(show ? 'visible' : 'hidden');
  if (!isDOM && !isIE) return;
  if (hideTags.length == -1) return;

  var w = par?eval(par):self;
  if (!w.hideElms) w.hideElms = [];
  var hE = w.hideElms;

  if (show)
  {
   var elms = [];
   for (var t = 0; t < hideTags.length; t++)
   {
    var tags = isDOM ? w.document.getElementsByTagName(hideTags[t]) :
     isIE ? w.document.all.tags(hideTags[t]) : null;
    for (var i = 0; i < tags.length; i++) elms[elms.length] = tags[i];
   }
   for (var eN = 0; eN < elms.length; eN++)
   {
    var eRef = elms[eN];
    with (w.page.elmPos(eRef)) var eX = x, eY = y;
    if (!(lyr.x()+menuW<eX || lyr.x()>eX+eRef.offsetWidth) &&
        !(lyr.y()+menuH<eY || lyr.y()>eY+eRef.offsetHeight))
    {
     if (!hE[eN]) hE[eN] = { ref: eRef, menus: [] };
     hE[eN].menus[mN] = true;
     eRef.style.visibility = 'hidden';
    }
   }
  }
  else for (var eN in hE)
  {
   var reShow = 1, eD = hE[eN];
   eD.menus[mN] = false;
   for (var eM in eD.menus) reShow &= !eD.menus[eM];
   if (reShow && eD.ref)
   {
    eD.ref.style.visibility = 'visible';
    delete hE[eN];
   }
  }
 }
 return;
}
for (var p in PopupMenu.list)
{
 var pm = PopupMenu.list[p];
 pm.ehShow = pm.showMenu;
 pm.showMenu = new Function('mN','this.elementHide(mN, true)');
 pm.ehHide = pm.hideMenu;
 pm.hideMenu = new Function('mN','this.elementHide(mN, false)');
}
