NavbarItems = Array(3);
NavbarItems[0] = Array(
 Array('71',1, Array(
   Array('72',1, null,'<br>HOME','http://www.lochaber-news.co.uk/','','',0)),'','','','',0),
 Array('3',1, Array(
   Array('39',1, null,'Local News','http://www.lochaber-news.co.uk/news/categoryfront.php/id/39/Local_News.html','','',0),
   Array('40',1, null,'Regional News','http://www.lochaber-news.co.uk/news/categorypool.php/id/1','','',0)),'NEWS','http://www.lochaber-news.co.uk/news/categoryfront.php/id/3/NEWS.html','','',0),
 Array('11',1, Array(
   Array('41',1, Array(
     Array('50',1, null,'Football','http://www.lochaber-news.co.uk/news/categoryfront.php/id/50/Football.html','','',0),
     Array('129',1, null,'Shinty','http://www.lochaber-news.co.uk/news/categoryfront.php/id/129/Shinty.html','','',0)),'Local Sport','http://www.lochaber-news.co.uk/news/categoryfront.php/id/41/Local_Sport.html','','',0),
   Array('42',1, null,'Regional Sport','http://www.lochaber-news.co.uk/news/categorypool.php/id/2','','',0),
   Array('337',1, null,'Turf Talking','http://www.lochaber-news.co.uk/news/categoryfront.php/id/337/Turf_Talking.html','','',0)),'SPORT','http://www.lochaber-news.co.uk/news/categoryfront.php/id/11/SPORT.html','','',0),
 Array('12',1, Array(
   Array('344',1, null,'Council Insight','http://www.lochaber-news.co.uk/news/categoryfront.php/id/344/Council_Insight.html','','',0),
   Array('38',1, null,'Letters','http://www.lochaber-news.co.uk/news/categoryfront.php/id/38/Letters.html','','',0),
   Array('119',1, null,'The Big Vote','http://www.lochaber-news.co.uk/news/categoryfront.php/id/119/The_Big_Vote.html','','',0)),'OPINION','http://www.lochaber-news.co.uk/news/categoryfront.php/id/12/OPINION.html','','',0),
 Array('13',1, Array(
   Array('60',1, null,'A Country Diary','http://www.lochaber-news.co.uk/news/categoryfront.php/id/60/A_Country_Diary.html','','',0),
   Array('341',1, null,'Featured Articles','http://www.lochaber-news.co.uk/news/categoryfront.php/id/341/Featured_Articles.html','','',0),
   Array('115',1, null,'People and Places','http://www.lochaber-news.co.uk/news/categoryfront.php/id/115/People_and_Places.html','','',0),
   Array('61',1, null,'Roamer','http://www.lochaber-news.co.uk/news/categoryfront.php/id/61/Roamer.html','','',0)),'FEATURES','http://www.lochaber-news.co.uk/news/categoryfront.php/id/13/FEATURES.html','','',0),
 Array('122',1, Array(
   Array('62',1, null,'Looking Back','http://www.lochaber-news.co.uk/news/categoryfront.php/id/62/Looking_Back.html','','',0),
   Array('124',1, null,'Seeking The Past','http://www.lochaber-news.co.uk/news/categoryfront.php/id/124/Seeking_The_Past.html','','',0),
   Array('128',1, null,'Times Gone By','http://www.lochaber-news.co.uk/news/categoryfront.php/id/128/Times_Gone_By.html','','',0)),'LOCHABER ROOTS','http://www.lochaber-news.co.uk/news/categoryfront.php/id/122/LOCHABER_ROOTS.html','','',0),
 Array('314',1, Array(
   Array('148',1, Array(
     Array('270',1, null,'Ardnamurchan Lighthouse','http://www.ardnamurchan.u-net.com/','','',0),
     Array('267',1, null,'Glencoe Heritage Trust','http://www.glencoe-heritage-trust.com/','','',0),
     Array('253',1, null,'Heritage North','http://www.heritagenorth.org.uk/','','',0),
     Array('210',1, null,'Highland eLibrary','http://www.highland-elibrary.com/1.html','','',0),
     Array('211',1, null,'Highland Family History Society','http://www.highlandfhs.org.uk/','','',0),
     Array('310',1, null,'Highland Lives - Fort William','http://www.bbc.co.uk/scotland/highlandlives/participants/fortwilliam.shtml','','',0),
     Array('278',1, null,'Highland Museum Services','http://www.spanglefish.com/HighlandMuseumServices/','','',0),
     Array('315',1, null,'Homecoming Scotland','http://www.homecomingscotland.com/','','',0),
     Array('269',1, null,'Land, Sea and Islands Centre, Arisaig','http://www.arisaigcentre.co.uk/','','',0),
     Array('187',1, null,'Lochaber Archives','http://www.highland.gov.uk/leisure/archives/lochaberarchives/','','',0),
     Array('149',1, null,'Lochaber Family History Group','http://www.lochaberandnorthargyllfamilyhistorygroup.org.uk/','','',0),
     Array('174',1, null,'Lochaber Gaelic','http://www.lochabergaelic.org/','','',0),
     Array('185',1, null,'Mallaig Heritage Centre','http://www.mallaigheritage.org.uk/','','',0),
     Array('166',1, null,'Moidart Local History Group','http://www.moidart.org.uk/','','',0),
     Array('266',1, null,'Old Postcards From Fort William','http://mysite.wanadoo-members.co.uk/FortWilliam','','',0),
     Array('257',1, null,'St John\'s Church, Ballachulish','http://www.st-johns-church-ballachulish.com/index.php','','',0),
     Array('264',1, null,'West Highland Museum','http://www.westhighlandmuseum.org.uk/musmainpage.html','','',0)),'Links','','','',0)),'','','','',0),
 Array('14',1, Array(
   Array('36',1, Array(
     Array('92',1, null,'A, B, C','http://www.lochaber-news.co.uk/news/categoryfront.php/id/92/A,_B,_C.html','','',0),
     Array('93',1, null,'D, E, F','http://www.lochaber-news.co.uk/news/categoryfront.php/id/93/D,_E,_F.html','','',0),
     Array('94',1, null,'G, H, I, J','http://www.lochaber-news.co.uk/news/categoryfront.php/id/94/G,_H,_I,_J.html','','',0),
     Array('95',1, null,'K, L, M','http://www.lochaber-news.co.uk/news/categoryfront.php/id/95/K,_L,_M.html','','',0),
     Array('96',1, null,'Mc, Mac','http://www.lochaber-news.co.uk/news/categoryfront.php/id/96/Mc,_Mac.html','','',0),
     Array('97',1, null,'N, O, P, Q','http://www.lochaber-news.co.uk/news/categoryfront.php/id/97/N,_O,_P,_Q.html','','',0),
     Array('98',1, null,'R, S, T, U','http://www.lochaber-news.co.uk/news/categoryfront.php/id/98/R,_S,_T,_U.html','','',0),
     Array('99',1, null,'V, W, X, Y, Z','http://www.lochaber-news.co.uk/news/categoryfront.php/id/99/V,_W,_X,_Y,_Z.html','','',0)),'Graduations','http://www.lochaber-news.co.uk/news/categoryfront.php/id/36/Graduations.html','','',0),
   Array('35',1, Array(
     Array('84',1, null,'A, B, C','http://www.lochaber-news.co.uk/news/categoryfront.php/id/84/A,_B,_C.html','','',0),
     Array('85',1, null,'D, E, F','http://www.lochaber-news.co.uk/news/categoryfront.php/id/85/D,_E,_F.html','','',0),
     Array('86',1, null,'G, H, I, J','http://www.lochaber-news.co.uk/news/categoryfront.php/id/86/G,_H,_I,_J.html','','',0),
     Array('87',1, null,'K, L, M','http://www.lochaber-news.co.uk/news/categoryfront.php/id/87/K,_L,_M.html','','',0),
     Array('88',1, null,'Mc, Mac','http://www.lochaber-news.co.uk/news/categoryfront.php/id/88/Mc,_Mac.html','','',0),
     Array('89',1, null,'N, O, P, Q','http://www.lochaber-news.co.uk/news/categoryfront.php/id/89/N,_O,_P,_Q.html','','',0),
     Array('90',1, null,'R, S, T, U','http://www.lochaber-news.co.uk/news/categoryfront.php/id/90/R,_S,_T,_U.html','','',0),
     Array('91',1, null,'V, W, X, Y, Z','http://www.lochaber-news.co.uk/news/categoryfront.php/id/91/V,_W,_X,_Y,_Z.html','','',0)),'Wedding Days','http://www.lochaber-news.co.uk/news/categoryfront.php/id/35/Wedding_Days.html','','',0)),'GALLERY','http://www.lochaber-news.co.uk/news/categoryfront.php/id/14/GALLERY.html','','',0),
 Array('15',1, Array(
   Array('334',1, null,'Film Trailers','http://www.lochaber-news.co.uk/filmtrailers','','',0),
   Array('30',1, null,'In the Spotlight','http://www.lochaber-news.co.uk/news/categoryfront.php/id/30/In_the_Spotlight.html','','',0),
   Array('203',1, null,'The Music Room','http://www.lochaber-news.co.uk/news/categoryfront.php/id/203/The_Music_Room.html','','',0),
   Array('31',1, null,'Regional Round-up','http://www.lochaber-news.co.uk/news/categorypool.php/id/3','','',0),
   Array('318',1, null,'Shopping','http://www.lochaber-news.co.uk/shopping.php','','',0),
   Array('333',1, null,'Sudoku','http://www.lochaber-news.co.uk/sudoku','','',0),
   Array('339',1, null,'Thursday Girl','http://www.lochaber-news.co.uk/news/categoryfront.php/id/339/Thursday_Girl.html','','',0)),'LEISURE','http://www.lochaber-news.co.uk/news/categoryfront.php/id/15/LEISURE.html','','',0),
 Array('190',1, Array(
   Array('191',1, null,'Crosswords','http://www.poinscrosswords.com/quickcrosswords.html','','',0),
   Array('329',1, null,'Horoscopes','http://www.g8wave.co.uk/ClairePetulengro/SPP/Yourstars.htm','','',0),
   Array('327',1, null,'TV Guide','http://www.spp-group.com/tv/lntv.htm','','',0)),'','','','',0),
 Array('6',1, Array(
   Array('8',1, null,'Contact Us','http://www.lochaber-news.co.uk/info/contact_us.php','','',0),
   Array('121',1, null,'Place an Ad','mailto:ads@highland-news.co.uk','','',0)),'SERVICES','','','',0),
 Array('74',1, Array(
   Array('176',1, Array(
     Array('258',1, null,'Fèisean nan Gàidheal','http://www.feisean.org/','','',0),
     Array('259',1, null,'Hi-Arts','http://www.hi-arts.co.uk/','','',0),
     Array('275',1, null,'Highland Feltmakers Group','http://www.spanglefish.com/HighlandFelters/','','',0),
     Array('177',1, null,'Kilmallie Singers','http://www27.brinkster.com/jmfish/index1.html','','',0),
     Array('261',1, null,'Lime Tree Gallery','http://www.limetreefortwilliam.co.uk/gallery.htm','','',0),
     Array('178',1, null,'Lochaber Music School','http://www.lochabermusic.co.uk/','','',0),
     Array('323',1, null,'Lochaber Schools Pipe Band','http://www.lspb.co.uk/','','',0),
     Array('180',1, null,'Lochaber Showstoppers','http://www.lochabershowstoppers.co.uk/','','',0),
     Array('179',1, null,'Lochaber Wind Band','http://www.lcwb.co.uk/','','',0),
     Array('306',1, null,'Màiri Mḥr Song Fellowship','http://www.highland.gov.uk/leisureandtourism/gaelic/mhairimhor.htm','','',0),
     Array('262',1, null,'Resipole Studios','http://www.resipolestudios.co.uk/','','',0)),'Arts, Music and Entertainment','','','',0),
   Array('200',1, Array(
     Array('228',1, null,'Fort William Chamber of Commerce','http://www.fortwilliam-choc.co.uk/','','',0),
     Array('202',1, null,'HIE Lochaber','http://www.hie.co.uk/lochaber','','',0),
     Array('201',1, null,'Highlands and Islands Enterprise','http://www.hie.co.uk/','','',0),
     Array('309',1, null,'Lochaber Business Hub','http://www.hubnuts.co.uk/','','',0),
     Array('271',1, null,'North Scotland Industries Group','http://www.nsig.co.uk/','','',0),
     Array('233',1, null,'Rotary Club of Lochaber','http://www.mirlos.co.uk/lochaberrotaryclub/','','',0)),'Business','','','',0),
   Array('330',1, Array(
     Array('331',1, null,'Lochaber U3A','http://u3asites.org.uk/lochaber/','','',0)),'Clubs','','','',0),
   Array('75',1, Array(
     Array('78',1, null,'Fort William','http://www.visit-fortwilliam.co.uk','','',0),
     Array('268',1, null,'Glenfinnan','http://www.glenfinnan.org/','','',0),
     Array('167',1, null,'Glenuig','http://www.glenuig.org.uk/','','',0),
     Array('227',1, null,'Isle of Eigg','http://www.isleofeigg.org/','','',0),
     Array('158',1, null,'Kinlochleven','http://www.kinlochleven.org/','','',0),
     Array('113',1, null,'Lochaber','http://www.lochaber.com/','','',0),
     Array('232',1, null,'Presbytery of Lochaber','http://www.cofslochaber.co.uk/','','',0),
     Array('165',1, null,'Sunart Centre','http://www.sunartcentre.org/','','',0),
     Array('208',1, null,'Volunteering Highland - Lochaber','http://www.volunteeringhighland.org/in-Lochaber-g.asp','','',0)),'Community','','','',0),
   Array('137',1, Array(
     Array('189',1, null,'Blas','http://www.blas-festival.com/','','',0),
     Array('304',1, null,'Caledonian Challenge','http://www.caledonianchallenge.com/','','',0),
     Array('276',1, null,'Drams in the Field','http://www.dramsinthefield.com/','','',0),
     Array('255',1, null,'Feis Gleann Albainn','http://www.feisgleannalbainn.co.uk/index.html','','',0),
     Array('138',1, null,'Fort William Mountain Festival','http://www.mountainfestival.co.uk/','','',0),
     Array('281',1, null,'Highland Feast','http://www.highlandfeast.co.uk/','','',0),
     Array('175',1, null,'Loch Shiel Spring Festival','http://www.lochshielfestival.com/','','',0),
     Array('256',1, null,'Lochaber Gathering','http://www.lochabergathering.com/','','',0),
     Array('324',1, null,'Lochaber Music Festival','http://lochabermusicfestival.co.uk/LMF/index.htm','','',0),
     Array('230',1, null,'Mallaig and Morar Highland Games','http://www.mallaigmorargames.org','','',0),
     Array('265',1, null,'Mod Lochaber','http://myweb.tiscali.co.uk/modlochaber/welcome.htm','','',0),
     Array('213',1, null,'NessFest Celtic Festival','http://www.nessfest.co.uk','','',0),
     Array('162',1, null,'Scottish Six Days Trail','http://www.ssdt.org/','','',0),
     Array('209',1, null,'UCI Mountain Bike World Championships','http://www.fortwilliamworldchamps.co.uk/fwwc_home.html','','',0),
     Array('161',1, null,'UCI Mountain Bike World Cup','http://www.fortwilliamworldchamps.co.uk/','','',0)),'Events','','','',0),
   Array('152',1, Array(
     Array('171',1, null,'Ardnamurchan Natural History Centre','http://www.ardnamurchannaturalhistorycentre.co.uk/','','',0),
     Array('297',1, null,'Fort William Coastguard','http://www.fortwilliamcoastguard.co.uk/','','',0),
     Array('198',1, null,'Glencoe Mountain Rescue Team','http://www.glencoe-mountain-rescue.com/','','',0),
     Array('154',1, null,'Great Glen Bikes','http://www.greatglenbikes.com/','','',0),
     Array('155',1, null,'Great Glen Way','http://www.greatglenway.com/','','',0),
     Array('277',1, null,'Highland Hillwalking Club','http://www.spanglefish.com/HighlandHillwalkingClub/','','',0),
     Array('305',1, null,'Lochaber Geopark','http://www.lochabergeopark.org.uk/','','',0),
     Array('296',1, null,'Lochaber Mountain Access Group','http://www.mountainaccessgroup.co.uk/','','',0),
     Array('197',1, null,'Lochaber Mountain Rescue Team','http://www.lochabermrt.co.uk/','','',0),
     Array('295',1, null,'Nevis Partnership','http://www.nevispartnership.co.uk/','','',0),
     Array('153',1, null,'Nevis Range','http://www.nevisrange.co.uk/','','',0),
     Array('157',1, null,'Outdoor Capital','http://www.outdoorcapital.co.uk/','','',0),
     Array('151',1, null,'Ride Fort William','http://www.ridefortwilliam.com/','','',0),
     Array('196',1, null,'Step It Up Highland','http://www.stepituphighland.org.uk/','','',0),
     Array('168',1, null,'Sunart Oakwoods','http://www.sunartoakwoods.org.uk/','','',0),
     Array('156',1, null,'West Highland Way','http://www.west-highland-way.co.uk/','','',0)),'Outdoors','','','',0),
   Array('139',1, Array(
     Array('140',1, null,'The Write Image','http://www.twiphoto.co.uk/','','',0)),'Photographers','','','',0),
   Array('141',1, Array(
     Array('229',1, null,'Fort William Cricket Club','http://www.fortwilliamcc.com/','','',0),
     Array('332',1, null,'Fort William FC','http://www.fortwilliamfc.co.uk','','',0),
     Array('147',1, null,'Fort William Golf Club','http://www.fortwilliam.co.uk/','','',0),
     Array('173',1, null,'Glencoe Boat Club','http://homepages.rya-online.net/whisca/gbc.htm','','',0),
     Array('273',1, null,'Highland Disability Sport','http://www.highlanddisabilitysport.info/','','',0),
     Array('274',1, null,'Highland Sports Development Association','http://www.hsda.co.uk/','','',0),
     Array('192',1, null,'Lochaber Athletic Club','http://www.lochaberac.co.uk/','','',0),
     Array('280',1, null,'Lochaber Rugby Football Club','http://www.lochaberrfc.co.uk/','','',0),
     Array('188',1, null,'Lochaber Squash Club','http://www.lochabersquashclub.co.uk/','','',0),
     Array('199',1, null,'Lochaber Yacht Club','http://www.lochaber-yacht-club.co.uk/','','',0),
     Array('321',1, null,'Ramsay\'s Round','http://www.ramsaysround.com/','','',0),
     Array('150',1, null,'Snow and Mountain Sports','http://www.winterhighland.info/','','',0),
     Array('263',1, null,'The Ice Factor','http://www.icefactor.co.uk/','','',0),
     Array('231',1, null,'Traigh Golf Course','http://www.traighgolf.co.uk/','','',0),
     Array('172',1, null,'West Ardnamurchan Regatta Club','http://homepages.rya-online.net/whisca/krc.htm','','',0),
     Array('145',1, null,'West Highland Wheelers','http://www.westhighlandwheelers.org/','','',0)),'Sport','','','',0),
   Array('159',1, Array(
     Array('164',1, null,'Ardnamurchan','http://www.ardnamurchan.com/','','',0),
     Array('186',1, null,'Fort Augustus','http://www.fortaugustus.org/','','',0),
     Array('160',1, null,'Glen Spean','http://www.glenspean.com/','','',0),
     Array('183',1, null,'Glencoe','http://www.glencoescotland.com/','','',0),
     Array('163',1, null,'Glencoe Mountain Resort','http://www.glencoemountain.com/store/home.php','','',0),
     Array('181',1, null,'Glenfinnan','http://www.visitglenfinnan.co.uk/','','',0),
     Array('319',1, null,'Great Glen Way','http://www.greatglenway.com/index.htm','','',0),
     Array('272',1, null,'Highlands Loch Ness Marketing','http://www.highlandslochness.com/','','',0),
     Array('184',1, null,'Jacobite Steam Train','http://www.steamtrain.info/','','',0),
     Array('114',1, null,'Loch Ness','http://www.visitlochness.net/','','',0),
     Array('182',1, null,'Road to the Isles','http://www.road-to-the-isles.org.uk/','','',0),
     Array('320',1, null,'Visit Loch Ness','http://www.visitlochness.com/','','',0),
     Array('212',1, null,'Walk Highlands','http://www.walkhighlands.co.uk/','','',0)),'Tourism','','','',0),
   Array('204',1, Array(
     Array('282',1, null,'Atlas Brewery','http://www.atlasbrewery.com/','','',0),
     Array('205',1, null,'Ben Nevis Distillery','http://www.bennevisdistillery.com/','','',0),
     Array('206',1, null,'The Whisky Coast','http://www.whiskycoast.co.uk/default.htm','','',0)),'Whisky (and Beer!)','','','',0),
   Array('169',1, Array(
     Array('170',1, null,'Ardnamurchan High School','http://www.ardnamurchan.highland.sch.uk/','','',0),
     Array('223',1, null,'Kilchuimen Academy','http://www.kilchuimenacademy.highland.sch.uk/','','',0),
     Array('224',1, null,'Kinlochleven High School','http://www.kinlochlevenhigh.highland.sch.uk/','','',0),
     Array('225',1, null,'Lochaber High School','http://www.lochaber.highland.sch.uk/','','',0),
     Array('226',1, null,'Mallaig High School','http://www.mallaighigh.highland.sch.uk/','','',0),
     Array('279',1, null,'Youth Highland','http://www.spanglefish.com/YouthHighland/','','',0)),'Youth','','','',0)),'LINKS','','','',0),
 Array('216',1, Array(
   Array('217',1, Array(
     Array('234',1, null,'Community Councils','http://www.lochaber-news.co.uk/news/categoryfront.php/id/234/Community_Councils.html','','',0),
     Array('219',1, null,'Highland Council','http://www.lochaber-news.co.uk/news/categoryfront.php/id/219/Highland_Council.html','','',0),
     Array('220',1, null,'Scottish Parliament','http://www.lochaber-news.co.uk/news/categoryfront.php/id/220/Scottish_Parliament.html','','',0),
     Array('221',1, null,'Westminster','http://www.lochaber-news.co.uk/news/categoryfront.php/id/221/Westminster.html','','',0),
     Array('222',1, null,'European Parliament','http://www.lochaber-news.co.uk/news/categoryfront.php/id/222/European_Parliament.html','','',0)),'Council and Parliament','http://www.lochaber-news.co.uk/news/categoryfront.php/id/217/Council_and_Parliament.html','','',0),
   Array('235',1, Array(
     Array('237',1, null,'Colleges','http://www.lochaber-news.co.uk/news/categoryfront.php/id/237/Colleges.html','','',0),
     Array('238',1, null,'Schools','http://www.lochaber-news.co.uk/news/categoryfront.php/id/238/Schools.html','','',0)),'Education','http://www.lochaber-news.co.uk/news/categoryfront.php/id/235/Education.html','','',0),
   Array('243',1, Array(
     Array('244',1, null,'Citizens Advice Bureaux','http://www.lochaber-news.co.uk/news/categoryfront.php/id/244/Citizens_Advice_Bureaux.html','','',0),
     Array('245',1, null,'Samaritans','http://www.lochaber-news.co.uk/news/categoryfront.php/id/245/Samaritans.html','','',0),
     Array('251',1, null,'Watchdogs','http://www.lochaber-news.co.uk/news/categoryfront.php/id/251/Watchdogs.html','','',0)),'Emergency and Advice','http://www.lochaber-news.co.uk/news/categoryfront.php/id/243/Emergency_and_Advice.html','','',0),
   Array('236',1, Array(
     Array('316',1, null,'Babyfeeding','http://www.lochaber-news.co.uk/news/categoryfront.php/id/316/Babyfeeding.html','','',0),
     Array('239',1, null,'Dentists','http://www.lochaber-news.co.uk/news/categoryfront.php/id/239/Dentists.html','','',0),
     Array('240',1, null,'Doctors','http://www.lochaber-news.co.uk/news/categoryfront.php/id/240/Doctors.html','','',0),
     Array('246',1, null,'Giving Blood','http://www.lochaber-news.co.uk/news/categoryfront.php/id/246/Giving_Blood.html','','',0),
     Array('260',1, null,'Hospices','http://www.lochaber-news.co.uk/news/categoryfront.php/id/260/Hospices.html','','',0),
     Array('241',1, null,'Hospitals','http://www.lochaber-news.co.uk/news/categoryfront.php/id/241/Hospitals.html','','',0),
     Array('242',1, null,'Opticians','http://www.lochaber-news.co.uk/news/categoryfront.php/id/242/Opticians.html','','',0),
     Array('247',1, null,'Pharmacies','http://www.lochaber-news.co.uk/news/categoryfront.php/id/247/Pharmacies.html','','',0)),'Health','http://www.lochaber-news.co.uk/news/categoryfront.php/id/236/Health.html','','',0),
   Array('338',1, null,'Jobs in Lochaber','http://www.jobs-north.co.uk/Lochaber-jobs/','','',0),
   Array('254',1, null,'Scottish Clans','http://www.lochaber-news.co.uk/news/categoryfront.php/id/254/Scottish_Clans.html','','',0)),'DIRECTORY','http://www.lochaber-news.co.uk/news/categoryfront.php/id/216/DIRECTORY.html','','',0),
 Array('248',1, Array(
   Array('249',1, null,'Executive','http://www.executive-magazine.co.uk/','','',0),
   Array('250',1, null,'Highland Life','http://www.highland-life.co.uk/','','',0),
   Array('215',1, null,'Highland Weddings','http://www.thehighlandweddingdirectory.com/','','',0),
   Array('299',1, null,'Lochaber Life','http://www.lochaber-life.co.uk/','','',0),
   Array('284',1, null,'<br>','','','',0),
   Array('283',1, null,'Banffshire Journal','http://www.banffshire-journal.co.uk/','','',0),
   Array('285',1, null,'Caithness Courier','http://www.johnogroat-journal.co.uk/','','',0),
   Array('286',1, null,'Forres Gazette','http://www.forres-gazette.co.uk/','','',0),
   Array('287',1, null,'Highland News','http://www.highland-news.co.uk/','','',0),
   Array('288',1, null,'Inverness Courier','http://www.inverness-courier.co.uk/','','',0),
   Array('289',1, null,'John O\'Groat Journal','http://www.johnogroat-journal.co.uk/','','',0),
   Array('290',1, null,'North Star','http://www.north-star-news.co.uk/','','',0),
   Array('291',1, null,'Northern Scot','http://www.northern-scot.co.uk/','','',0),
   Array('292',1, null,'Northern Times','http://www.northern-times.co.uk/','','',0),
   Array('293',1, null,'Ross-shire Journal','http://www.ross-shirejournal.co.uk/','','',0),
   Array('294',1, null,'Strathspey & Badenoch Herald','http://www.strathspey-herald.co.uk/','','',0)),'SPP PUBLICATIONS','','','',0),
 Array('336',1, Array(
   Array('abli',1, null,'Previous&nbsp;issue','http://www.lochaber-news.co.uk/news/archive_browser.php/issue/1283227200.html','','',0),
   Array('abbi',1, null,'Browse&nbsp;articles&nbsp;by&nbsp;date','http://www.lochaber-news.co.uk/news/archive_browser.php','','',0)),'Back Issues','javascript:void(0);','','',0));
NavbarItems[1] = Array(
 Array('64',1, Array(
   Array('65',1, null,'Jobs in Lochaber','http://www.jobs-north.co.uk/Lochaber-jobs/','','',0),
   Array('133',1, null,'CV Online','http://www.jobs-north.co.uk/','','',0),
   Array('132',1, null,'Dating','http://www.highlandcompanions.com/','','',0),
   Array('68',1, null,'For Sale','http://www.classifieds-north.co.uk/','','',0),
   Array('66',1, null,'Motors','http://www.motors-north.co.uk','','',0),
   Array('67',1, null,'Property','http://www.property-north.co.uk/','','',0),
   Array('308',1, null,'Photo Sales','http://3276.e-printphoto.co.uk/spp/','','',0)),'','','','',0),
 Array('134',1, Array(
   Array('307',1, null,'Family Notices','http://www.lochaber-news.co.uk/news/categoryfront.php/id/307/Family_Notices.html','','',0),
   Array('146',1, null,'Supplements','http://www.lochaber-news.co.uk/news/categoryfront.php/id/146/Supplements.html','','',0)),'','','','',0));
NavbarItems[2] = Array(
 Array('301',1, null,'','','','',0));
function getPageItem(itemid) {
    if (document.getElementById) {
    	return document.getElementById(itemid);
    } else if (document.all) {
        return document.all[itemid];
    } else if (document.layers) {
    	return eval('document.'+itemid);
    }
    return null;
}

function writePageItem(itemid,html) {
    var lyr = null;
    if (document.getElementById) {
    	lyr = document.getElementById(itemid);
	lyr.innerHTML = html;
    } else if (document.all) {
        lyr = document.all[itemid];
	lyr.innerHTML = html;
    } else if (document.layers) {
    	// FIXME: ns4 compat
    }
}

function renderNavbarItem(container, level, item) {
    var html = "" + NavbarTemplates[container][level][1];

    var ihtm = NavbarTemplates[container][level][4];
    if (item[3] == '') { 
       // is empty
       ihtm = NavbarTemplates[container][level][2]; 
    } else if (item[5] != '') {  
       // has image
       ihtm = NavbarTemplates[container][level][3]; 
    }
    if (item[2] && (NavbarTemplates[container][level].length > 5)) { 
        // has children
    	if (item[1]) {  
	    // is open
      	    ihtm = NavbarTemplates[container][level][5];
    	} else {  
	    // is closed
      	    ihtm = NavbarTemplates[container][level][6];
    	}
    }

    html = html.replace(/%%ITEM%%/g, ihtm);

    html = html.replace(/%%ID%%/g, item[0]);
    html = html.replace(/%%TEXT%%/g, item[3]);
    html = html.replace(/%%LINK%%/g, item[4]);
    html = html.replace(/%%IMG_URL%%/g, item[5]);
    if (item[7] && PadlockTemplate) {
      html = html.replace(/%%PADLOCK%%/g, PadlockTemplate);
    } else {
      html = html.replace(/%%PADLOCK%%/g, '');
    }
    if (item[2] && item[1]) {  
	html = html.replace(/%%SUB%%/g, renderNavbarLevel(container, level+1, item[2]));
    } else {
	html = html.replace(/%%SUB%%/g, '');
    }
    return html;
} 

function renderNavbarLevel(container, level, items) {
    var html = NavbarTemplates[container][level][0];
    var buf = '';
    for(var i=0;i< items.length; i++) {
    	buf += renderNavbarItem(container, level, items[i]);
    }
    html = html.replace(/%%ITEMS%%/g, buf);
    return html;
}

function renderLeftNavbar() {
    return renderNavbarLevel(0,0,NavbarItems[0]);
}

function renderTopNavbar() {
    return renderNavbarLevel(1,0,NavbarItems[1]);
}

function renderRightNavbar() {
    return renderNavbarLevel(2,0,NavbarItems[2]);
}

// behavior specific

function getCategoryId() {
    var loc = "";
    loc += document.location; 
    loc = loc.replace(/^.*\/categoryfront\.php\/id\//,'');
    loc = loc.replace(/[^0-9].*$/,'');
    return loc;
}

function initNavbar() {
    var id = getCategoryId();
    for(var c=0; c< NavbarItems.length; c++) {
      for(var i=0;i< NavbarItems[c].length; i++) {
    	var items = NavbarItems[c][i][2];
    	if (items) {
    	    for(var j=0;j< items.length; j++) {
	      NavbarItems[c][i][2][j][1] = 0;
	      var jtems = items[j][2];
	      if (jtems && id!="") {
	        if (items[j][0] == id) { NavbarItems[c][i][2][j][1] = 1; }
	        else for (var k=0; k< jtems.length; k++) {
		  if (jtems[k][0] == id) { NavbarItems[c][i][2][j][1] = 1; }
		}
	      }
	    }
	}
      }
    }
}

function toggleNavbarItem(id) {
    for(var c=0; c< NavbarItems.length; c++) {
      for(var i=0;i< NavbarItems[c].length; i++) {
    	var items = NavbarItems[c][i][2];
    	if (items) {
    	    for(var j=0;j< items.length; j++) {
    	      if (items[j][0]==id) {
	    	NavbarItems[c][i][2][j][1] = 1 - items[j][1];
		var navdiv = getPageItem('navbar_'+c);
		if (navdiv) {
		    writePageItem('navbar_'+c,renderNavbarLevel(c,0,NavbarItems[c]));
		}
	      }
	    }
	}
      }
    }
    return 0;
}

function displaySWF(url,ver,w,h) {
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ver+'" width="'+w+'" height="'+h+'"><param name="movie" value="'+url+'"><param name="quality" value="high"><embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object>');
}

var toid;
function toggleDiv(id) { var d = getPageItem(id); if (d) { if (d.style.visibility == 'hidden') d.style.visibility = 'visible'; else d.style.visibility = 'hidden'; } }
function showDiv(id) { var d=getPageItem(id); if (d) { d.style.visibility='visible'; } }
function hideDiv(id) { var d=getPageItem(id); if (d) { d.style.visibility='hidden'; } }

// template specific
// Array( 'main', 'item_main', 'empty_item', 'imgonly_item', 'nosub_item', 'sub_open_item', 'sub_close_item')
NavbarTemplates = Array(
 Array( 
   Array('%%ITEMS%%', 
   '%%ITEM%%<ul class="navbar">%%SUB%%</ul>',
   '',
   '<div class="header navbar visual"><a href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"></a></div>',
   '<div class="header navbar">%%TEXT%%</div>'),

   Array('%%ITEMS%%', 
   '%%ITEM%%%%SUB%%',
   '',
   '<li class="navbar item">%%PADLOCK%%<a class="button" href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"></a></li>',
   '<li class="navbar item">%%PADLOCK%%<a class="button" href="%%LINK%%">%%TEXT%%</a></li>',
   '<li class="navbar item haschild">%%PADLOCK%%<a class="button" href="%%LINK%%" onClick="toggleNavbarItem(\'%%ID%%\');return false;"><img src="http://www.lochaber-news.co.uk/themes/itc2/trade_arrow_opened.gif" hspace=0 vspace=1 border=0>%%TEXT%%</a></li>',
   '<li class="navbar item haschild">%%PADLOCK%%<a class="button" href="%%LINK%%" onClick="toggleNavbarItem(\'%%ID%%\');return false;"><img src="http://www.lochaber-news.co.uk/themes/itc2/trade_arrow_closed.gif" hspace=0 vspace=1 border=0>%%TEXT%%</a></li>'),

   Array('%%ITEMS%%', 
   '<li class="navbar item sub">%%PADLOCK%%%%ITEM%%</li>',
   '',
   '<a class="button" href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"></a>',   
   '<a class="button" href="%%LINK%%">%%TEXT%%</a>')
 ),
 Array(),
 Array( 
    Array('%%ITEMS%%', 
   '%%ITEM%%<ul class="navbar">%%SUB%%</ul>',
   '',
   '<div class="header navbar visual"><a href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"></a></div>',
   '<div class="header navbar">%%TEXT%%</div>'),

   Array('%%ITEMS%%', 
   '%%ITEM%%%%SUB%%',
   '',
   '<li class="navbar item">%%PADLOCK%%<a class="button" href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"></a></li>',
   '<li class="navbar item">%%PADLOCK%%<a class="button" href="%%LINK%%">%%TEXT%%</a></li>',
   '<li class="navbar item haschild">%%PADLOCK%%<a class="button" href="%%LINK%%" onClick="toggleNavbarItem(\'%%ID%%\');return false;"><img src="http://www.lochaber-news.co.uk/themes/itc2/trade_arrow_opened.gif" hspace=0 vspace=1 border=0>%%TEXT%%</a></li>',
   '<li class="navbar item haschild">%%PADLOCK%%<a class="button" href="%%LINK%%" onClick="toggleNavbarItem(\'%%ID%%\');return false;"><img src="http://www.lochaber-news.co.uk/themes/itc2/trade_arrow_closed.gif" hspace=0 vspace=1 border=0>%%TEXT%%</a></li>'),

   Array('%%ITEMS%%', 
   '<li class="navbar item sub">%%PADLOCK%%%%ITEM%%</li>',
   '',
   '<a class="button" href="%%LINK%%"><img src="%%IMG_URL%%" alt="" border="0"></a>',   
   '<a class="button" href="%%LINK%%">%%TEXT%%</a>')
 )
);

PadlockTemplate='<img src="http://www.lochaber-news.co.uk/pixmaps/padlock.gif" border="0" align="right" hspace="1" vspace="1">';
