/*jslint undef: true, sloppy: true */
/*global addSubmenu, tidyPage */

// Set up Google Analytics account number
var googleAccount = "UA-375850-3";

// Build menus
function buildMenus() {
	var strHTML;

	// Menu 'walking_tips'
	strHTML  = '<li><a title="An Introduction to the Land\'s End to John o\'Groats walk" id="walking_tips_index" href="../walking_tips/index.html">An Introduction to the Walk</a></li>\n';
	strHTML += '<li><a title="General tips on planning a long-distance walk" id="walking_tips_planning_a_walk" href="../walking_tips/general_planning.html">General Planning Tips</a></li>\n';
	strHTML += '<li><a title="A list of what to take on the Land\'s End to John o\'Groats walk" id="walking_tips_what_to_take" href="../walking_tips/what_to_take.html">What to Take</a></li>\n';
	strHTML += '<li><a title="Accommodation between Land\'s End and John o\'Groats" id="walking_tips_accommodation" href="../walking_tips/accommodation.html">Accommodation</a></li>\n';
	strHTML += '<li><a title="The typical cost of walking from Land\'s End to John o\'Groats" id="walking_tips_costs" href="../walking_tips/costs.html">Costs</a></li>\n';
	strHTML += '<li><a title="Tips on whether to walk from Land\'s End to John o\'Groats or the other way round" id="walking_tips_lejog_or_jogle" href="../walking_tips/lejog_or_jogle.html"><acronym title="Land\'s End to John o\'Groats">LEJOG</acronym> or <acronym title="John o\'Groats to Land\'s End">JOGLE</acronym>?</a></li>\n';
	strHTML += '<li><a title="The maps you\'ll need to walk from Land\'s End to John o\'Groats" id="walking_tips_maps" href="../walking_tips/maps.html">Maps</a></li>\n';
	strHTML += '<li><a title="The weather I enjoyed on my walk from Land\'s End to John o\'Groats" id="walking_tips_weather" href="../walking_tips/weather.html">Weather</a></li>\n';
	strHTML += '<li><a title="Interesting statistics from my walk from Land\'s End to John o\'Groats" id="walking_tips_walking_statistics" href="../walking_tips/walking_statistics.html">Interesting Statistics</a></li>\n';
	strHTML += '<li><a title="How to prove you\'ve actually walked from Land\'s End to John o\'Groats" id="walking_tips_how_to_prove_youve_done_it" href="../walking_tips/how_to_prove_youve_done_it.html">How to Prove You\'ve Done It</a></li>\n';
	strHTML += '<li><a title="Frequently asked questions about my walk from Land\'s End to John o\'Groats" id="walking_tips_faq" href="../walking_tips/faq.html">Frequently Asked Questions</a></li>\n';
	strHTML += '<li><a title="Some useful links for those planning their own walk" id="walking_tips_links" href="../walking_tips/links.html">Useful Links</a></li>\n';
	addSubmenu('walking_tips', strHTML);

	// Menu 'route'
	strHTML  = '<li><a title="A suggested walking route from Land\'s End to John o\'Groats" id="route_index" href="../route/index.html">Overview of the Route</a></li>\n';
	strHTML += '<li><a title="Explore my route in an interactive map" id="route_google_maps" href="../route/google_maps.html">2D Route in Google Maps</a></li>\n';
	strHTML += '<li><a title="Use Google Earth to view my route in three dimensions" id="route_google_earth" href="../route/google_earth.html">3D Route in Google Earth</a></li>\n';
	addSubmenu('route', strHTML);

	// Menu 'photo_library'
	strHTML  = '<li><a title="A searchable index of all the photographs on my website" id="photo_library_index" href="../photo_library/index.php">Photo Library</a></li>\n';
	strHTML += '<li><a title="A range of free images that you can use as desktop wallpaper" id="photo_library_desktop_wallpaper" href="../photo_library/desktop_wallpaper.html">Desktop Wallpaper</a></li>\n';
	strHTML += '<li><a title="How you can use my images as your Windows or Mac OS screen saver" id="photo_library_screen_saver" href="../photo_library/screen_saver.html">Screen Saver</a></li>\n';
	addSubmenu('photo_library', strHTML);

	// Menu 'ebooks'
	strHTML  = '<li><a title="An index of all the free eBooks you can download" id="ebooks_index" href="../ebooks/index.html">Free eBooks</a></li>\n';
	addSubmenu('ebooks', strHTML);

	// Menu 'books'
	strHTML  = '<li><a title="Details of my first book, \'When I Walk, I Bounce\'" id="books_index" href="../books/index.html">Printed Books</a></li>\n';
	addSubmenu('books', strHTML);

	// Menu 'southwest_england'
	strHTML  = '<li><a title="A map of the Southwest England section of the walk" id="southwest_england_index" href="../southwest_england/index.html">Map of Southwest England</a></li>\n';
	strHTML += '<li><a title="A summary of the Southwest England section of the walk" id="southwest_england_summary" href="../southwest_england/summary.html">Summary of Southwest England</a></li>\n';
	strHTML += '<li class="menuItemHeader">The Walk</li>\n';
	strHTML += '<li><a title="The story of my walk from Land\'s End to Penzance" id="southwest_england_01_penzance" href="../southwest_england/01_penzance.html">Land\'s End to Penzance</a></li>\n';
	strHTML += '<li><a title="The story of my visit to Helston" id="southwest_england_01a_helston" href="../southwest_england/01a_helston.html">Helston</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Penzance to Pengoon Farm" id="southwest_england_02_pengoon_farm" href="../southwest_england/02_pengoon_farm.html">Penzance to Pengoon Farm</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Pengoon Farm to Truro" id="southwest_england_03_truro" href="../southwest_england/03_truro.html">Pengoon Farm to Truro</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Truro to Tregolls Farm" id="southwest_england_04_tregolls_farm" href="../southwest_england/04_tregolls_farm.html">Truro to Tregolls Farm</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Tregolls Farm to St Breward" id="southwest_england_05_st_breward" href="../southwest_england/05_st_breward.html">Tregolls Farm to St Breward</a></li>\n';
	strHTML += '<li><a title="The story of my walk from St Breward to Trecollas Farm" id="southwest_england_06_trecollas_farm" href="../southwest_england/06_trecollas_farm.html">St Breward to Trecollas Farm</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Trecollas Farm to Launceston" id="southwest_england_07_launceston" href="../southwest_england/07_launceston.html">Trecollas Farm to Launceston</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Launceston to Bridestowe" id="southwest_england_08_bridestowe" href="../southwest_england/08_bridestowe.html">Launceston to Bridestowe</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Bridestowe to South Zeal" id="southwest_england_09_south_zeal" href="../southwest_england/09_south_zeal.html">Bridestowe to South Zeal</a></li>\n';
	strHTML += '<li><a title="The story of my visit to Okehampton" id="southwest_england_09a_okehampton" href="../southwest_england/09a_okehampton.html">Okehampton</a></li>\n';
	strHTML += '<li><a title="The story of my walk from South Zeal to Crediton" id="southwest_england_10_crediton" href="../southwest_england/10_crediton.html">South Zeal to Crediton</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Crediton to Tiverton" id="southwest_england_11_tiverton" href="../southwest_england/11_tiverton.html">Crediton to Tiverton</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Tiverton to Taunton" id="southwest_england_12_taunton" href="../southwest_england/12_taunton.html">Tiverton to Taunton</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Taunton to Street" id="southwest_england_13_street" href="../southwest_england/13_street.html">Taunton to Street</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Street to Midsomer Norton" id="southwest_england_14_midsomer_norton" href="../southwest_england/14_midsomer_norton.html">Street to Midsomer Norton</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Midsomer Norton to Bath" id="southwest_england_15_bath" href="../southwest_england/15_bath.html">Midsomer Norton to Bath</a></li>\n';
	addSubmenu('southwest_england', strHTML);

	// Menu 'the_midlands'
	strHTML  = '<li><a title="A map of the Midlands section of the walk" id="the_midlands_index" href="../the_midlands/index.html">Map of the Midlands</a></li>\n';
	strHTML += '<li><a title="A summary of the Midlands section of the walk" id="the_midlands_summary" href="../the_midlands/summary.html">Summary of the Midlands</a></li>\n';
	strHTML += '<li class="menuItemHeader">The Walk</li>\n';
	strHTML += '<li><a title="The story of my walk from Bath to Old Sodbury" id="the_midlands_16_old_sodbury" href="../the_midlands/16_old_sodbury.html">Bath to Old Sodbury</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Old Sodbury to Cam" id="the_midlands_17_cam" href="../the_midlands/17_cam.html">Old Sodbury to Cam</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Cam to Painswick" id="the_midlands_18_painswick" href="../the_midlands/18_painswick.html">Cam to Painswick</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Painswick to Gloucester" id="the_midlands_19_gloucester" href="../the_midlands/19_gloucester.html">Painswick to Gloucester</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Gloucester to Tewkesbury" id="the_midlands_20_tewkesbury" href="../the_midlands/20_tewkesbury.html">Gloucester to Tewkesbury</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Tewkesbury to Worcester" id="the_midlands_21_worcester" href="../the_midlands/21_worcester.html">Tewkesbury to Worcester</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Worcester to Bewdley" id="the_midlands_22_bewdley" href="../the_midlands/22_bewdley.html">Worcester to Bewdley</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Bewdley to Pattingham" id="the_midlands_23_pattingham" href="../the_midlands/23_pattingham.html">Bewdley to Pattingham</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Pattingham to Penkridge" id="the_midlands_24_penkridge" href="../the_midlands/24_penkridge.html">Pattingham to Penkridge</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Penkridge to Abbots Bromley" id="the_midlands_25_abbots_bromley" href="../the_midlands/25_abbots_bromley.html">Penkridge to Abbots Bromley</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Abbots Bromley to Air Cottage" id="the_midlands_26_air_cottage" href="../the_midlands/26_air_cottage.html">Abbots Bromley to Air Cottage</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Air Cottage to Waterloo Inn" id="the_midlands_27_waterloo_inn" href="../the_midlands/27_waterloo_inn.html">Air Cottage to Waterloo Inn</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Waterloo Inn to Edale" id="the_midlands_28_edale" href="../the_midlands/28_edale.html">Waterloo Inn to Edale</a></li>\n';
	addSubmenu('the_midlands', strHTML);

	// Menu 'northern_england'
	strHTML  = '<li><a title="A map of the Northern section of the walk" id="northern_england_index" href="../northern_england/index.html">Map of Northern England</a></li>\n';
	strHTML += '<li><a title="A summary of the Northern section of the walk" id="northern_england_summary" href="../northern_england/summary.html">Summary of Northern England</a></li>\n';
	strHTML += '<li class="menuItemHeader">The Walk</li>\n';
	strHTML += '<li><a title="The story of my walk from Edale to Crowden" id="northern_england_29_crowden" href="../northern_england/29_crowden.html">Edale to Crowden</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Crowden to Standedge" id="northern_england_30_standedge" href="../northern_england/30_standedge.html">Crowden to Standedge</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Standedge to Hebden Bridge" id="northern_england_31_hebden_bridge" href="../northern_england/31_hebden_bridge.html">Standedge to Hebden Bridge</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Hebden Bridge to Lothersdale" id="northern_england_32_lothersdale" href="../northern_england/32_lothersdale.html">Hebden Bridge to Lothersdale</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Lothersdale to Kirkby Malham" id="northern_england_33_kirkby_malham" href="../northern_england/33_kirkby_malham.html">Lothersdale to Kirkby Malham</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Kirkby Malham to Horton-in-Ribblesdale" id="northern_england_34_horton-in-ribblesdale" href="../northern_england/34_horton-in-ribblesdale.html">Kirkby Malham to Horton</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Horton-in-Ribblesdale to Hawes" id="northern_england_35_hawes" href="../northern_england/35_hawes.html">Horton-in-Ribblesdale to Hawes</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Hawes to Keld" id="northern_england_36_keld" href="../northern_england/36_keld.html">Hawes to Keld</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Keld to Baldersdale" id="northern_england_37_baldersdale" href="../northern_england/37_baldersdale.html">Keld to Baldersdale</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Baldersdale to Middleton-in-Teesdale" id="northern_england_38_middleton-in-teesdale" href="../northern_england/38_middleton-in-teesdale.html">Baldersdale to Middleton</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Middleton-in-Teesdale to Langdon Beck" id="northern_england_39_langdon_beck" href="../northern_england/39_langdon_beck.html">Middleton to Langdon Beck</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Langdon Beck to Dufton" id="northern_england_40_dufton" href="../northern_england/40_dufton.html">Langdon Beck to Dufton</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Dufton to Alston" id="northern_england_41_alston" href="../northern_england/41_alston.html">Dufton to Alston</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Alston to Haltwhistle" id="northern_england_42_haltwhistle" href="../northern_england/42_haltwhistle.html">Alston to Haltwhistle</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Haltwhistle to Bellingham" id="northern_england_43_bellingham" href="../northern_england/43_bellingham.html">Haltwhistle to Bellingham</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Bellingham to Byrness" id="northern_england_44_byrness" href="../northern_england/44_byrness.html">Bellingham to Byrness</a></li>\n';
	addSubmenu('northern_england', strHTML);

	// Menu 'southern_scotland'
	strHTML  = '<li><a title="A map of the Southern Scotland section of the walk" id="southern_scotland_index" href="../southern_scotland/index.html">Map of Southern Scotland</a></li>\n';
	strHTML += '<li><a title="A summary of the Southern Scotland section of the walk" id="southern_scotland_summary" href="../southern_scotland/summary.html">Summary of Southern Scotland</a></li>\n';
	strHTML += '<li class="menuItemHeader">The Walk</li>\n';
	strHTML += '<li><a title="The story of my walk from Byrness to Jedburgh" id="southern_scotland_45_jedburgh" href="../southern_scotland/45_jedburgh.html">Byrness to Jedburgh</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Jedburgh to Melrose" id="southern_scotland_46_melrose" href="../southern_scotland/46_melrose.html">Jedburgh to Melrose</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Melrose to Peebles" id="southern_scotland_47_peebles" href="../southern_scotland/47_peebles.html">Melrose to Peebles</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Peebles to West Linton" id="southern_scotland_48_west_linton" href="../southern_scotland/48_west_linton.html">Peebles to West Linton</a></li>\n';
	strHTML += '<li><a title="The story of my walk from West Linton to Edinburgh" id="southern_scotland_49_edinburgh" href="../southern_scotland/49_edinburgh.html">West Linton to Edinburgh</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Edinburgh to Linlithgow" id="southern_scotland_50_linlithgow" href="../southern_scotland/50_linlithgow.html">Edinburgh to Linlithgow</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Linlithgow to Kilsyth" id="southern_scotland_51_kilsyth" href="../southern_scotland/51_kilsyth.html">Linlithgow to Kilsyth</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Kilsyth to Drymen" id="southern_scotland_52_drymen" href="../southern_scotland/52_drymen.html">Kilsyth to Drymen</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Drymen to Rowardennan" id="southern_scotland_53_rowardennan" href="../southern_scotland/53_rowardennan.html">Drymen to Rowardennan</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Rowardennan to Inverarnan" id="southern_scotland_54_inverarnan" href="../southern_scotland/54_inverarnan.html">Rowardennan to Inverarnan</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Inverarnan to Tyndrum" id="southern_scotland_55_tyndrum" href="../southern_scotland/55_tyndrum.html">Inverarnan to Tyndrum</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Tyndrum to Kings House" id="southern_scotland_56_kings_house" href="../southern_scotland/56_kings_house.html">Tyndrum to Kings House</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Kings House to Kinlochleven" id="southern_scotland_57_kinlochleven" href="../southern_scotland/57_kinlochleven.html">Kings House to Kinlochleven</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Kinlochleven to Fort William" id="southern_scotland_58_fort_william" href="../southern_scotland/58_fort_william.html">Kinlochleven to Fort William</a></li>\n';
	addSubmenu('southern_scotland', strHTML);

	// Menu 'northern_scotland'
	strHTML  = '<li><a title="A map of the Northern Scotland section of the walk" id="northern_scotland_index" href="../northern_scotland/index.html">Map of Northern Scotland</a></li>\n';
	strHTML += '<li><a title="A summary of the Northern Scotland section of the walk" id="northern_scotland_summary" href="../northern_scotland/summary.html">Summary of Northern Scotland</a></li>\n';
	strHTML += '<li class="menuItemHeader">The Walk</li>\n';
	strHTML += '<li><a title="The story of my walk from Fort William to South Laggan" id="northern_scotland_59_south_laggan" href="../northern_scotland/59_south_laggan.html">Fort William to South Laggan</a></li>\n';
	strHTML += '<li><a title="The story of my walk from South Laggan to Alltsigh" id="northern_scotland_60_alltsigh" href="../northern_scotland/60_alltsigh.html">South Laggan to Alltsigh</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Alltsigh to Drumnadrochit" id="northern_scotland_61_drumnadrochit" href="../northern_scotland/61_drumnadrochit.html">Alltsigh to Drumnadrochit</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Drumnadrochit to Inverness" id="northern_scotland_62_inverness" href="../northern_scotland/62_inverness.html">Drumnadrochit to Inverness</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Inverness to Dingwall" id="northern_scotland_63_dingwall" href="../northern_scotland/63_dingwall.html">Inverness to Dingwall</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Dingwall to Alness" id="northern_scotland_64_alness" href="../northern_scotland/64_alness.html">Dingwall to Alness</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Alness to Dornoch" id="northern_scotland_65_dornoch" href="../northern_scotland/65_dornoch.html">Alness to Dornoch</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Dornoch to Brora" id="northern_scotland_66_brora" href="../northern_scotland/66_brora.html">Dornoch to Brora</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Brora to Helmsdale" id="northern_scotland_67_helmsdale" href="../northern_scotland/67_helmsdale.html">Brora to Helmsdale</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Helmsdale to Dunbeath" id="northern_scotland_68_dunbeath" href="../northern_scotland/68_dunbeath.html">Helmsdale to Dunbeath</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Dunbeath to Wick" id="northern_scotland_69_wick" href="../northern_scotland/69_wick.html">Dunbeath to Wick</a></li>\n';
	strHTML += '<li><a title="The story of my walk from Wick to John o\'Groats" id="northern_scotland_70_john_o_groats" href="../northern_scotland/70_john_o_groats.html">Wick to John o\'Groats</a></li>\n';
	addSubmenu('northern_scotland', strHTML);

	// Menu 'about_me'
	strHTML  = '<li><a title="Some general information about me" id="about_me_index" href="../about_me/index.html">About Me</a></li>\n';
	strHTML += '<li><a title="Details of my various walks" id="about_me_my_walks" href="../about_me/my_walks.html">My Walks</a></li>\n';
	strHTML += '<li><a title="A not terribly serious look at why I walk" id="about_me_why_i_walk" href="../about_me/why_i_walk.html">Why I Walk</a></li>\n';
	addSubmenu('about_me', strHTML);

	// Menu 'about_site'
	strHTML  = '<li><a title="Who did what on this site, and with which pieces of software" id="about_site_site_credits" href="../about_site/site_credits.html">Site Credits</a></li>\n';
	strHTML += '<li><a title="For those who want to use my content on their own websites" id="about_site_using_my_content" href="../about_site/using_my_content.html">Using My Content on Your Site</a></li>\n';
	strHTML += '<li><a title="Some helpful tips on using this site" id="about_site_using_this_site" href="../about_site/using_this_site.html">Using this Site</a></li>\n';
	strHTML += '<li><a title="An accessibility statement for this site" id="about_site_accessibility" href="../about_site/accessibility.html">Accessibility Statement</a></li>\n';
	addSubmenu('about_site', strHTML);

	// Menu 'guestbook'
	strHTML  = '<li><a title="Feel free to view my Guestbook" id="guestbook_index" href="../guestbook/viewforum.php?f=1" accesskey="9">View My Guestbook</a></li>\n';
	strHTML += '<li><a title="If you\'d like to sign my Guestbook, I\'d be delighted!" id="guestbook_sign" href="../guestbook/posting.php?mode=newtopic&f=1">Sign My Guestbook</a></li>\n';
	strHTML += '<li><a title="You can send me a private message, if you would prefer" id="guestbook_private" href="../guestbook/posting.php?mode=newtopic&f=2">Send Me a Private Message</a></li>\n';
	strHTML += '<li><a title="Some nice (and nasty) comments taken from my Guestbook" id="guestbook_site_testimonials" href="../guestbook/site_testimonials.html">Site Testimonials</a></li>\n';
	addSubmenu('guestbook', strHTML);

	// Menu 'search'
	strHTML  = '<li><a title="An advanced search engine, so you can find exactly what you\'re after" id="search_index" href="../cgi-bin/search.cgi">Search</a></li>\n';
	strHTML += '<li><a title="An index of every single page on this site" id="search_site_map" href="../search/site_map.html">Site Map</a></li>\n';
	addSubmenu('search', strHTML);

	// Tidy up page
	tidyPage();
}

