var map_regions = {
	'#tour-map area' : function (element)
	{
		element.onmouseover = function ()
		{
			show(element.id+'-hidden', false);
		}
		
		element.onmouseout = function ()
		{
			show(element.id+'-hidden', true);
		}
	},
	'.hidden-map' : function (element)
	{
		element.onclick = function ()
		{
			window.location = document.getElementById(element.id.substring(0, (element.id.length-7))).href;
		}
		
		element.onmouseover = function ()
		{
			show(element.id, false);
		}
		
		element.onmouseout = function ()
		{
			show(element.id, true);
		}
	},
	
	
	'#map-north-america-header' : function (element)
	{
		element.onclick = function ()
		{
			window.location = document.getElementById('map-north-america').href;
		}
		
		element.onmouseover = function ()
		{
			show('map-north-america-hidden', false);
		}
		
		element.onmouseout = function ()
		{
			show('map-north-america-hidden', true);
		}
	},
	
	
	'#map-south-america-header' : function (element)
	{
		element.onclick = function ()
		{
			window.location = document.getElementById('map-south-america').href;
		}
		
		element.onmouseover = function ()
		{
			show('map-south-america-hidden', false);
		}
		
		element.onmouseout = function ()
		{
			show('map-south-america-hidden', true);
		}
	},
	
	
	'#map-europe-header' : function (element)
	{
		element.onclick = function ()
		{
			window.location = document.getElementById('map-europe').href;
		}
		
		element.onmouseover = function ()
		{
			show('map-europe-hidden', false);
		}
		
		element.onmouseout = function ()
		{
			show('map-europe-hidden', true);
		}
	},
	
	
	'#map-asia-header' : function (element)
	{
		element.onclick = function ()
		{
			window.location = document.getElementById('map-asia').href;
		}
		
		element.onmouseover = function ()
		{
			show('map-asia-hidden', false);
		}
		
		element.onmouseout = function ()
		{
			show('map-asia-hidden', true);
		}
	},
	
	
	'#map-africa-header' : function (element)
	{
		element.onclick = function ()
		{
			window.location = document.getElementById('map-africa').href;
		}
		
		element.onmouseover = function ()
		{
			show('map-africa-hidden', false);
		}
		
		element.onmouseout = function ()
		{
			show('map-africa-hidden', true);
		}
	},
	
	
	'#map-australia-header' : function (element)
	{
		element.onclick = function ()
		{
			window.location = document.getElementById('map-australia').href;
		}
		
		element.onmouseover = function ()
		{
			show('map-australia-hidden', false);
		}
		
		element.onmouseout = function ()
		{
			show('map-australia-hidden', true);
		}
	}
};

function show (the_div, hide)
{
	if (document.getElementById(the_div))
	{
		if (hide)
		{
			document.getElementById(the_div).style.display = 'none';
		}
		else
		{
			document.getElementById(the_div).style.display = 'block';
		}
	}
}

Behaviour.register(map_regions);