var hBar = new ItemStyle(40, 10, '', 0, 0, '15#1F3F3B', '10#051918', 'lowText', 'highText', '', '',
 null, null, 'hand', 'default');

var subM = new ItemStyle(22, 0, '&gt;', -15, 3, '#1F3F3B', '#051918', 'lowText', 'highText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');

var subBlank = new ItemStyle(22, 1, '&gt;', -15, 3, '#1F3F3B', '#1F3F3B', 'lowText', 'highText',
 'itemBorderBlank', 'itemBorder', null, null, 'hand', 'default');


var pMenu = new PopupMenu('pMenu');
with (pMenu)
{

startMenu('root', false, 'page.elmPos("x55").x', 'page.elmPos("x55").y', 14, hBar);
addItem('&nbsp; Huvudsida', 'mHome', 'sm:', hBar, 60);
addItem('&nbsp; Fanclub', 'mFanclub', 'sm:', hBar, 50);
addItem('&nbsp; Nyhetsbrevet', 'mNews', 'sm:', hBar, 76);
addItem('&nbsp; Planetarium', 'mPlanetarium', 'sm:', hBar, 65);
addItem('&nbsp; Forums', 'Forum/index.php', 'top', hBar, 45);
addItem('&nbsp; Byt spra\´k', 'mLanguages', 'sm:', hBar, 60);

startMenu('mHome', true, -1, 15, 80, subM);
addItem('Bli medlem', 'join.aspx?lang=17', 'top.iFX');
addItem('Nyhetsbrevet', 'home.aspx?lang=17', 'top.iFX');
addItem('FAQ', 'faq.aspx?lang=17', 'top.iFX');
addItem('Kontakta oss', 'contact.aspx?lang=17', 'top.iFX');

startMenu('mFanclub', true, -1, 15, 100, subM);
addItem('Bli medlem', 'join.aspx?lang=17', 'top.iFX');
addItem('Medlemssiden', 'members.aspx?lang=17', 'top.iFX');
addItem('Lokala Fanklubbar', 'chapters.aspx?lang=17', 'top.iFX');
addItem('Asistenter', 'assistants.aspx?lang=17', 'top.iFX');

startMenu('mNews', true, -1, 15, 80, subM);
addItem('Nya Artiklar', 'newsletter.aspx?lang=17', 'top.iFX');
addItem('Skriv brev', 'post.aspx?lang=17', 'top.iFX');
addItem('Arkiv', 'archives.aspx?lang=17', 'top.iFX');

startMenu('mPlanetarium', true, -1, 15, 80, subM);
addItem('George 101', '101.aspx?lang=17', 'top.iFX');
addItem('Gallery', 'Gallery.aspx?lang=17', 'top.iFX');
addItem('Interviews', 'interviews.aspx', 'top.iFX');
addItem('Discography', 'discography.aspx?lang=17', 'top.iFX');
addItem('Texter', 'lyrics.aspx?lang=17', 'top.iFX');
addItem('Polls', 'polls.aspx?lang=17', 'top.iFX');
addItem('Trivia', 'trivia.aspx?lang=17', 'top.iFX');
addItem('Presentbutik', 'giftshop.aspx?lang=17', 'top.iFX');
addItem('Länkar', 'Links.aspx?lang=17', 'top.iFX');

startMenu('mLanguages', true, -1, 15, 80, subM);
addItem('English', 'Default.aspx?lang=17', '');
addItem('Croatian', 'cr.aspx?lang=17', '');
addItem('Danish', 'da.aspx?lang=17', '');
addItem('Dutch', 'du.aspx?lang=17', '');
addItem('Estonian', 'es.aspx?lang=17', '');
addItem('Finnish', 'fi.aspx?lang=17', '');
addItem('French', 'fr.aspx?lang=17', '');
addItem('German', 'ge.aspx?lang=17', '');

addItem('Indonesian', 'id.aspx?lang=17', '');
addItem('Italian', 'il.aspx?lang=17', '');
addItem('Norwegian', 'nw.aspx?lang=17', '');
addItem('Polish', 'po.aspx?lang=17', '');
addItem('Portuguese', 'pg.aspx?lang=17', '');
addItem('Slovakian', 'sk.aspx?lang=17', '');
addItem('Slovenian', 'sn.aspx?lang=17', '');
addItem('Spanish', 'sp.aspx?lang=17', '');
addItem('Swedish', 'sw.aspx?lang=17', '');



// This menu is aligned slightly left of its trigger (-10px).
// Instead of using spaces to indent, consider 'text-indent' in the stylesheet class perhaps?
// The last item is an example of adding extra optional parameters to the addItem() command.
// It uses the subM ItemSyle (regardless of what the rest of this menu uses), is 22px long,
// has 0px spacing after it, and a lesser-than-sign popout indicator positioned 3px from the left
// edge of this item. Note that the parameters after the ItemStyle name are in the same order as
// the ItemStyle command itself, and you can have as many as you want (e.g. background colours).


// You can also customise hide or show delays (in milliseconds) to the menus. Defaults are:
//showDelay = 0;
//hideDelay = 500;
// Specify hideDelay as zero if you want to disable autohiding, and showDelay as a couple of
// hundred if you don't want the menus showing instantaneously when moused over.
//
// You can assign 'oncreate' events to specific menus. By default, the script has only one for
// the root menu that shows it when it is created. You may wish to change it to something like the
// following, which uses the animation function to show the menu, or delay its show altogether.
//menu.root[0].oncreate = function() { pMenu.doVis('root', true) }

// End of 'with (pMenu)' block. That's one menu object created!

}



// CREATE ANOTHER MENU OBJECT here if you want multiple menus on a page, or you can just
// duplicate this entire file and rename 'pMenu' to something else.
// Every menu object MUST have a menu named 'root' in it, as that's always visible.

//var anotherMenu = new PopupMenu('anotherMenu');
//with (anotherMenu)
//{
// startMenu('root', .....);
// ... make menus here ...
//}


// ******************** MENU EFFECTS ********************
//
// Now you've created a basic menu object, you can add optional effects like borders and
// shadows to specific menus. You can remove this section entirely if you want, the
// functions called are found at the bottom of this file.



// Border: Added to all menus in a named object using a specified ItemStyle. The syntax is:
//  addMenuBorder(menuObject, ItemStyle,
//   opacity of border, 'border colour', border width, 'padding colour', padding width);
// Opacity is a number from 0 to 100, or null for solid colour (just like the ItemStyles).

addMenuBorder(pMenu, window.subBlank,
 null, '#2f5150', 100, '#2f5150', 2);



// Dropshadow: added to specific ItemStyles again. The syntax is similar, but later on you
// pass arrays [...] for each layer of the shadow you want. I've used two grey layers
// here, but you can use as many or as few as you want. The syntax for the layers is:
//  [opacity, 'layer colour', X offset, Y offset, Width Difference, Height difference]
// Opacity is from 0 to 100 (or null to make it solid), and the X/Y offsets are the
// distance in pixels from the menu's top left corner to that shadow layer's corner.
// The width/height differences are added or subtracted to the current menu size, for
// instance the first layer of this shadow is 4px narrower and shorter than the menu
// it is shadowing.

addDropShadow(pMenu, window.subM, [40,"#051918",6,6,-4,-4], [40,"#000000",4,4,0,0]);
addDropShadow(pMenu, window.subBlank, [40,"#051918",6,6,-4,-4], [40,"#000000",4,4,0,0]);


// Animation: We add this to the 'pMenu' menu object for supported browsers.
// IE4/Mac and Opera 5/6 don't support clipping, and Mozilla versions prior to 1.x (such as
// Netscape 6) are too slow to support it, so I'm doing some browser sniffing.
// If you don't want animation, delete this entirely, and the menus will act normally.
// Change the speed if you want... it's the last number, between -100 and 100, and is
// defined as the percentage the animation moves each frame (defaults are 10 and 15).

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, -15)');

 // Alternatively: try the IE5.5+/Windows filters. If you are doing this make sure that you either
 // enable translucency in the ItemStyles or disable it in the dropshadows otherwise it looks weird.
 // Comment the above two lines out and uncomment this:
 //pMenu.showMenu = function(mN)
 //{ menuFilterShow(this, mN, 'progid:DXImageTransform.Microsoft.GradientWipe(' +
 //   'GradientSize=0.75,duration=0.5,wipestyle=1,motion=forward)') }
 
 // There's a good list of transitions and documentation available from:
 //  http://msdn.microsoft.com/workshop/author/filter/reference/reference.asp
 // for a whole lot more PowerPoint-like effects you can use.

 // Add animation to other menu objects like this...
 //anotherMenu.showMenu = new Function('mN','menuAnim(this, mN, 10)');
 //anotherMenu.hideMenu = new Function('mN','menuAnim(this, mN, -10)');
}



// Custom mouse events (for things like click handler, status messages, select box hiding...):
//
// If you want, you can assign functions to handle menu mouse events like mouse over/out/click.
// 'with (this)' means use the properties of the menu object, and they're passed the current
// menu name (mN) and item number (iN) you can use to determine the source of the event.
// To uncomment and activate, delete the /* and */ at the start and end.

/*
pMenu.onclick = function(mN, iN) { 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 (mN == 'root')
 {
  if (iN == 1) window.status = 'Congratulations, you\'ve mastered clicking!';
  if (iN == 2) location.href = 'edit.html';
  if (iN == 3) location.href = 'help.html';
  // For frameset navigation, use this syntax:
  //targetFrameName.location.href = 'blah.html';
 }
}}

// Set the status message to the URL if the 'action type' is nothing, and clear on mouseout.
// By now, you either have my 'JS Object Browser' script from my site or you need it... try
// embedding in an IFrame and typing 'pMenu' into its Go To field to see the menu internals.
pMenu.onmouseover = function(mN, iN) { with (this)
{
 with (menu[mN][iN]) if (type!='sm:' && type!='js:') window.status = href;
}}
pMenu.onmouseout = function() { window.status = '' }
*/

