
// Syntaxes and Information: *** START EDITING HERE, READ THIS SECTION CAREFULLY! ***
//
// To customise use this script, there are 3 functions you need to use. Firstly, you create
// ItemStyles, which are a collection of dimensions, colours, and stylesheet class names used
// to control the appearance of menu items. The syntax is:
//
// styleName = new ItemStyle(length of items, spacing to next item, 'popout indicator HTML',
// popout indicator position, padding of text within item, 'out colour', 'over colour',
// 'out text stylesheet class', 'over text class', 'border stylesheet class');
//
// The only thing that needs explaining is the popout indicator position -- you pass a positive
// integer to position it from the left of the item, and a negative integer to position it from
// the right edge of the item -- see the example code below if that doesn't make much sense.
// ItemStyles are simply JavaScript objects (like 'window' and 'document'), and you can access
// or change any property with JS e.g. hBar.outClass = 'anotherTextClass'. See the
// construction function halfway through the menu code above for property names if you want to
// get tricky with these -- or just use them normally like so:


// 'horizontal Bar' style: items are 40px long, 10px between, no popout indicator or popout
// indicator position, 0px padding within items, a transparent background '', a hover colour
// of #669999, 'itemText' is the class used for the menu text both normally and highlighted,
// and no border class. See the '<style>' section below for the classes used...

var hBar = new ItemStyle(40, 10, '', 0, 0, '', '#669999', 'itemText', 'itemText', '');

// The 'default Blue' 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 dBlue = new ItemStyle(22, 0, '&gt;', -15, 3, '#003366', '#336699', 'itemText', 'itemHover',
 'itemBorder');

// The purplish 'crazy' style, same length but extra 1px spacing (to show up the fancy border) and
// different colours/text and less padding.

var crazy = new ItemStyle(22, 1, '&gt;', -15, 2, '#666699', '#333366', 'crazyText', 'crazyHover',
 'crazyBorder');
var main = new ItemStyle(22, 0, '&gt;', -15, 2, 'blue', '#3399CC', 'itemText', 'itemHover', 'itemBorder');
var second = new ItemStyle(22, 0, '&gt', -15, 2, 'blue', '#3399CC', 'itemText', 'itemHover', 'itemBorder');
var page = new ItemStyle(22, 0, '', 0, 2, 'Teal', 'Olive', 'itemText', 'itemHover', 'itemBorder');



// The main menu section begins with the creation of a 'new PopupMenu(...)' object, which
// includes the main creation and update functions -- this example just has one object created.
// Next, we use its startMenu() function to create the individual menus used by the script.
// They are added with the orientation, position, dimension, and default ItemStyle to use passed
// to them. The Left and Top positions are measured from the upper-left corner of its trigger
// item used to pop it out on the fly, or from the top-left corner of the page for the first
// 'root' menu. The first menu must always be named 'root', by the way, so it's always visible.
//
// startMenu('menu name', Vertical menu? (true/false), left, top, width, default ItemStyle);
//
// Finally, items themselves are passed 3 compulsory parameters -- the text, and action/URL,
// and the type of the action/target frame. All other parameters are optional -- you can override
// the menu's default ItemStyle with the item's own, and optionally override that was well with
// its own dimensions/popout indicator etc. See the example below, this is illustrated there.
//
// addItem('Text', 'URL', 'action type', optional ItemStyle, length, spacing to next item,
//  'popout indicator HTML', popout indicator position);
//
// Something that needs explaining - the Vertical Menu setup, a 'true' or 'false' without
// quotes passed as the second parameter to startMenu(). You can see most of the menus below
// are 'true', that is they are vertical, except for the first root menu. The 'length' and
// 'width' of an item depends on its orientation -- length is how long the item runs for in
// the direction of the menu, and width is the lateral dimension of the menu. Just look at
// the examples and tweak the numbers, they'll make sense eventually :).
//
// Something else - the 'action type'. This tells the script what to do with the URL. You
// leave this a blank string '' to open the URL in the current window -- the default action.
// Secondly, set this to 'js:' to specify that the URL is a JavaScript function that gets
// executed when the item is clicked. Thirdly, you can pass a string containing a valid
// reference to a window/frame, e.g. 'top.leftFrame' or 'parent.popupWin', to make the URL
// load in that frame or window when clicked -- '' is similar to <a target="main">.
//    Most importantly, you pass 'sm:' to specify that the URL is the name of a submenu to pop
// out when moused over. See the example below if this seems complicated, it's quite easy once
// you get the hang of it. Thanks to Martin J. Cole for originally suggesting the syntax!





// 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)
{

// The 'root' menu is horizontal, positioned at (x = 10, y = 0) and is 17px high, and items
// by default use the colours and dimensions in the 'hBar' ItemStyle defined above.
// *** MOVE OR CENTRE THE MENU HERE ***
// To centre it, replace the X value with a formula using a global variable defined by this script
// like winWidth, e.g: startMenu('root', false, 'winWidth/2 - 120', 0, 17, hBar);
startMenu('root', true, 'winWidth-150', 190, 110, main);
// 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.

addItem('&nbsp; Introduction', 'mIntro', 'sm:');
addItem('&nbsp; Northern Area', 'mNorth', 'sm:');
addItem('&nbsp; Nantes Area', 'mNantesA', 'sm:');
addItem('&nbsp; Southern Area', 'mSouth', 'sm:');
addItem('&nbsp; Paris', 'mParis', 'sm:');
addItem('&nbsp; Normandy', 'mNormandy', 'sm:');
addItem('&nbsp; Map of Area', 'MapFran.html', '', page);
addItem('&nbsp; Home', '../index.htm', 'parent.top', page);
addItem('&nbsp; Help', 'window.open("ifmmenuhelp.htm","window1","width=300,height=200")','js:', page);

startMenu('mIntro', true, 25, 18, 90, second);
addItem('eBook', 'window.open("ifmebook.htm","window1","width=450,height=320")','js:', page);
addItem('Introduction', 'introductory.htm', '', page);
addItem('Maps, etc', 'introductory.htm#Maps', '', page);

startMenu('mNorth', true, 25, 18, 110, second);
addItem('Montfort-sur-Meu', 'mMontfort', 'sm:');
addItem('La Bachelleraye', 'ifmnorth1.htm#Bachelleraye', '', page);
addItem('Saint-Lazare', 'mStlaz', 'sm:');
addItem('Iffendic', 'mIff', 'sm:');
addItem('Rennes', 'mRennes', 'sm:');
addItem('Bécherel', 'ifmnorth2.htm#Becherel', '', page);
addItem('Mont-St-Michel', 'ifmnorth2.htm#MontStMichel', '', page);
addItem('Dinan', 'mDinan', 'sm:');
addItem('La Chèze Area', 'mLacheze', 'sm:');

startMenu('mMontfort', true, 25, 18, 110, second);
addItem('Maison Natale', 'ifmnorth1.htm#Montfort', '', page);
addItem('Church Square', 'ifmnorth1.htm#Butte', '', page);
addItem('Saint-Jean', 'ifmnorth1.htm#StJoseph', '', page);
addItem('Town Hall', 'ifmnorth1.htm#Mairie', '', page);
addItem('Old Presbytery', 'ifmnorth1.htm#Presbytery', '', page);
addItem('Couascavre', 'ifmnorth1.htm#Couascavre', '', page);
addItem('Abbaye St-Jacques', 'ifmnorth1.htm#Abbaye', '', page);

startMenu('mStlaz', true, 25, 18, 110, second);
addItem('Heurtebise', 'ifmnorth1.htm#SaintLazare', '', page);
addItem('La Massonaye', 'ifmnorth1.htm#Massonaye', '', page);
addItem('The Hermitage', 'ifmnorth1.htm#StLazare', '', page);

startMenu('mIff', true, 25, 18, 110, second);
addItem('Parish Church', 'ifmnorth1.htm#Iffendic', '', page);
addItem('Le Bois Marquer', 'ifmnorth1.htm#Marquer', '', page);
addItem('Boucquidy', 'ifmnorth1.htm#Boucquidy', '', page);

startMenu('mRennes', true, 25, 18, 110, second);
addItem('Introduction', 'ifmnorth2.htm#Rennes', '', page);
addItem('St-Thomas', 'ifmnorth2.htm#Toussaint', '', page);
addItem('Saint-Germain', 'ifmnorth2.htm#StGermain', '', page);
addItem('Place du Calvaire', 'ifmnorth2.htm#PlCalvaire', '', page);
addItem('Hôpital St-Yves', 'ifmnorth2.htm#StYves', '', page);
addItem('Cathedral', 'ifmnorth2.htm#RennesCath', '', page);
addItem('Saint-Sauveur', 'ifmnorth2.htm#StSauveur', '', page);
addItem('Saint-Aubin', 'ifmnorth2.htm#StAubin', '', page);
addItem('Old St-Étienne', 'ifmnorth2.htm#StEtienne', '', page);
addItem('Bridge at Cesson', 'ifmnorth2.htm#Cesson', '', page);

startMenu('mDinan', true, 25, 18, 110, second);
addItem('Introduction', 'ifmnorth2.htm#Dinan', '', page);
addItem('7-9 rue de la Croix', 'ifmnorth2.htm#rueCroix', '', page);
addItem('Saint-Malo Church', 'ifmnorth2.htm#StMalo', '', page);
addItem('Rue de la Garaye', 'ifmnorth2.htm#RueGaraye', '', page);
addItem('Rue du Jerzual', 'ifmnorth2.htm#Rue Jerzual', '', page);
addItem('Saint-Sauveur', 'ifmnorth2.htm#DinanStSauveur', '', page);
addItem('Théatre Jacobins', 'ifmnorth2.htm#TheatJacob', '', page);
addItem('Château Garaye', 'ifmnorth2.htm#ChatGaraye', '', page);

startMenu('mLacheze', true, 25, 18, 110, second);
addItem('Introduction', 'ifmnorth2.htm#LaChezeArea', '', page);
addItem('La Trinité-Porhoët', 'ifmnorth2.htm#Trinite', '', page);
addItem('Plumieux', 'ifmnorth2.htm#Plumieux', '', page);
addItem('La Chèze Town', 'mLacheze2', 'sm:');

startMenu('mLacheze2', true, 25, 18, 90, second);
addItem('N-D de la Pitié', 'ifmnorth2.htm#LaCheze', '', page);
addItem('Hunting Lodge', 'ifmnorth2.htm#Rohan', '', page);

startMenu('mNantesA', true, 25, 18, 110, second);
addItem('Pontchâteau', 'ifmnantes.htm#Pontchateau', '', page);
addItem('Campbon', 'ifmnantes.htm#Campbon', '', page);
addItem('Crossac', 'ifmnantes.htm#Crossac', '', page);
addItem('Ste-Reine de B.', 'ifmnantes.htm#Reine', '', page);
addItem('Saint-Molf etc.', 'ifmnantes.htm#StMolf', '', page);
addItem('Nantes', 'mNantes', 'sm:');
addItem('St-Julien de C.', 'ifmnantes.htm#StJulien', '', page);
addItem('Vallet', 'ifmnantes.htm#Vallet', '', page);
addItem('St-Christophe, etc.', 'ifmnantes.htm#StChristophe', '', page);
addItem('Landemont', 'ifmnantes.htm#Landemont', '', page);
addItem('La Chevrolière', 'ifmnantes.htm#LaChev', '', page);
addItem('Vertou', 'ifmnantes.htm#Vertou', '', page);
addItem('Saint-Fiacre', 'ifmnantes.htm#StFiacre', '', page);
addItem('Bouguenais', 'ifmnantes.htm#Bouguenais', '', page);

startMenu('mNantes', true, 25, 18, 110, second);
addItem('Introduction', 'ifmnantes.htm#Nantes', '', page);
addItem('Saint-Clément', 'ifmnantes.htm#StClement', '', page);
addItem('Visitation Convent', 'ifmnantes.htm#Visitation', '', page);
addItem('La Gde. Providence', 'ifmnantes.htm#GdProv', '', page);
addItem('Saint-Donatien', 'ifmnantes.htm#StDonatien', '', page);
addItem('Saint-Similien', 'ifmnantes.htm#StSimilien', '', page);
addItem('La Cour Catuit', 'ifmnantes.htm#CourCatuit', '', page);
addItem('Place du Sanitat', 'ifmnantes.htm#Sanitat', '', page);
addItem('La Gde. Biesse', 'ifmnantes.htm#Biesse', '', page);

startMenu('mSouth', true, 25, 18, 110, second);
addItem('St-Laurent-sur-S.', 'mSLsS', 'sm:');
addItem('La Séguinière', 'mLaSeguin', 'sm:');
addItem('Roussay', 'ifmsouth1.htm#Roussay', '', page);
addItem('St-Amand-sur-S.', 'ifmsouth1.htm#StAmand', '', page);
addItem('Poitiers', 'mPoitiers', 'sm:');
addItem('La Rochelle', 'mLaRochelle', 'sm:');
addItem('Mervent Area', 'mMervent', 'sm:');
addItem('Saumur', 'ifmsouth3.htm#Saumur', '', page);
addItem('Fontevrault', 'mFontevrault', 'sm:');

startMenu('mSLsS', true, 25, 18, 110, second);
addItem('Introduction', 'ifmsouth1.htm#StLaurent', '', page);
addItem('Montfort & St-L.', 'ifmsouth1.htm#StStLM', '', page);
addItem('1st Montfortians', 'ifmsouth1.htm#StL1stMont', '', page);
addItem('Other Things', 'ifmsouth1.htm#StLOther', '', page);

startMenu('mLaSeguin', true, 25, 18, 110, second);
addItem('Introduction', 'ifmsouth1.htm#LaSeguin', '', page);
addItem('Parish Church', 'ifmsouth1.htm#LaSeguinChurch', '', page);
addItem('N-D de Toute Pat.', 'ifmsouth1.htm#ToutePatience', '', page);

startMenu('mPoitiers', true, 25, 18, 110, second);
addItem('Introduction', 'ifmsouth1.htm#Poitiers', '', page);
addItem('Hôpital Général', 'ifmsouth1.htm#HopGen', '', page);
addItem('Saint-Porchaire', 'ifmsouth1.htm#StPorchaire', '', page);
addItem('N-D La Grande', 'ifmsouth1.htm#NDLaGde', '', page);
addItem('Les Pénitentes', 'ifmsouth1.htm#Penitentes', '', page);
addItem('Baptistery', 'ifmsouth1.htm#Baptistery', '', page);
addItem('Sainte Radegonde', 'ifmsouth1.htm#StRadegonde', '', page);
addItem('Pont Joubert', 'ifmsouth1.htm#Joubert', '', page);
addItem('Montbernage', 'ifmsouth1.htm#Montbernage', '', page);
addItem('Jardin des 4 fig.', 'ifmsouth1.htm#Figures', '', page);

startMenu('mLaRochelle', true, 25, 18, 110, second);
addItem('Introduction', 'ifmsouth2.htm#LaRochelle', '', page);
addItem('St Éloi', 'ifmsouth2.htm#StEloi', '', page);
addItem('Le Petit Plessis', 'ifmsouth2.htm#Plessis', '', page);
addItem('Porte Royale', 'ifmsouth2.htm#PteRoyale', '', page);
addItem('Hôpital St-Louis', 'ifmsouth2.htm#HopStLou', '', page);
addItem('Port & St-Sauveur', 'ifmsouth2.htm#LaRPort', '', page);
addItem('Rue de la Rochelle', 'ifmsouth2.htm#RueRochelle', '', page);
addItem('Cathedral', 'ifmsouth2.htm#LRCath', '', page);
addItem('Bishopric', 'ifmsouth2.htm#Bishop', '', page);
addItem('Hôpital Aufrédy', 'ifmsouth2.htm#Aufredy', '', page);
addItem('Rue Rambaud, etc.', 'ifmsouth2.htm#Rue Rambaud', '', page);
addItem('Providence Chapel', 'ifmsouth2.htm#ChapProv', '', page);
addItem('Dominican Church', 'ifmsouth2.htm#ChurchDominic', '', page);

startMenu('mMervent', true, 25, 18, 110, second);
addItem('Introduction', 'ifmsouth2.htm#MerventArea', '', page);
addItem('Saint-Pompain', 'ifmsouth2.htm#StPompain', '', page);
addItem('Mervent Grotto', 'ifmsouth2.htm#Mervent', '', page);
addItem('Vouvant', 'ifmsouth2.htm#Vouvant', '', page);

startMenu('mFontevrault', true, 25, 18, 110, second);
addItem('The Abbey', 'ifmsouth3.htm#Fontevrault', '', page);
addItem('Parish Church', 'ifmsouth3.htm#FontChurch', '', page);

startMenu('mParis', true, 25, 18, 110, second);
addItem('Saint-Sulpice', 'mSulpice', 'sm:');
addItem('Notre-Dame', 'mND', 'sm:');
addItem('La Salpétrière', 'ifmsouth3.htm#LaSalPet', '', page);
addItem('Mont Valérien', 'ifmsouth3.htm#MontVal', '', page);

startMenu('mSulpice', true, 25, 18, 110, second);
addItem('Rue Férou', 'ifmsouth3.htm#Paris', '', page);
addItem('Rue du Pot de Fer', 'ifmsouth3.htm#PotDeFer', '', page);
addItem('Rue Cassette', 'ifmsouth3.htm#RueCass', '', page);
addItem('Rue Mézières', 'ifmsouth3.htm#RueMez', '', page);
addItem('The Seminary', 'ifmsouth3.htm#Seminary', '', page);
addItem('Parish Church', 'ifmsouth3.htm#StSulpice', '', page);

startMenu('mND', true, 25, 18, 110, second);
addItem('Hôtel-Dieu', 'ifmsouth3.htm#NDParis', '', page);
addItem('Archbishopric', 'ifmsouth3.htm#ParisArch', '', page);
addItem('Cathedral', 'ifmsouth3.htm#NDCath', '', page);

startMenu('mNormandy', true, 25, 18, 110, second);
addItem('Villedieu les P.', 'ifmsouth3.htm#Normandy', '', page);
addItem('Le Mesnil-Herman', 'mLeMesnil', 'sm:');

startMenu('mLeMesnil', true, 25, 18, 115, second);
addItem('"La Croix à la main"', 'ifmsouth3.htm#MesnilHerm', '', page);
addItem('Memorial Chapel', 'ifmsouth3.htm#Memorial', '', page);


// End of 'with (menu Object)' block. That's it!
}



// Here, we handle the onLoad and onResize events, calling the proper functions for each menu (or other
// script, e.g. DHTML Scroller) that needs to be notified of these events, e.g.:
// window.onevent = new Function('pMenu.update(); anotherMenu.update(); otherFunction(); .....');
// Note we also call a small 'bug check' function to stop Netscape 4 dying when you resize the window.

window.onload = new Function('pMenu.update()');
window.onresize = new Function('ns4BugCheck(); pMenu.position()');

var origWinWidth = window.innerWidth;
function ns4BugCheck()
{
 if (isNS4 && origWinWidth != window.innerWidth) location.reload()
}




