// Determine how deep we are in the directory structure
// and generate the relative path
var _sA = (':'+document.location.pathname).split(':');
var _u  = ((_sA.length>1)?_sA.pop():'').replace(/\\/g,'/');
var _ln = _u.split('/').length - 1;
var p = '';
if(_ln==1){p='./'} else {for(var i=1;i<_ln;i++){p=p+'../'}}

// ------------------------------------------------------------------------------------------
// --- menu items --- 
// note that this structure has changed its format since previous version.
// additional third parameter is added for item scope settings.
// Now this structure is compatible with Tigra Menu GOLD.
// Format description can be found in product documentation.
// ------------------------------------------------------------------------------------------

var MENU_ITEMS = [
	['Gazetteer',p+'gazetteer/hub.html',null,
		['Government',p+'gazetteer/gov/org.html',null,
			['Capital',p+'gazetteer/gov/capital.html'],
			['Ruler',p+'gazetteer/gov/ruler.html'],
			['Coinage',p+'gazetteer/gov/coinage.html'],
			['Religions',p+'gazetteer/religion.html'],
			['Laws &amp; Taxes',p+'gazetteer/gov/laws.html'],
			['Veluna Map',p+'gazetteer/geo/map.html'],
		],
		['Dioceses',p+'gazetteer/dioceses/overview.html',null,
			['Veluna City',p+'gazetteer/dioceses/velu.html'],
			['Whitehale',p+'gazetteer/dioceses/whit.html'],
			['Devarnish',p+'gazetteer/dioceses/deva.html'],
			['Grayington',p+'gazetteer/dioceses/gray.html'],
			['Lorrish',p+'gazetteer/dioceses/lorr.html'],
			['Falsridge',p+'gazetteer/dioceses/fals.html'],
			['Kempton',p+'gazetteer/dioceses/kemp.html'],
			['Valkurl',p+'gazetteer/dioceses/valk.html'],
		],
		['History',p+'history_hub.html',null,
			['Ancient',p+'gazetteer/ancient.html'],
			['Languages',p+'gazetteer/languages.html'],
			['Races &amp; Classes',p+'gazetteer/hist_races.html'],
			['Allies',p+'gazetteer/gov/allies.html'],
			['Enemies',p+'gazetteer/gov/enemies.html'],
			['Timeline',p+'gazetteer/timeline.html'],
		],
		['Geography',p+'gazetteer/geo/resources.html',null,
			['Farms',p+'gazetteer/geo/farming.html'],
			['Mines',p+'gazetteer/geo/mines.html'],
			['Rivers',p+'gazetteer/geo/rivers.html'],
			['Terrain',p+'gazetteer/geo/land.html'],
			['Seasons',p+'gazetteer/geo/weather.html'],
			['Cities',p+'gazetteer/geo/cities.html'],
		],
	],
	['What Is ...',p+'whatis/begin.html',null,
		['... Roleplaying?',p+'whatis/rpga.html'],
		['... Living Greyhawk?',p+'whatis/greyhawk.html'],
		['... Living Veluna?',p+'whatis/veluna.html'],
		['... Character Creation?',p+'whatis/characters.html'],
		['... a Scenario?',p+'whatis/faq.html'],
	],
	['Modules',p+'mods/scen.html',null,
		['Regional',null,null,
  		['598 CY',p+'mods/vel598.html'],
  		['597 CY',p+'mods/vel597.html'],
  		['596 CY',p+'mods/vel596.html'],
  		['595 CY',p+'mods/vel595.html'],
  		['594 CY',p+'mods/vel594.html'],
  		['593 CY',p+'mods/vel593.html'],
  		['592 CY',p+'mods/vel592.html'],
  		['591 CY',p+'mods/vel591.html'],
		],
		['Metaregional',null,null,
  		['598 CY',p+'mods/vtf598.html'],
  		['597 CY',p+'mods/vtf597.html'],
  		['596 CY',p+'mods/vtf596.html'],
  		['595 CY',p+'mods/vtf595.html'],
  		['594 CY',p+'mods/vtf594.html'],
  		['593 CY',p+'mods/vtf593.html'],
		],
		['Narratives',p+'narratives/main.html'],
	],
	['Meta Orgs',null,null,
		['Descriptions',p+'meta_orgs/hub.html'],
		['Certificates',p+'meta_orgs/certs.html'],
	],
	['Conventions',p+'cons/hub.html',null,
		['Game Days',p+'cons/gamedays.html'],
		//['BASHCon','http://www.bashcon.com'],
		['MVC','http://www.consupport.com/index.asp?Con=93'],
		['Origins','http://www.originsgames.com'],
		['Con on the Cob','http://www.cononthecob.com/'],
	],
	['Community/Admin',null,null,
		['Admin & Triads',p+'comm/admin.html'],
		['LG Regions',p+'comm/lg_regions.html'],
		['Newsgroups &amp; Links',p+'comm/links.html'],
		['Volunteers',p+'comm/volunteers.html'],
		// ['Website Changelog',p+'what_lv-up.html'],
		// ['Hall of Heroes',null],
		['Downloads',p+'downloads/hub.html'],
	],
];
