
var hBar = new ItemStyle(80, 10, '', 0, 0, '#006666', '#669999', 'itemText', 'itemText', 'itemBorderTest', 'itemBorderTestHover', null, null);

var stylemenu = new ItemStyle(80, 16, '', 0, 0, '#D6261E', '#D6261E', 'itemText', 'itemText', '', '', 95, 70);
var styleNowosci = new ItemStyle(80, 16, '', 0, 0, '#FFFFFF', '#FFFFFF', 'itemText', 'itemHover', '', '', null, null);
var styleProdukty = new ItemStyle(80, 16, '', 0, 0, '#FFFFFF', '#FFFFFF', 'itemText', 'itemText', '', '', null, null);
var stylePromocje = new ItemStyle(80, 16, '', 0, 0, '#FFFFFF', '#FFFFFF', 'itemText', 'itemText', '', '', null, null);


// The 'sub Menu' items: 22px long, 0px spacing, a 'greater than' sign for a popout indicator
// (you may wish to use an image tag?), the popout indicator is positioned 15px from the right
// edge of the item, items have 3px padding, some colours, it uses 'itemText' as the dimmed text
// class but 'itemHover' when it is moused over, and 'itemBorder' as the border stylesheet class.
//var subM = new ItemStyle(22, 0, '&gt;', -15, 3, '#333366', '#666699', 'itemText', 'itemHover', 'itemBorder', 'itemBorder', null, null);
var subAll = new ItemStyle(22, 0, '', -15, 3, '#D6261E', '#FFFFFF', 'itemText', 'itemText', 'itemBorderAll', 'itemBorderAll', null, null);
var subTop = new ItemStyle(22, 0, '', -15, 3, '#D6261E', 'E9645C', 'itemText', 'itemText', 'itemBorderTop', 'itemBorderTop', null, null);
var subTopLink = new ItemStyle(22, 0, '', -15, 3, '#D0D0D2', '#FFFFFF', 'itemText', 'itemHover', 'itemBorderTop', 'itemBorderTop', null, null);
var subMiddle = new ItemStyle(22, 0, '', -15, 3, '#D6261E', 'E9645C', 'itemText', 'itemText', 'itemBorderMiddle', 'itemBorderMiddle', 100, 100);
var subMiddleLink = new ItemStyle(22, 0, '', -15, 3, '#D0D0D2', '#FFFFFF', 'itemText', 'itemHover', 'itemBorderMiddle', 'itemBorderMiddle', null, null);
var subBottom = new ItemStyle(22, 0, '', -15, 3, '#D0D0D2', '#FFFFFF', 'itemText', 'itemText', 'itemBorderBottom', 'itemBorderBottom', null, null);
var subBottomLink = new ItemStyle(22, 0, '', -15, 3, '#D0D0D2', '#FFFFFF', 'itemText', 'itemText', 'itemBorderBottom', 'itemBorderBottom', null, null);

var subAllNomenu = new ItemStyle(22, 0, '', -15, 3, '#E8E8E9', '#FFFFFF', 'itemText', 'itemText', 'itemBorderAllNomenu', 'itemBorderAllNomenu', null, null);
var subTopNomenu = new ItemStyle(22, 0, '', -15, 3, '#E8E8E9', '#FFFFFF', 'itemText', 'itemText', 'itemBorderTopNomenu', 'itemBorderTopNomenu', null, null);
var subTopLinkNomenu = new ItemStyle(22, 0, '', -15, 3, '#E8E8E9', '#FFFFFF', 'itemText', 'itemHover', 'itemBorderTopNomenu', 'itemBorderTopNomenu', null, null);
var subMiddleNomenu = new ItemStyle(22, 0, '', -15, 3, '#E8E8E9', '#FFFFFF', 'itemText', 'itemText', 'itemBorderMiddleNomenu', 'itemBorderMiddleNomenu', null, null);
var subMiddleLinkNomenu = new ItemStyle(22, 0, '', -15, 3, '#E8E8E9', '#FFFFFF', 'itemText', 'itemHover', 'itemBorderMiddleNomenu', 'itemBorderMiddleNomenu', null, null);
var subBottomNomenu = new ItemStyle(22, 0, '', -15, 3, '#E8E8E9', '#FFFFFF', 'itemText', 'itemHover', 'itemBorderBottomNomenu', 'itemBorderBottomNomenu', null, null);
var subBottomLinkNomenu = new ItemStyle(22, 0, '', -15, 3, '#E8E8E9', '#FFFFFF', 'itemText', 'itemText', 'itemBorderBottomNomenu', 'itemBorderBottomNomenu', null, null);


var subSubAll = new ItemStyle(22, 0, '', -15, 3, '#FFFFFF', '#D0D0D2', 'itemText', 'itemHover', 'itemSubBorderAll', 'itemSubBorderAll', null, null);
var subSubTop = new ItemStyle(22, 0, '', -15, 3, '#FFFFFF', '#D0D0D2', 'itemText', 'itemHover', 'itemSubBorderTop', 'itemSubBorderTop', null, null);
var subSubMiddle = new ItemStyle(22, 0, '', -15, 3, '#FFFFFF', '#D0D0D2', 'itemText', 'itemHover', 'itemSubBorderMiddle', 'itemSubBorderMiddle', null, null);
var subSubBottom = new ItemStyle(22, 0, '', -15, 3, '#FFFFFF', '#D0D0D2', 'itemText', 'itemHover', 'itemSubBorderBottom', 'itemSubBorderBottom', null, null);


// *** (2) MENU DATA ***



// A PopupMenu() object must be passed its own name so it can reference itself when the menu
// is active. We also use a 'with' block to work with its properties and functions below.
var pMenu = new PopupMenu('pMenu');
with (pMenu)
{

// *** MOVE OR CENTRE THE MENU HERE ***

startMenu('root', false, 'page.winW()/2-95', 157, 18, hBar);

// The text is a space then 'File', and this item pops out the 'mFile' submenu when moused over
// as we've set 'sm:' as the action type. If you want to assign a click action (i.e. navigating to
// a file) to one of these 'sm:' items, see the 'Optional Code' section below.

addItem('<img border="0" src="img/design/menu_kaprysmet.gif" width="84" height="16">', 'mkaprysmet', 'sm:', stylemenu, 90);
addItem('<img border="0" src="img/design/menu_oferta.gif" width="55" height="16">', 'moferta', 'sm:', stylemenu, 60);
addItem('<img border="0" src="img/design/menu_wspolpraca.gif" width="82" height="16">', 'index2.php?dzial=informacjedlapartnerow', '', stylemenu, 90);
addItem('<img border="0" src="img/design/menu_kontakt.gif" width="63" height="16">', 'index2.php?dzial=kontakt', '', stylemenu, 70);










// Menu KAPRYS - MET
startMenu('mkaprysmet', true, 0, 22, 130, subMiddleNomenu);
addItem('O firmie', 'index2.php?dzial=ofirmie', '', subTop, 22, 1, '<img src="images/arrow.gif" width="4" height="13" border=0 alt="">', -10);
addItem('Certyfikaty', 'index2.php?dzial=certyfikaty', '', subMiddle, 22, 1, '', -10);
addItem('Kontakt', 'index2.php?dzial=kontakt', '', subMiddle, 22, 1, '', -10);

// Menu OFERTA
startMenu('moferta', true, 0, 22, 130, subMiddleNomenu);
addItem('Produkty', 'index3.php', '', subTop, 22, 1, '<img src="images/arrow.gif" width="4" height="13" border=0 alt="">', -10);
addItem('Cennik', 'index2.php?dzial=cennik', '', subMiddle, 22, 1, '', -10);
addItem('Promocje', 'index4.php', '', subMiddle, 22, 1, '', -10);




// You can also assign hide or show delays (in milliseconds) to the menus. Defaults are:
showDelay = 10;
hideDelay = 400;

}






// *** (3) EVENTS ***

if (!isNS4)
{
 // Write menus now in non-NS4 browsers, by calling the "Fast" mode .update(true) method.
 pMenu.update(true);
 //anotherMenu.update(true);
}
else
{
 // For Netscape 4, back up the old onload function and make a new one to update our menus.
 // This is the regular "Dynamic" mode menu update, it works in IE and NS6 too.
 var popOldOL = window.onload;
 window.onload = function()
 {
  if (popOldOL) popOldOL();
  pMenu.update();
  //anotherMenu.update();
 }
}


// Other events must be assigned, these are less complicated, just add or remove menu objects.

window.onresize = function()
{
 ns4BugCheck();
 pMenu.position();
 //anotherMenu.position();
}

window.onscroll = function()
{
 pMenu.position();
 //anotherMenu.position();
}

if (isNS4) document.captureEvents(Event.CLICK);
document.onclick = function(evt)
{
 pMenu.click();
 //anotherMenu.click();
 if (isNS4) return document.routeEvent(evt);
}


// A small function that refreshes NS4 on window resize to avoid bugs, called above.
var nsWinW = window.innerWidth, nsWinH = window.innerHeight;
function ns4BugCheck()
{
 if (isNS4 && (nsWinW!=innerWidth || nsWinH!=innerHeight)) location.reload()
}

// Activate the useful 'onscroll' event for non-Microsoft browsers.
if (!isIE || window.opera)
{
 var nsPX=pageXOffset, nsPY=pageYOffset;
 setInterval('if (nsPX!=pageXOffset || nsPY!=pageYOffset) ' +
 '{ nsPX=pageXOffset; nsPY=pageYOffset; window.onscroll() }', 50);
}





// *** (4) ANIMATION ***
//
function menuClip(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)
 {
  // Stop any existing animation.
  clearTimeout(timer);
  // If the layer doesn't exist (cross-frame navigation) quit.
  if (!lyr || !lyr.ref) return;
  // Show the menu if that's what we're doing.
  if (dir==1) lyr.vis('visible');
  // Also raise showing layers above hiding ones.
  lyr.sty.zIndex = 1001 + dir;
  // Clip the visible area. Tweak this if you want to change direction/acceleration etc. Przyspieszanie: menuH+=====>2<=======
  lyr.clip(0, 0, menuW+2, (menuH+100)*Math.pow(Math.sin(Math.PI*counter/20),0.75) );
  // Increment the counter and if it hasn't reached the end (10 steps either way) set the timer.
  // Clear the clipping value in DOM browsers as early NS6 versions are quite terrible at this.
  counter += dir;
  if (counter==11) { counter = 10; if (isDOM&&!isIE) lyr.sty.clip='' }
  else if (counter<0) { counter = 0; lyr.vis('hidden') }
  else timer = setTimeout(menuObj.myName+'.'+(dir==1?'show':'hide')+'Menu("'+menuName+'")', 40);
 }
}


// Add the effect to the 'pMenu' menu object for supported browsers. Opera doesn't support clipping
// so we turn it off, neither does IE4/Mac.
if (!window.opera)
{
 //pMenu.showMenu = new Function('mN','menuClip(pMenu, mN, 1)');
 //pMenu.hideMenu = new Function('mN','menuClip(pMenu, mN, -1)');
 // Add it to other menu objects like this...
 //anotherMenu.showMenu = new Function('mN','menuClip(anotherMenu, mN, 1)');
 //anotherMenu.hideMenu = new Function('mN','menuClip(anotherMenu, mN, -1)');
}






// *** (5) FRAMESETS ***
//





// *** (6) OPTIONAL CODE ***   DELETE IF YOU'RE NOT USING THESE!
//


pMenu.onclick = function() { with (this)
{
 // Do actions depending on the item that the mouse was over at the time of the click.
 // You may with to use nested IFs or 'switch' statements etc. if you're familiar with JS.
// if (overM == 'root' && overI == 1) location.href = 'jvc.php';
 if (overM == 'root' && overI == 9) location.href = 'sklepy.php';
 if (overM == 'root' && overI == 4) location.href = '#';
 //"MM_OpenBrWindow('e_subskrypcja_pr.htm','','width=280,height=158,left=150,top=150')";
}}



// End Hide -->

