  
// 'horizontal Bar' style: menu items that use this ItemStyle are 40px wide, have 10px gaps
// between them, no popout indicator (the ">" in some menus) or popout indicator position,
// 0px padding of the text within items, #336699 background colour, a hover colour of #6699CC,
// 'highText' is the stylesheet class used for the menu text both normally and when highlighted,
// no border styles, 'null' means fully opaque items (set them to numbers between 0 and 100 to
// enable semitranslucency), and the 'hand'/'default' cursors are used for linked/submenu items.
var hBar = new ItemStyle(40, 0, '', 0, 0, '#99FF99', '#99FF99', 'lowText', 'highText', 
'', '', null, null , 'hand', 'default');

// The 'sub Menu' items: these have popout indicators of "Greater Than" signs ">" 15px from their
// right edge, and CSS borders. Text class also changes on mouseover.
var subM = new ItemStyle(22, 0, '', -15, 3, '#99FF99', '#CCFFCC', 'lowText', 'lowText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');


// Create a PopupMenu() object, and pass its own name so it can reference itself later on.
// We also use a 'with' block to work with its properties and functions below.

var pMenu = new PopupMenu('pMenu');
with (pMenu)
{

// Here's what the values in the next startMenu() command mean, in order:
//  'root': the name of this menu.
//   false: orientated as a horizontal menu (true creates a vertical menu).
//      10: the 'left' offset of this menu in pixels.
//       0: the 'top' offset of this menu in pixels.
//      17: the height of this menu (for vertical menus, this becomes the menu width).
//    hBar: the ItemStyle used to give this menu colours and layout/formatting.
//      '': this menu does not display within a frame (see the Frameset Example Script to do that).
//   false: this menu shows submenus on mouseover. 'true' means show on click.
//
// Most of the items are 'sm:' items popping out submenus, except the last 'js:' JavaScript command
// to pop open a new window. I've also given each item a length in pixels, overriding the ItemStyle.

startMenu('root', false, 100, 5, 20, hBar, '', false);
addItem(' Back to Website ',      '/index.htm', '', null, 300);
//addItem(' About Lyme ' , 'info', 'sm:', null, 90);
//addItem(' Conferences ' , 'conf', 'sm:', null, 90);
//addItem(' Articles ' , 'articles', 'sm:', null, 70);
//addItem(' Images ' , 'images', 'sm:', null, 70);
//addItem(' Contact Us ' ,  'contact', 'sm:', null, 90);
//*addItem(' Donations ' , '/donations.htm', '', null, 90);
//addItem(' Donations '  , 'donations', 'sm:', null, 90);
//addItem(' Links ' , 'links', 'sm:', null, 90);




// This is a vertical menu positioned 0px across and 22px down from its trigger, and is 80px wide.
// The URLs are set to # here, be sure to replace them with your path/file names or JS functions!
// Also note how the types are '', indicating these links open in the current frame/window.


//startMenu('mmenu1', true, 0, 22, 80, subM, '', false);
//addItem(' Menu 1 ', 'dummy.htm', '');
//addItem(' Menu 2 ', 'dummy.htm', '');
//addItem(' Menu 3 ', 'mside1', 'sm:');
//addItem(' Menu 4 ', 'dummy.htm', '');

//startMenu('mside1', true, 80, 0, 80, subM, '', false);
//addItem(' Menu 1 ', 'temp.htm', '');
//addItem(' Menu 2 ', 'temp.htm', '');
//addItem(' Menu 3 ', 'temp.htm', '');
//addItem(' Menu 4 ', 'temp.htm', '');

startMenu('donations', true, 0, 22, 190, subM, '', false);
addItem(' Make A Donation ' , '/donations.htm', '' );
addItem(' Run A Sponsored Event ' , '/donations/event.htm', '' );
//addItem(' Sponsor Someone ' , '/donations/hunter/index.htm', '' );

startMenu('links', true, 0, 22, 150, subM, '', false);
addItem(' Recommended ', '/links/links01.htm', '');
addItem(' Organisations ', '/links/links02.htm', '');
addItem(' International ', '/links/links08.htm', '');
addItem(' Research & Clinics ', '/links/links07.htm', '');
addItem(' Lyme Sites ', '/links/links03.htm', '');
addItem(' Patient Stories ', '/links/links06.htm', '');
addItem(' Tick-Borne Diseases ', '/links/links09.htm', '');
addItem(' Google Scholar ', '/links/links05.htm', '');
addItem(' Other ', '/links/links04.htm', '');

startMenu('conf', true, 0, 22, 150, subM, '', false);
//addItem(' 2010 Details ', '/conference.htm', '');
//addItem(' 2009 Directions ', '/conference/location.htm', '');
//addItem(' 2009 Poster ', '/conference/poster.pdf', '');
//addItem(' 2008 Detailed Poster ', '/conference/poster1.pdf', '');
//addItem(' 2010 Booking ', '/booking/booking.shtml', '');
//addItem(' Professionals ', '/conference/advert.htm', '');
addItem(' Programme', 'programme', 'sm:');
addItem(' Speakers', 'speakers', 'sm:');
addItem(' Presentations', 'transcript', 'sm:');
//addItem(' FAQ ', '/conference/faq.htm', '');
addItem(' Photos', 'photos', 'sm:');

startMenu('programme', true, 150, 0, 110, subM, '', false);
addItem(' Programmes ', '/conference.htm', '');
addItem(' 2010 ', '/conf2010/programme.pdf', '');
addItem(' 2009 ', '/conf2009/programme.pdf', '');
addItem(' 2008 ', '/conf2008/programme.pdf', '');
addItem(' 2007 ', '/conf2007/index.htm', '');
addItem(' 2006 ', '/conf2006/index.htm', '');
addItem(' 2005 ', '/conference/prog05.htm', '');

startMenu('speakers', true, 150, 0, 80, subM, '', false);
addItem(' 2010 ', '/conf2010/speakers.pdf', '');
addItem(' 2009 ', '/conf2009/speakers.pdf', '');
addItem(' 2008 ', '/conf2008/speakers.pdf', '');
addItem(' 2007 ', '/conf2007/speakers.htm', '');
addItem(' 2006 ', '/conf2006/speakers.htm', '');
addItem(' 2005 ', '/conf2005/speakers.htm', '');


startMenu('transcript', true, 150, 0, 110, subM, '', false);
addItem(' Presentations', '/conf2010/index.htm', '');
addItem(' 2010', '/conf2010/index.htm', '');
addItem(' 2008', '/conf2008/index.htm', '');
addItem(' 2007', '/conf2007/index.htm', '');
addItem(' 2006', '/conf2006/transcripts.htm', '');
addItem(' 2005', '/conf2005/transcripts.htm', '');
addItem(' 2004', '/conference/prog04.htm', '');
addItem(' 2003', '/conference/2003_index.htm', '');
addItem(' 2001', '/conference/2001_index.htm', '');

startMenu('photos', true, 150, 0, 70, subM, '', false);
addItem(' Photos', '/images/conf07.php', '');
addItem(' 2007 ', '/images/conf07.php', '');
addItem(' 2006 ', '/images/conf06.php', '');
addItem(' 2005 ', '/images/conf05.php', '');
addItem(' 2004 ', '/lymepix/index.html', '');
addItem(' 2003 ', '/images/conf03.php', '');
addItem(' 2001 ', '/images/conf01.php', '');


startMenu('articles', true, 0, 22, 130, subM, '', false);
addItem(' Guidelines ', '/articles/articles03.htm', '');
addItem(' Recommended ', '/articles/articles01.htm', '');
addItem(' Hypotheses', '/articles/articles04.htm', '');
addItem(' Paediatric Lyme', '/articles/paediatric.htm', '');
addItem(' Find Technical', '/articles/technical.htm', '');
addItem(' Acronyms', '/articles/acronyms.htm', '');
addItem(' Lancet', '/articles/lancet.htm', '');
addItem(' News ', '/news.htm', '');
addItem(' E-patients', '/articles/epatient.htm', '');
addItem(' Abstracts', '/articles/abstracts.htm', '');
addItem(' Persistence', '/articles/persistence.htm', '');

startMenu('images', true, 0, 22, 150, subM, '', false);
addItem(' Spirochetes ', '/image/spirochetes.htm', '');
addItem(' EM Rash ', '/image/em.htm', '');
addItem(' ACA ', '/image/aca.htm', '');
addItem(' UK Ticks ', '/images/tickuk.php', '');
addItem(' Other Ticks ', '/images/tick.php', '');
addItem(' Other Tick Websites ', '/image/tick.htm', '');
addItem(' Tick Animation ', '/image/tick_animation.htm', '');

startMenu('contact', true, 0, 22, 130, subM, '', false);
addItem(' About Us ' , '/aboutus.htm', '');
addItem(' Contact Us ' , '/contact.htm', '');
addItem(' Newsletters', 'letters', 'sm:');
addItem(' Press Releases ', '/releases/releases.htm', '');
addItem(' Press Images ', '/information/images.htm', '');

startMenu('letters', true, 130, 0, 80, subM, '', false);
addItem(' Feb 2011', 'window.open("http://www.lymediseaseaction.org.uk/newsletters/news0211.pdf")',    'js:');
addItem(' Nov 2010', 'window.open("http://www.lymediseaseaction.org.uk/newsletters/news1110.pdf")',    'js:');
addItem(' Aug 2010', 'window.open("http://www.lymediseaseaction.org.uk/newsletters/news0810.pdf")',    'js:');
addItem(' May 2010', 'window.open("http://www.lymediseaseaction.org.uk/newsletters/news0510.pdf")',    'js:');
addItem(' Feb 2010', 'window.open("http://www.lymediseaseaction.org.uk/newsletters/news0210.pdf")',    'js:');
addItem(' Nov 2009', 'window.open("http://www.lymediseaseaction.org.uk/newsletters/news1109.pdf")',    'js:');
addItem(' Aug 2009', 'window.open("http://www.lymediseaseaction.org.uk/newsletters/news0809.pdf")',    'js:');




startMenu('info', true, 0, 22, 180, subM, '', false);
addItem(' LDA Leaflets and Posters ' , '/leaflets/index.htm', '');
//addItem(' LDA Posters ' , '/leaflets/index.htm', '');
//addItem(' LDA Poster ' , 'window.open("http://www.lymediseaseaction.org.uk/leaflets/tickposter01.pdf")',    'js:');
addItem(' Lyme Disease FAQ ' , '/lyme.htm', '');
addItem(' Neurology and Psychiatry ' , '/leaflets/lda002.htm', '');
addItem(' Tick Information' , '/ticks.htm', '');
addItem(' Lyme Bullet Points ' , '/basics.htm', '');
addItem(' How is Lyme Diagnosed ' , '/diagnose.htm', '');
addItem(' How is Lyme Treated ' , '/treatment.htm', '');
addItem(' Symptoms A to Z ', '/symptoms.php', '');
addItem(' Differential Diagnosis ', '/differential.php', '');
addItem(' Tick Removal ', '/information/tick_removal.htm', '');



// End of 'with (pMenu)' block. That's one menu object created!

}

var sMenu = new PopupMenu('sMenu');
with (sMenu)
{


//startMenu('root1', false, 100, 25, 20, hBar, '', false);
//addItem(' Shop ' , '/shop/index.htm', '', null, 200);
//addItem(' Lobby for Lyme ', 'lobby', 'sm:', null, 130);
//addItem(' Perspectives ', 'perspectives', 'sm:', null, 130);
//addItem(' Buy a Tick Remover ' , '/shop/index.htm', '', null, 140);


startMenu('lobby', true, 0, 22, 210, subM, '', false);
addItem(' Why ' , '/lobby/why.htm ', '');
addItem(' What can you do ' , '/lobby/you.htm ', '');
addItem(' Awareness ' , '/lobby/awareness.htm ', '');
addItem(' Guidelines ' , '/lobby/actionguidelines.htm ', '');
addItem(' Research ' , '/lobby/actionresearch.htm ', '');
addItem(' Work So Far ' , '/lobby/action.htm ', '');
addItem(' Misleading Information ' , '/lobby/information.htm ', '');



//addItem(' Summary ' , '/lobby/lobby.htm ', '');
//addItem(' Details', 'details', 'sm:');
//addItem(' How ', 'how', 'sm:');
//addItem(' Feedback ', 'feed', 'sm:');
//addItem(' LDA Letters To Government  ', 'ldares', 'sm:');
//addItem(' Parliament ', 'par', 'sm:');
//addItem(' 10 Steps ' , 'steps', 'sm:');
//addItem(' Index ' , '/lobby/index.htm ', '');

startMenu('details', true, 210, 0, 180, subM, '', false);
addItem(' Increasing ' , '/lobby/increase.htm', '');
addItem(' Chronic ' , '/lobby/chronic.htm', '');
addItem(' Misdiagnosed ' , '/lobby/misdiagnosis.htm', '');
addItem(' In the UK ' , '/lobby/uk.htm', '');
addItem(' Research ' , '/lobby/research.htm', '');
addItem(' EDM ' , '/lobby/edm.htm', '');
addItem(' 10 Steps ' , '/lobby/government.htm', '');

startMenu('how', true, 210, 0, 190, subM, '', false);
addItem(' Writing to your MP ' , '/lobby/write.htm', '');
addItem(' Visiting your MP ' , '/lobby/visit.htm', '');
addItem(' Help for letters ' , '/lobby/hints.htm', '');
addItem(' Initial Sample letters ' , '/lobby/letters.htm', '');
addItem(' Second Round letters ' , '/lobby/sampleletters.htm', '');
addItem(' Second Round ' , '/lobby/intro.htm', '');
addItem(' Blumenthal letter ' , '/lobby/letterblumenthal.htm', '');
addItem(' E-Petition ' , '/news/petition.htm', '');
addItem(' What happens next ' , '/lobby/next.htm', '');
addItem(' Useful information ' , '/lobby/info.htm', '');
addItem(' Press releases ' , '/releases/releases.htm', '');

startMenu('feed', true, 210, 0, 220, subM, '', false);
addItem(' Contact Us   ' , '/lobby/feedback.htm', '');
addItem(' Progress ' , '/lobby/display.php?page=list', '');
addItem(' Google Earth map of progress   ' , '/lobby/earth.htm', '');

startMenu('par', true, 210, 0, 180, subM, '', false);
addItem(' Questions ' , '/lobby/question.htm', '');
addItem(' Responses ' , '/lobby/answer.htm', '');

startMenu('ldares', true, 210, 0, 300, subM, '', false);
addItem(' D of H ' , '/releases/doh.htm', '');
addItem(' HPA ' , 'window.open("http://www.lymediseaseaction.org.uk/releases/hpa.pdf")',    'js:');
addItem(' 19/02/07 - Patricia Hewitt MP ' , '/releases/lda_24.htm', '');
addItem(' 29/03/07 ------ Government Response ' , '/lobby/gov_response.htm', '');
addItem(' 29/03/07 ------ Government Abridged Response ' , '/lobby/gov_response_short.htm', '');
addItem(' 10/05/07 - Caroline Flint MP - Full ' , '/releases/flint.htm', '');
addItem(' 10/05/07 - Caroline Flint MP - Abridged ' , '/releases/flint_abridged.htm', '');
addItem(' 15/06/07 ------ Government Response ' , '/releases/flintjune07.htm', '');
addItem(' 17/10/07 - Alan Johnson MP ' , '/releases/johnsonoct07.htm', '');
addItem(' 22/11/07 ------ Government Response ' , '/releases/response1107.htm', '');
addItem(' Other Responses ' , '/lobby/response.htm', '');

startMenu('steps', true, 210, 0, 180, subM, '', false);
addItem(' LDA Requests ' , '/lobby/government.htm', '');
addItem(' Government Response ' , '/lobby/gov_response.htm', '');


startMenu('perspectives', true,  0, 22, 180, subM, '', false);
addItem(' Misleading Information ' , '/lobby/information.htm ', '');
addItem(' IDSA Review ' , '/releases/lda_40.htm', '');
addItem(' Research ' , '/jla/research.htm', '');

// End of 'with (sMenu)' block. That's one menu object created!

}



// ******************** 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.





// 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,"#333333",6,6,-4,-4], [40,"#666666",4,4,0,0]);
addDropShadow(pMenu, window.subBlank,
 [40,"#333333",6,6,-4,-4], [40,"#666666",4,4,0,0]);

addDropShadow(sMenu, window.subM,
 [40,"#333333",6,6,-4,-4], [40,"#666666",4,4,0,0]);
addDropShadow(sMenu, window.subBlank,
 [40,"#333333",6,6,-4,-4], [40,"#666666",4,4,0,0]);



// ANIMATION SETTING: 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, 30)');
 pMenu.hideMenu = new Function('mN','menuAnim(this, mN, -15)');

 sMenu.showMenu = new Function('mN','menuAnim(this, mN, 30)');
 sMenu.hideMenu = new Function('mN','menuAnim(this, mN, -15)');

 // 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, -15)');
}







// ******************** FUNCTIONS CALLED BY THE EFFECTS SECTION ********************

// These can be deleted if you're not using them. Alternatively, if you're using several menu
// data files, you may want to move them to the "core" script file instead.


// Animation:
//
// Each menu object you create by default shows and hides its menus instantaneously.
// However you can override this behaviour with custom show/hide animation routines,
// as we have done in the "Menu Effects" section. Feel free to edit this, or delete
// this entire function if you're not using it. Basically, make functions to handle
// menuObj.showAnim() and .hideAnim(), both of which are passed menu names.
//
// Customisers: My lyr.clip() command gets passed the parameters (x1, y1, x2, y2)
// so you might want to adjust the direction etc. Oh, and I'm adding 2 to the dimensions
// to be safe due to different box models in some browsers.
// Another idea: add some if/thens to test for specific menu names...?

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)
 {
  // Stop any existing animation.
  clearTimeout(timer);

  // If the litNow() array doesn't show this menu as lit, and we're still showing it,
  // force a quick hide (this stops miscellaneous timer errors).
  //if (dir>0 && !menuObj.litNow[menuObj.menu[menuName][0].parentMenu]) dir = -100;

  // If the layer doesn't exist (cross-frame navigation) quit.
  if (!lyr || !lyr.ref) return;
  // This next line is not strictly necessary, but it stops the one-in-a-hundred menu that
  // shows and doesn't hide on very quick mouseovers.
  if (!visNow && dir>0) dir = 0-dir;
  // Show the menu if that's what we're doing.
  if (dir>0) lyr.vis('visible');
  // Also raise showing layers above hiding ones.
  lyr.sty.zIndex = dir>0 ? mD.zIndex + 1 : 1001;

  // Alpha fade in IE5.5+. Mozilla's opacity (pre-v1.7) isn't well suited as it's an inheritable
  // property rather than a block-level filter, and it's slow, but uncomment and try it perhaps.
  // WARNING: This looks funny if you're mixing opaque and translucent items e.g. solid menus
  // with dropshadows. If you're going to use it, either disable dropshadows or set the opacity
  // values for your items to numbers instead of null.
  //if (isIE && window.createPopup) lyr.alpha(counter&&(counter<100) ? counter : null);

  // Clip the visible area. The syntax is:   lyr.clip(left, top, right, bottom);
  // As you can see in these examples, three are static at either zero or the edge of a menu item,
  // and either the top or bottom is a complicated formula based on the 'counter' variable which
  // counts from 0 to 100 and back again; this give a nice accelerating-sliding animation.
  // Feel free to experiment with your own animations, here are some samples (use one only):

  // Straightforward downwards clipping animation (default setting):
  lyr.clip(0, 0, menuW+2, (menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75) );
  // If you want, comment out the above line and enable this one to animate bottom-upwards:
  //lyr.clip(0, (menuH+2)-(menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75), menuW+2, menuH+2);
  // Another alternative: Move+clip sliding animation. Looks really cool :).
  //if (!counter) mD.origY = lyr.y();
  //var newY = (menuH+2)-(menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75);
  //lyr.clip(0, newY, menuW+2, menuH+2);
  //lyr.y(mD.origY - newY);

  // Increment the counter and if it hasn't reached the end (counter is 0% or 100%),
  // set the timer to call the animation function again in 40ms to contine the animation.
  // Note that we hide the menu div on animation end in that direction.
  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);
 }
};




// Borders and Dropshadows:
//
// Here's the menu border and dropshadow functions we call above. Edit ot delete if you're
// not using them. Basically, they assign a string to pMenu.menu.menuName[0].extraHTML, which
// is written to the document with the menus as they are created -- the string can contain
// anything you want, really. They also adjust the menu dimensions and item positions
// to suit. Dig out the Object Browser script and open up "pMenu" for more info.


function addDropShadow(mObj, iS)
{
 // Pretty similar to the one above, just loops through list of extra parameters making
 // dropshadow layers (from arrays) and extending the menu dimensions to suit.
 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];
   // Safari 1.2 bug: it inherits alpha values SIDEWAYS!?!? What were they thinking?
   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;
 }
};
