function walk(room, exit)
{
	var i = 0;
	var j = 0;

	function displayRoom()
	{
		var wrapper = document.createElement("wrapper");
		wrapper.setAttribute("id", "wrapper");
		document.body.appendChild(wrapper);
		
		while (j < room[i].length)
			displayImage(room[i][j++]);
	}

	function displayImage(image)
	{
		var wrapper = document.getElementById("wrapper");
		var a = document.createElement("a");
		var img = document.createElement("img");
		a.appendChild(img);

		img.src = image.file;
		img.title = image.title;
		img.width = image.width;
		img.height = image.height;
		a.style.position = "relative";
		a.style.left = image.left;
		a.style.top = image.top;

		img.onclick = function()
			{
				if (++i == room.length)
					window.location = exit;
				else
					{
						j = 0;
						document.body.removeChild(wrapper);
						displayRoom();
					}
			}
		
		wrapper.appendChild(a);
	}

	displayRoom();	
}
