var hBar = new ItemStyle(100,1,'',0,0,'#228822','#22BB22','itemText','itemText','','',null, null);

var subM = new ItemStyle(22,0,'&gt;',-10,3,'#229922','#22BB22',
    'itemText','itemHover','itemBorder','itemBorder', null, null);

var pMenu = new PopupMenu('pMenu');
with (pMenu)
{
startMenu('root',false,'page.winW()/2 - 310','page.scrollY()',17,hBar);
addItem('Music', 'mMusic', 'sm:');
addItem('Linn', 'mLinn', 'sm:');
addItem('Naim', 'mNaim', 'sm:');
addItem('Paraglow', 'mParaglow', 'sm:');
addItem('Pass A75', 'mA75', 'sm:');
addItem('Other', 'mOther', 'sm:');

startMenu('mMusic', true, 0, 17, 100, subM);
addItem('Genesis', 'mGenesis', 'sm:');
addItem('Peter Gabriel', 'mGabriel', 'sm:');
addItem('Yes', pathAdjust + '/yes/index_yes.html', '');
addItem('home', pathAdjust + '/index.html', '');

startMenu('mGenesis', true, 100, 0, 100, subM);
addItem('Introduction', pathAdjust + '/genesis/index_g.html', '');
addItem('Derek&nbsp;Jewel', pathAdjust + '/genesis/index_g.html#jewel', '');
addItem("Top's&nbsp;in&nbsp;76", pathAdjust + '/genesis/index_g.html#genesis', '');
addItem('then&nbsp;3...', pathAdjust + '/genesis/index_g.html#genesis2', '');
addItem('Duke', pathAdjust + '/genesis/index_g.html#genesis3', '');
addItem('Lyrics&nbsp;explained', pathAdjust + '/genesis/index_g.html#madmadmoon', '');
addItem('Pick&nbsp;of&nbsp;76', pathAdjust + '/genesis/index_g.html#records', '');
addItem('home', pathAdjust + '/index.html', '');

startMenu('mGabriel', true, 100, 0, 100, subM);
addItem('Introduction', pathAdjust + '/gabriel/index_pg.html', '');
addItem('Concert review', pathAdjust + '/gabriel/index_pg.html#pg1', '');
addItem("Car review", pathAdjust + '/gabriel/index_pg.html#pg2', '');
addItem('Melt review', pathAdjust + '/gabriel/index_pg.html#pg3', '');
addItem('home', pathAdjust + '/index.html', '');

startMenu('mLinn', true, 0, 17, 100, subM);
addItem('Introduction', pathAdjust + '/linn/index_l.html', '');
addItem('LP12&nbsp;FAQ', pathAdjust + '/linn/index_l.html#version', '');
addItem('Analog&nbsp;Addicts', pathAdjust + '/linn/index_l.html#addicts', '');
addItem('home', pathAdjust + '/index.html', '');

startMenu('mNaim', true, 0, 17, 100, subM);
addItem('Introduction', pathAdjust + '/naim/index_n.html', '');
addItem('Part&nbsp;Upgrades', pathAdjust + '/naim/index_n.html#parts', '');
addItem('Circuit&nbsp;Updates', pathAdjust + '/naim/index_n.html#circuit', '');
addItem('PSU&nbsp;Upgrades', pathAdjust + '/naim/index_n.html#psu', '');
addItem('home', pathAdjust + '/index.html', '');

startMenu('mParaglow', true, 0, 17, 100, subM);
addItem('Introduction', pathAdjust + '/paraglow/index_p.html', '');
addItem('the making', 'mParaglowBuild', 'sm:');
addItem('the fixing', pathAdjust + '/paraglow/debug/debug.html', '');
addItem('the future', pathAdjust + '/paraglow/upgrades.html', 'uc:');
addItem('Paraglow II', 'mGaspode', 'sm:');
addItem('home', pathAdjust + '/index.html', '');

startMenu('mParaglowBuild', true, 100, 0, 100, subM);
addItem('Introduction', pathAdjust + '/paraglow/article/article.html#introduction', '');
addItem('which kit?', pathAdjust + '/paraglow/article/article.html#kits', '');
addItem('specs', pathAdjust + '/paraglow/article/article.html#specs', '');
addItem('cosmetics', pathAdjust + '/paraglow/article/article.html#cosmetics', '');
addItem('time warp?', pathAdjust + '/paraglow/article/article.html#warp', '');
addItem('modifications', pathAdjust + '/paraglow/article/article.html#mods', '');
addItem('conclusion', pathAdjust + '/paraglow/article/article.html#conclusion', '');
addItem('home', pathAdjust + '/index.html', '');

startMenu('mGaspode', true, 100, 0, 100, subM);
addItem('Introduction', pathAdjust + '/paraglow/gaspode/gaspode.html#introduction', '');
addItem('Pg II compared', pathAdjust + '/paraglow/gaspode/gaspode.html#pg2', '');
addItem('Straight 8', pathAdjust + '/paraglow/gaspode/gaspode.html#s8', '');
addItem('lastly...', pathAdjust + '/paraglow/gaspode/gaspode.html#last', '');
addItem('home', pathAdjust + '/index.html', '');

startMenu('mA75', true, 0, 17, 100, subM);
addItem('Introduction', pathAdjust + '/a75/index_a.html', '');
addItem('2001', pathAdjust + '/a75/index_a.html#forward', '');
addItem('2002', pathAdjust + '/a75/index_a.html#fine', '');
addItem('home', pathAdjust + '/index.html', '');

startMenu('mOther', true, 0, 17, 100, subM);
addItem('Development', 'mDevelopment', 'sm:');
addItem('Documents', 'mDocuments', 'sm:');
addItem('Importing', 'mImport', 'sm:');
addItem('Panoramas', 'mPanoramas', 'sm:');
addItem('source code<br>for menu?<br>click to visit...',
  'window.open("http://www.twinhelix.com")', 'js:', subM,50);
addItem('home', pathAdjust + '/index.html', '');

startMenu('mImport', true, 100, 0, 100, subM);
addItem('Introduction', pathAdjust + '/import/import.html', '');
addItem('The Costs', pathAdjust + '/import/import.html#costs', '');
addItem('Tips', pathAdjust + '/import/import.html#tips', '');
addItem('Links', pathAdjust + '/import/import.html#links', '');
addItem('home', pathAdjust + '/index.html', '');

startMenu('mPanoramas', true, 100, 0, 100, subM);
addItem('Introduction', pathAdjust + '/index.html', 'uc:');
addItem('1982 B/W', pathAdjust + '/index.html', 'uc:');
addItem('1986 Colour', pathAdjust + '/index.html', 'uc:');
addItem('home', pathAdjust + '/index.html', '');

startMenu('mDevelopment', true, 100, 0, 100, subM);
addItem('JavaScript', pathAdjust + '/development/index_dev.html', '');
addItem('XML/XSLT', pathAdjust + '/development/index_dev.html#xml', '');
addItem('SOAP &amp;<br> Web Services', pathAdjust + '/development/index_dev.html#wsdl', '','',35);
addItem('home', pathAdjust + '/index.html', '');

startMenu('mDocuments', true, 100, 0, 100, subM);
addItem('Introduction', pathAdjust + '/documents/index_d.html', '');
addItem('Arm/cartridge<br>matching', pathAdjust + '/documents/index_d.html#linn', '','',35);
addItem('Audio Conversions', pathAdjust + '/documents/index_d.html#index', '');
addItem('Classic amp', pathAdjust + '/documents/index_d.html#classic', '');
addItem('Constant current', pathAdjust + '/documents/index_d.html#currentreg', '');
addItem('DAC', pathAdjust + '/documents/index_d.html#dac', '');
addItem('Disk motor', pathAdjust + '/documents/index_d.html#disk', '');
addItem('LP12 FAQ', pathAdjust + '/linn/index_l.html','');
addItem('LP12 Manuals', pathAdjust + '/documents/index_d.html#linn','');
addItem('Mains spur', pathAdjust + '/documents/index_d.html#mains', '');
addItem('MAX038<br>Function<br>Generator', pathAdjust + '/documents/index_d.html#max', '','',50);
addItem('Pure Henry', pathAdjust + '/documents/index_d.html#henry', '');
addItem('RIAA', pathAdjust + '/documents/index_d.html#RIAA', '');
addItem('Show report -<br>London 1998', pathAdjust + '/documents/index_d.html#show', '','',35);
addItem('Superarms', pathAdjust + '/documents/index_d.html#arms', '');
addItem('Turn your table', pathAdjust + '/documents/index_d.html#ttmotor', '');
addItem('VTA setup', pathAdjust + '/documents/index_d.html#linn','');
addItem('home', pathAdjust + '/index.html', '');

}

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);
}

// Customised optional functions
pMenu.onmouseover = function() {
  with (this) {
    with (menu[overM][overI]) if (type == 'uc:') {
      if (isDOM)
      {
        document.getElementById("nomenulink").style.visibility = "visible";
        document.getElementById("nomenulink").style.posTop = page.scrollY() * 0.75 + 2;
      }
    }
  }
}

pMenu.onmouseout = function() {
  with (this) {
    with (menu[overM][overI]) if (type == 'uc:') {
      if (isDOM)
      {
        document.getElementById("nomenulink").style.visibility = "hidden";
      }
    }
  }
}
