var dungeonList = [];

function initDungeons() {
	dungeonList[0] = [ 'RuneScape Surface', 'RuneScape Surface' ];
	dungeonList[1] = [ 'Ardougne Underground', 'Ardougne Underground', 104, 104, 'ardougne_underground_nw.png', '<area shape="circle" coords="450,292,8" href="#" onclick="show_surface();return false;" alt="Hide Ardougne Underground" /><area shape="circle" coords="209,449,8" href="#" onclick="show_surface();return false;" alt="Hide Ardougne Underground" /><area shape="circle" coords="491,697,8" href="#" onclick="show_surface();return false;" alt="Hide Ardougne Underground" /><area shape="circle" coords="246,733,8" href="#" onclick="show_surface();return false;" alt="Hide Ardougne Underground" /><area shape="circle" coords="748,746,8" href="#" onclick="show_surface();return false;" alt="Hide Ardougne Underground" />', 104, 105, 'ardougne_underground_ne.png', '<area shape="circle" coords="37,377,8" href="#" onclick="show_surface();return false;" alt="Hide Ardougne Underground" />', 105, 104, 'ardougne_underground_sw.png', '<area shape="circle" coords="181,42,8" href="#" onclick="show_surface();return false;" alt="Hide Ardougne Underground" /><area shape="circle" coords="238,159,8" href="#" onclick="show_surface();return false;" alt="Hide Ardougne Underground" /><area shape="circle" coords="607,110,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Ardougne Underground" />', 105, 105, 'ardougne_underground_se.png', '' ];
	dungeonList[2] = [ 'Asgarnia Ice Dungeon and nearby basements', 'Ice Dungeon', 105, 106, 'asgarnia_ice_cavern.png', '<area shape="circle" coords="56,79,8" href="#" onclick="show_surface();return false;" alt="Hide Ice Dungeon" /><area shape="circle" coords="435,150,8" href="#" onclick="show_surface();return false;" alt="Hide Ice Dungeon" /><area shape="circle" coords="394,481,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Ice Dungeon" />' ];
	dungeonList[3] = [ 'Braindeath Island', 'Braindeath Island', 103, 109, 'braindeath_island.png', '<area shape="circle" coords="709,505,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Braindeath Island" />' ];
	dungeonList[4] = [ 'Champion\'s Guild Dungeon', 'Champion\'s Guild Dungeon', 104, 107, 'champion_guild.png' , '<area shape="rect" coords="123,360,328,551" href="guilds/guild_champs.html#basement" target="_top" alt="Champion\'s Guild Guide - Basement" />' ];
	dungeonList[5] = [ 'Chaos Tunnels', 'Chaos Tunnels', 103, 106, 'chaos_tunnels_w.png', '<area shape="circle" coords="597,457,8" href="#" onclick="show_surface();return false;" alt="Hide Chaos Tunnels" />', 103, 107, 'chaos_tunnels_e.png', '<area shape="circle" coords="238,416,8" href="#" onclick="show_surface();return false;" alt="Hide Chaos Tunnels" /><area shape="circle" coords="227,179,8" href="#" onclick="show_surface();return false;" alt="Hide Chaos Tunnels" /><area shape="circle" coords="62,372,8" href="#" onclick="show_surface();return false;" alt="Hide Chaos Tunnels" /><area shape="circle" coords="7,95,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Chaos Tunnels" />' ];
	dungeonList[6] = [ 'Dorgesh-Kaan', 'Dorgesh-Kaan', 104, 108, 'dorgesh_kaan_up.png', '', 104, 109, 'dorgesh_kaan_bed.png', '', 105, 107, 'dorgesh_kaan_low.png', '', 105, 108, 'dorgesh_kaan_mid.png', '<area shape="circle" coords="35,253,8" href="#" target="_top" onclick="find_dungeon_id(\'Misthalin Underground\');return false;" alt="Show Misthalin Underground" />' ];
	dungeonList[7] = [ 'Dwarven Mines', 'Dwarven Mines', 104, 106, 'dwarven_mines.png', '<area shape="circle" coords="338,86,8" href="#" onclick="show_surface();return false;" alt="Hide Dwarven Mines" /><area shape="circle" coords="430,70,8" href="#" onclick="show_surface();return false;" alt="Hide Dwarven Mines" /><area shape="circle" coords="430,516,8" href="#" onclick="show_surface();return false;" alt="Hide Dwarven Mines" /><area shape="circle" coords="592,359,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Dwarven Mines" />' ];
	dungeonList[8] = [ 'Evil Chicken\'s Lair', 'Evil Chicken Lair', 105, 107, 'evil_chicken_lair.png', '<area shape="rect" coords="373,374,393,383" href="#" target="_top" onclick="find_dungeon_id(\'Zanaris\');return false;" alt="Show Zanaris" />' ];
	dungeonList[9] = [ 'Fremennik Slayer Dungeon', 'Fremennik Slayer Dungeon', 103, 104, 'slayer_cave_w.png', '', 103, 105, 'slayer_cave_e.png', '<area shape="circle" coords="352,198,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Fremennik Slayer Dungeon" />' ];
	dungeonList[10] = [ 'Godwars Dungeon', 'Godwars Dungeon', 102, 105, 'gwd_w.png', '', 102, 106, 'gwd_e.png', '<area shape="circle" coords="25,466,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide God Wars Dungeon" />' ];
	dungeonList[11] = [ 'Invisible Dungeon (Damis\' Lair)', 'Invisible Dungeon', 104, 104, 'invisible_damis_lair.png', '<area shape="rect" coords="151,192,157,199" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Invisible Dungeon" />' ];
	dungeonList[12] = [ 'Kalphite Hive', 'Kalphite Hive', 105, 107, 'kalphite_hive_w.png', '<area shape="circle" coords="480,653,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Kalphite Hive" />', 105, 108, 'kalphite_hive_e.png', '' ];
	dungeonList[13] = [ 'Karamja Underground, including Brimhaven Dungeon', 'Karamja Underground', 105, 104, 'karamja_underground_nw.png', '', 105, 105, 'karamja_underground_ne.png', '<area shape="circle" coords="139,473,8" href="#" onclick="show_surface();return false;" alt="Hide Karamja Underground" /><area shape="circle" coords="505,368,8" href="#" onclick="show_surface();return false;" alt="Hide Karamja Underground" /><area shape="circle" coords="710,453,8" href="#" onclick="show_surface();return false;" alt="Hide Karamja Underground" /><area shape="circle" coords="617,99,8" href="#" onclick="show_surface();return false;" alt="Hide Karamja Underground" /><area shape="circle" coords="597,642,8" href="#" onclick="show_surface();return false;" alt="Hide Karamja Underground" /><area shape="circle" coords="754,445,8" href="#" target="_top" onclick="find_dungeon_id(\'TzHaar Area\');return false;" alt="Show TzHaar Area" />', 106, 104, 'karamja_underground_sw.png', '', 106, 105, 'karamja_underground_se.png', '' ];
	dungeonList[14] = [ 'Keldagrim', 'Keldagrim', 102, 105, 'keldagrim.png', '<area shape="circle" coords="91,604,8" href="#" onclick="show_surface();return false;" alt="Hide Keldagrim" /><area shape="circle" coords="203,714,8" href="#" target="_top" target="_top" onclick="show_surface();return false;" alt="Hide Keldagrim" />' ];
	dungeonList[15] = [ 'Lair of Tarn Razorlor', 'Lair of Tarn Razorlor', 105, 108, 'tarns_lair_w.png', '', 105, 109, 'tarns_lair_e.png', '' ];
	dungeonList[16] = [ 'Miscellania Underground, including other nearby islands', 'Miscellania Underground', 101, 102, 'miscellania_underground_lun.png', '<area shape="circle" coords="121,466,8" href="#" onclick="show_surface();return false;" alt="Hide Miscellania Underground" />', 101, 103, 'miscellania_underground_tro.png', '<area shape="circle" coords="364,687,8" href="#" onclick="show_surface();return false;" alt="Hide Miscellania Underground" />', 101, 104, 'miscellania_underground_pen.png', '<area shape="circle" coords="436,790,8" href="#" onclick="show_surface();return false;" alt="Hide Miscellania Underground" />', 102, 103, 'miscellania_underground_sw.png', '<area shape="circle" coords="795,62,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Miscellania Underground" />', 102, 104, 'miscellania_underground_mis.png', '' ];
	dungeonList[17] = [ 'Misthalin Underground', 'Misthalin Underground', 103, 106, 'misthalin_under_nw.png', '<area shape="circle" coords="712,371,8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" /><area shape="circle" coords="748,789,8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" />', 103, 107, 'misthalin_under_ne.png', '', 104, 106, 'misthalin_under_nw-1.png', '<area shape="circle" coords="684,363,8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" /><area shape="circle" coords="695,772,8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" />', 104, 107, 'misthalin_under_ne-1.png', '<area shape="circle" coords="25,49,8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" /><area shape="circle" coords="29,443,8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" /><area shape="circle" coords="316,453,8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" /><area shape="circle" coords="549,339,8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" /><area shape="circle" coords="510,25,8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" />', 105, 106, 'misthalin_under_nw-2.png', '<area shape="circle" coords="772,357,8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" /><area shape="circle" coords=",8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" /><area shape="circle" coords=",8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" />', 105, 107, 'misthalin_under_ne-2.png', '<area shape="circle" coords="31,94,8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" /><area shape="circle" coords="156,48,8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" /><area shape="circle" coords="397,197,8" href="#" onclick="show_surface();return false;" alt="Hide Misthalin Underground" />', 105, 108, 'misthalin_under_se.png', '<area shape="circle" coords="35,253,8" href="#" target="_top" onclick="find_dungeon_id(\'Dorgesh-Kaan\');return false;" alt="Show Dorgesh-Kaan" />' ];
	dungeonList[18] = [ 'Mole Hole', 'Mole Hole', 104, 106, 'mole_hole.png', '<area shape="circle" coords="322,752,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Mole Hole" />' ];
	dungeonList[19] = [ 'Mos Le\'Harmless Cave', 'Mos Le\'Harmless Cave', 106, 110, 'mos_le_harmless.png', '<area shape="circle" coords="185,404,8" href="#" onclick="show_surface();return false;" alt="Hide Mos Le\'Harmless Cave" /><area shape="circle" coords="470,46,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Mos Le\'Harmless Cave" />' ];
	dungeonList[20] = [ 'Ourania Altar', 'Ourania Altar', 105, 103, 'ourania_altar.png', '<area shape="circle" coords="570,141,8" href="#" onclick="show_surface();return false;" alt="Hide Ourania Altar" /><area shape="rect" coords="547,133,799,389" href="dungeons/ourania_cave.html" target="_top" alt="Ourania Dungeon Guide" />' ];
	dungeonList[21] = [ 'Pollnivneach Slayer Dungeon', 'Pollnivneach Slayer Dungeon', 105, 108, 'pollnivneachwell_n.png', '', 106, 108, 'pollnivneachwell_s.png', '<area shape="circle" coords="214,409,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Pollnivneach Slayer Dungeon" />' ];
	dungeonList[22] = [ 'Smokey Well', 'Smokey Well', 106, 108, 'smokey_well.png', '<area shape="rect" coords="16,445,21,452" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Smokey Well" />' ];
	dungeonList[23] = [ 'Stronghold of Player Safety', 'Stronghold of Safety', 103, 106, 'sops_n.png', '<area shape="circle" coords="686,762,8" href="#" onclick="show_surface();return false;" alt="Hide Stronghold of Player Safety" />', 104, 106, 'sops_w.png', '<area shape="circle" coords="667,40,8" href="#" onclick="show_surface();return false;" alt="Hide Stronghold of Player Safety" />', 104, 107, 'sops_e.png', '<area shape="circle" coords="240,244,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Stronghold of Player Safety" />' ];
	dungeonList[24] = [ 'Stronghold of Security', 'Stronghold of Security', 104, 106, 'sos_w.png', '<area shape="circle" coords="686,185,8" href="#" onclick="show_surface();return false;" alt="Hide Stronghold of Security" />', 104, 107, 'sos_e.png', '<area shape="circle" coords="103,252,8" href="#" onclick="show_surface();return false;" alt="Hide Stronghold of Security" /><area shape="circle" coords="280,615,8" href="#" onclick="show_surface();return false;" alt="Hide Stronghold of Security" /><area shape="circle" coords="444,715,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Stronghold of Security" />', 105, 107, 'sos_s.png', '' ];
	dungeonList[25] = [ 'Taverley Dungeon', 'Taverley Dungeon', 104, 105, 'taverley_w.png', '<area shape="circle" coords="531,174,8" href="#" onclick="show_surface();return false;" alt="Hide Taverley Dungeon" /><area shape="circle" coords="703,283,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Taverley Dungeon" />', 104, 106, 'taverley_e.png', '' ];
	dungeonList[26] = [ 'Temple of Light', 'Temple of Light', 103, 103, 'temple_of_light_n.png', '', 104, 103, 'temple_of_light_sw.png', '<area shape="rect" coords="92,554,120,691" href="#" onclick="find_dungeon_id(\'Underground Pass\');return false;" alt="Show Underground Pass" />', 104, 104, 'temple_of_light_se.png', '<area shape="rect" coords="134,573,139,580" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Temple of Light" />' ];
	dungeonList[27] = [ 'Tolna\'s Rift (post-quest)', 'Tolna\'s Rift', 103, 107, 'tolna_nw.png', '', 103, 108, 'tolna_ne.png', '', 104, 107, 'tolna_sw.png', '', 104, 108, 'tolna_se.png', '<area shape="circle" coords="22,59,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Tolna\'s Rift" />' ];
	dungeonList[28] = [ 'Troll Stronghold', 'Troll Stronghold', 102, 104, 'troll_strong_nw.png', '', 102, 105, 'troll_strong_ne.png', '<area shape="circle" coords="518,696,8" href="#" onclick="show_surface();return false;" alt="Hide Troll Stronghold" />', 103, 104, 'troll_strong_sw.png', '<area shape="circle" coords="494,53,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Troll Stronghold" />', 103, 105, 'troll_strong_se.png', '' ];
	dungeonList[29] = [ 'TzHaar Area', 'TzHaar Area', 105, 105, 'tzhaar_w.png', '<area shape="circle" coords="754,445,8" href="#" target="_top" onclick="find_dungeon_id(\'Karamja Underground\');return false;" alt="Show Karamja Underground" />', 105, 106, 'tzhaar_e.png', '' ];
	dungeonList[30] = [ 'Underground Pass', 'Underground Pass', 104, 103, 'underground_pass_n.png', '', 105, 103, 'underground_pass_m.png', '', 106, 103, 'underground_pass_s.png', '<area shape="rect" coords="328,191,403,219" href="#" target="_top" onclick="find_dungeon_id(\'Temple of Light\');return false;" alt="Show Temple of Light" />' ];
	dungeonList[31] = [ 'Waterbirth Island Dungeon', 'Waterbirth Island Dungeon', 102, 104, 'waterbirth_n.png', '<area shape="circle" coords="469,498,8" href="#" onclick="show_surface();return false;" alt="Hide Waterbirth Island Dungeon" /><area shape="circle" coords="48,491,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Waterbirth Island Dungeon" />', 103, 104, 'waterbirth_n-1.png', '', 103, 105, 'waterbirth_n-1e.png', '', 104, 104, 'waterbirth_n-2.png', '', 104, 105, 'waterbirth_n-2e.png', '', 105, 105, 'waterbirth_s.png', '' ];
	dungeonList[32] = [ 'White Wolf Mountain Underground', 'White Wolf Mountain', 103, 105, 'wwm_nw.png', '<area shape="circle" coords="524,581,8" href="#" onclick="show_surface();return false;" alt="Hide White Wolf Mountain Underground" /><area shape="circle" coords="436,725,8" href="#" onclick="show_surface();return false;" alt="Hide White Wolf Mountain Underground" /><area shape="circle" coords="665,742,8" href="#" onclick="show_surface();return false;" alt="Hide White Wolf Mountain Underground" /><area shape="circle" coords="725,633,8" href="#" onclick="show_surface();return false;" alt="Hide White Wolf Mountain Underground" />', 103, 106, 'wwm_ne.png', '', 104, 105, 'wwm_sw.png', '<area shape="circle" coords="656,10,8" href="#" target="_top" onclick="find_dungeon_id(\'Keldagrim\');return false;" alt="Show Keldagrim" />', 104, 106, 'wwm_se.png', '' ];
	dungeonList[33] = [ 'Wilderness Dungeons, including KBD', 'Wilderness Dungeons', 101, 106, 'wildy_nw.png', '<area shape="circle" coords="388,409,8" href="#" onclick="show_surface();return false;" alt="Hide Wilderness Dungeons" /><area shape="circle" coords="548,544,8" href="#" onclick="show_surface();return false;" alt="Hide Wilderness Dungeons" />', 101, 107, 'wildy_ne.png', '<area shape="circle" coords="29,451,8" href="#" onclick="show_surface();return false;" alt="Hide Wilderness Dungeons" />', 102, 106, 'wildy_sw.png', '<area shape="circle" coords="436,67,8" href="#" onclick="show_surface();return false;" alt="Hide Wilderness Dungeons" /><area shape="circle" coords="645,38,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Wilderness Dungeons" />', 102, 107, 'wildy_se.png', '' ];
	dungeonList[34] = [ 'Yanille Dungeon', 'Yanille Dungeon', 105, 104, 'yanille_n.png', '<area shape="circle" coords="230,598,8" href="#" onclick="show_surface();return false;" alt="Hide Yanille Dungeon" /><area shape="circle" coords="367,771,8" href="#" target="_top" onclick="show_surface();return false;" alt="Hide Yanille Dungeon" />', 106, 104, 'yanille_s.png', '' ];
	dungeonList[35] = [ 'Zanaris', 'Zanaris', 105, 107, 'zanaris_n.png', '<area shape="circle" coords="375,405,8" href="#" onclick="show_surface();return false;" alt="Hide Zanaris" /><area shape="circle" coords="511,413,8" href="#" onclick="show_surface();return false;" alt="Hide Zanaris" /><area shape="rect" coords="352,371,406,386" href="#" target="_top" onclick="find_dungeon_id(\'Evil Chicken Lair\');return false;" alt="Show Evil Chicken\'s Lair" />', 106, 107, 'zanaris_s.png', '' ];
}

/*
 * Prints a list of dungeon map images.
 */

function printDungeonList() {
	var matchRegex = /https?:\/\/([\-\w\.]+)+(:\d+)?(\/([\w\/_\.]*(\?\S+)?)?)?/;
	var listEl = document.createElement( "div" );
	listEl.setAttribute( "style", "background:#ccc;width:700px" );
	listEl.id = "UrlList";
	document.body.appendChild( listEl );
	
	for( var i in dungeonList ) {
		for( var k in dungeonList[i] ) {
			if( matchRegex.test( dungeonList[i][k] ) ) {
				document.getElementById( "UrlList" ).innerHTML += '<a href="' + dungeonList[i][k] + '" target="_top" >' + dungeonList[i][k] + '</a><br /><br />';
			}
		}
	}
}