// Cascading Popup Menus v5.2 - Single Frame Menu example script.


// If you're upgrading from v5.1, you can paste your existing menu data in, and if you're
// upgrading from v5.0 you need to add 'cursor' settings to your ItemStyles.
//
// And before going ANY further, you must have READ and AGREE TO the script license!
// It can be found on my site, in the syntax helpfile, or in the demo script document.


// '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(100, 10, '', 0, 0, '#84ABA2', '#84ABA2', 'mainnav_off', 'mainnav_on', '', '',
 null, null, 'default', '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, '#84ABA2', '#84ABA2', 'subnav_off', 'subnav_on',
 'itemBorder', 'itemBorder', null, null, 'default', 'default');

// 'subBlank' is similar, but has an 'off' border the same colour as its background so it
// appears borderless when dim, and 1px spacing between items to show the hover border.
var subBlank = new ItemStyle(22, 1, '&gt;', -15, 3, '#CCCCDD', '#6699CC', 'lowText', 'highText',
 'itemBorderBlank', 'itemBorder', null, null, 'hand', 'default');

// The purplish 'button' style also has 1px spacing to show up the fancy border, and it has
// different colours/text and less padding. They also have translucency set -- these items
// are 80% opaque when dim and 95% when highlighted. It uses the 'crosshair' cursor for items.
var button = new ItemStyle(22, 1, '&gt;', -15, 2, '10#006633', '10#CC6600', 'buttonText', 'buttonHover',
 'buttonBorder', 'buttonBorderOver', 80, 95, 'crosshair', '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, 340, 52, 17, hBar, '', false);
addItem('&nbsp; home', '../index.html', '', null, 50);
addItem('&nbsp; about us', 'mabout', 'sm:', null, 70);
addItem('&nbsp; living', 'mliving', 'sm:', null, 50);
addItem('&nbsp; working', 'mworking', 'sm:', null, 55);
addItem('&nbsp; who&#39;s who', 'mwho', 'sm:', null, 90);
addItem('&nbsp; resources', 'mresources', 'sm:', null, 90);

startMenu('mabout', true, 0, 20, 130, subM, '', false);
addItem('location', '../location.html', '');
addItem('vision', '../vision.html', '');
addItem('beliefs', '../belief.html', '');
addItem('values', '../values.html', '');
addItem('history', '../history.html', '');
addItem('giving', '../giving.html', '');

startMenu('mliving', true, 0, 20, 175, subM, '', false);
addItem('Sunday services', '../sunday.html', '');
addItem('term program', '../sunday_term.html', '');
addItem('Sunday school and cr&egrave;che', '../sunday_school.html', '');
addItem('growth groups', '../fellowship.html', '');
addItem('christianity explored', '../ce.html', '');
addItem('discipleship explored', '../de.html', '');
addItem('events', '../sunday_events.html', '')
addItem('download sermons', '../sermons.html', '');
addItem('links', '../links.html', '');
addItem('world and a teacup', '../waat.html', '');

startMenu('mworking', true, 0, 20, 150, subM, '', false);
addItem('lunchtime services', '../wednesday.html', '');
addItem('term program', '../wednesday_term.html', '')
addItem('communion', '../communion.html', '');
addItem('partnership groups', '../partnership.html', '');
addItem('christianity explored', '../ce.html', '');
addItem('events', '../wednesday_events.html', '')
addItem('download talks', '../talks.html', '');
addItem('links', '../links.html', '');
addItem('workplace fellowship', '../workplace.html', '');

startMenu('mwho', true, 0, 20, 130, subM, '', false);
addItem('contact us', '../contact.html', '');
addItem('staff', '../staff.html', '');
addItem('committee', 'committee.html', '');
addItem('trustees', '../trust.html', '');
addItem('mission partners', '../partners.html', '');

startMenu('mresources', true, 0, 20, 100, subM, '', false);
addItem('download talks', 'http://stpetersbarge.org/media/media.php?type=talk&orderby=date', '');
addItem('links', '../links.html', '');
addItem('staff blog', 'http://stpetersbarge.blogspot.com/', '');
addItem('books', '../reviews.html', '');



}

