									
function highlight_this(x)
	{
		element_color = document.getElementById(x)
		if (element_color.style.backgroundColor == 'white' && document.getElementById('active_code').innerHTML != x)
			{element_color.style.backgroundColor = 'yellow'}
		else
			{
				if (document.getElementById('active_code').innerHTML != undefined  && document.getElementById('active_code').innerHTML != x)
					{element_color.style.backgroundColor = 'white'}
				else
					{element_color.style.backgroundColor = '#c6e2ff'}
				}
	};

	function show_area(area,province)
		{
					var map_link = document.getElementById('map_link')
					var main_area = document.getElementById('province_content')
					var left_column = document.getElementById('left_column')
					var map_control = document.getElementById('map_control')

						if (map_link.innerHTML == 'Show Map')
							{
								map_link.innerHTML = 'Hide Map';
								left_column.style.display = 'none';
								main_area.style.display = 'none';
										
								// Create a map object 
								map_control.style.display = 'block';

								var map_location = province+'+Canada'
								var zoom = 14

								document.getElementById('active_location').innerHTML = province + ', Canada'
								map.drawZoomAndCenter(map_location,zoom);
								map.addZoomLong();
								map.addPanControl();

								document.getElementById('active_code').innerHTML = "province_view"								

							}
						else
							{
								map_link.innerHTML = 'Show Map';
								map_control.style.display = 'none';
								left_column.style.display = 'block';
								main_area.style.display = 'block';
							}
		}

		
		function set_map(x,y,z){

			var active_location = document.getElementById('active_location')
			var active_link = document.getElementById('active_link')
			var active_code = document.getElementById('active_code')

			if (active_code.innerHTML != '')
				{
					current_location_code = active_code.innerHTML
					var map_location = x+'+'+y
					active_location.innerHTML = x+', '+y					
					var zoom = 10
				}
			else
				{
					current_location_code = ''
				}
			
			var map_location_link = document.getElementById(z)
			
			if (current_location_code != '' && current_location_code != 'province_view')
				{
					previous_location = current_location_code
					document.getElementById(previous_location).style.backgroundColor = 'white';
				}
				
				active_code.innerHTML = z

				map_location_link.style.backgroundColor = "#c6e2ff"
				// Display the map centered on given address
				//	active_location.innerHTML = x+', '+y
					active_link.innerHTML = document.getElementById(z+'_link').innerHTML
					map.drawZoomAndCenter(map_location,zoom);
					map.addZoomLong();
					map.addPanControl();



				};

