	var timerID = null, timerID2 = null, wait_5_seconds = 0;
	var temp_x = 0, temp_y = 0, inc_count = 0, inc_x = 0, inc_y = 0;
	var pos_x = 0, pos_y = 0, orig_x = 0; orig_y = 0;

	function enlargePicture(x, y)
	{
		if((!timerID) && (!timerID2))
		{
			temp_x = 150;
			temp_y = 150;

			inc_x = (x - 150.0) / 50.0;
			inc_y = (y - 150.0) / 50.0;

			orig_x = document.loc_map.style.left.replace(/px/, "") - 0;
			orig_y = document.loc_map.style.top.replace(/px/, "") - 0;

			pos_x = (document.loc_map.style.left.replace(/px/, "") - 10) / 50.0;
			pos_y = (document.loc_map.style.top.replace(/px/, "") - 10) / 50.0;
		
			timerID = setInterval("enlargeTimer()", 25);
		}
	}

	function enlargeTimer()
	{
		if(document.loc_map.style.height.replace(/px/, "") >= 300)
		{
			if(timerID) clearInterval(timerID);
			timerID = null;
			wait_5_seconds = 1;
			if(!timerID2) timerID2 = setTimeout("five_seconds_are_up()", 5000);
			return;
		}

		inc_count++;

		document.loc_map.style.width  = Math.round((temp_x - 0) + ((inc_x * inc_count) - 0)) + "px";
		document.loc_map.style.height = Math.round((temp_y - 0) + ((inc_y * inc_count) - 0)) + "px";

		document.loc_map.style.left = orig_x - (pos_x * inc_count) + "px";
		document.loc_map.style.top  = orig_y - (pos_y * inc_count) + "px";
	}

	function five_seconds_are_up()
	{
		wait_5_seconds = 0;
		startShrink();
	}

	function startShrink()
	{
		if(wait_5_seconds == 0)
		{
			if(timerID2) clearTimeout(timerID2);
			timerID2 = null;
			if((!timerID) && (canClear == 1)) timerID = setInterval("shrinkTimer()", 25);
		}
	}

	function shrinkTimer()
	{
		if(document.loc_map.style.height.replace(/px/, "") <= 150)
		{
			document.loc_map.style.width = "150px";
			document.loc_map.style.height = "150px";
			if(timerID) clearInterval(timerID);
			timerID = null;
			return;
		}

		inc_count--;

		document.loc_map.style.width  = Math.round((temp_x - 0) + ((inc_x * inc_count) - 0)) + "px";
		document.loc_map.style.height = Math.round((temp_y - 0) + ((inc_y * inc_count) - 0)) + "px";

		document.loc_map.style.left = orig_x - (pos_x * inc_count) + "px";
		document.loc_map.style.top  = orig_y - (pos_y * inc_count) + "px";
	}