var dungeonList = [];

function initDungeons() {
	dungeonList[0] = [ 'RuneScape Surface', 'RuneScape Surface' ];
	dungeonList[1] = [ 'Draynor Manor Basement', 'Draynor Manor Basement', 100, 101, 'f2p/draynor-manor-basement.png', '<area shape="circle" coords="339,677,8" href="#" onclick="show_surface();return false;" alt="Hide Draynor Manor Basement" /><area shape="circle" coords="433,697,8" href="#" onclick="show_surface();return false;" alt="Hide Draynor Manor Basement" />' ];
	dungeonList[2] = [ 'Draynor Sewers', 'Draynor Sewers', 101, 101, 'f2p/draynor-sewer.png', '<area shape="circle" coords="307,231,8" href="#" onclick="show_surface();return false;" alt="Hide Draynor Sewers" /><area shape="circle" coords="444,352,8" href="#" onclick="show_surface();return false;" alt="Hide Draynor Sewers" />' ];
	dungeonList[3] = [ 'Dwarven Mines', 'Dwarven Mines', 100, 100, 'f2p/dwarven-mines-nw.png', '<area shape="circle" coords="754,339,8" href="#" onclick="show_surface();return false;" alt="Hide Dwarven Mines" />', 100, 101, 'f2p/dwarven-mines-ne.png', '<area shape="circle" coords="46,323,8" href="#" onclick="show_surface();return false;" alt="Hide Dwarven Mines" /><area shape="circle" coords="207,612,8" href="#" onclick="show_surface();return false;" alt="Hide Dwarven Mines" /><area shape="circle" coords="46,769,8" href="#" onclick="show_surface();return false;" alt="Hide Dwarven Mines" />', 101, 101, 'f2p/dwarven-mines-s.png', '' ];
	dungeonList[4] = [ 'Edgeville Dungeon', 'Edgeville Dungeon', 100, 101, 'f2p/edgeville-dungeon.png', '<area shape="circle" coords="359,251,8" href="#" onclick="show_surface();return false;" alt="Hide Edgeville Dungeon" /><area shape="circle" coords="435,311,8" href="#" onclick="show_surface();return false;" alt="Hide Edgeville Dungeon" />' ];
	dungeonList[5] = [ 'Ice Cavern', 'Ice Cavern', 101, 100, 'f2p/ice-cavern-w.png', '<area shape="rect" coords="796,725,799,737" href="#" onclick="show_surface();return false;" alt="Hide Ice Cavern" />', 101, 101, 'f2p/ice-cavern-e.png', '<area shape="circle" coords="2,731,8" href="#" onclick="show_surface();return false;" alt="Hide Ice Cavern" />' ];
	dungeonList[6] = [ 'Karamja Dungeon', 'Karamja Dungeon', 101, 100, 'f2p/karamja-dungeon.png', '<area shape="circle" coords="105,295,8" href="#" onclick="show_surface();return false;" alt="Hide Karamja Dungeon" /><area shape="circle" coords="198,649,8" href="#" onclick="show_surface();return false;" alt="Hide Karamja Dungeon" />' ];
	dungeonList[7] = [ 'Melzar\'s Maze Dungeon', 'Melzar\'s Maze Dungeon', 101, 100, 'f2p/melzars-maze.png', '<area shape="circle" coords="466,331,8" href="#" onclick="show_surface();return false;" alt="Hide Melzar\'s Maze" />' ];
	dungeonList[8] = [ 'Stronghold of Player Safety', 'Stronghold of Player Safety', 100, 100, 'f2p/sops-w.png', '', 100, 101, 'f2p/sops-e.png', '<area shape="circle" coords="291,218,8" href="#" onclick="show_surface();return false;" alt="Hide Stronghold of Player Safety" /><area shape="circle" coords="271,295,8" href="#" onclick="show_surface();return false;" alt="Hide Stronghold of Player Safety" /><area shape="circle" coords="644,501,8" href="#" onclick="show_surface();return false;" alt="Hide Stronghold of Player Safety" />', 101, 101, 'f2p/sops-s.png', '' ];
	dungeonList[9] = [ 'Stronghold of Security', 'Stronghold of Security', 100, 101, 'f2p/sos-nw.png', '<area shape="circle" coords="295,443,8" href="#" onclick="show_surface();return false;" alt="Hide Stronghold of Security" /><area shape="circle" coords="512,511,8" href="#" onclick="show_surface();return false;" alt="Hide Stronghold of Security" />', 100, 102, 'f2p/sos-ne.png', '', 101, 101, 'f2p/sos-sw.png', '<area shape="circle" coords="689,73,8" href="#" onclick="show_surface();return false;" alt="Hide Stronghold of Security" />', 101, 102, 'f2p/sos-se.png', '<area shape="circle" coords="53,173,8" href="#" onclick="show_surface();return false;" alt="Hide Stronghold of Security" />' ];
	dungeonList[10] = [ 'Varrock Bank Vault', 'Varrock Bank Vault', 100, 101, 'f2p/varrock-bank-vault.png', '<area shape="circle" coords="724,395,8" href="#" onclick="show_surface();return false;" alt="Hide Varrock Bank Vault" />' ];
	dungeonList[11] = [ 'Varrock Sewers', 'Varrock Sewers', 100, 101, 'f2p/varrock-sewers-w.png', '', 100, 102, 'f2p/varrock-sewers-e.png', '<area shape="circle" coords="121,291,8" href="#" onclick="show_surface();return false;" alt="Hide Varrock Sewers" />' ];
	dungeonList[12] = [ 'Wizards\' Tower Basement', 'Wizards\' Tower Basement', 101, 101, 'f2p/wizards-tower.png', '<area shape="circle" coords="388,687,8" href="#" onclick="show_surface();return false;" alt="Hide Wizard\'s Tower Basement" />' ];
}

/*
 * 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 />';
			}
		}
	}
}