function createLocationPin(point)
{
	var Icon = new GIcon();
	Icon.image = "/images/map/pin.png";
	Icon.iconSize = new GSize(75, 85);
	Icon.iconAnchor = new GPoint(38, 84);

	return new GMarker(point, Icon);
}

function HighcroftMapControl()
{
}

HighcroftMapControl.prototype = new GControl();

HighcroftMapControl.prototype.initialize = function(map)
{
	var container = document.createElement("div");
	container.style.width = "101px";
	container.style.height = "52px";
	container.style.position = "relative";
	container.style.background = "url(/images/map/controls.png)";
	container.id = "controls";

	if (document.all) // IE fix
	{
		container.style.background = "none";
		var bg = document.createElement("div");
		bg.style.height = "100%";
		bg.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='/images/map/controls.png');";
		container.appendChild(bg);
	}

	var moveNorthDiv = this.createButton_(19, 6);
	container.appendChild(moveNorthDiv);
	GEvent.addDomListener(moveNorthDiv, "click", function()
	{
		map.panDirection(0, +1);
	});

	var moveEastDiv = this.createButton_(6, 19);
	container.appendChild(moveEastDiv);
	GEvent.addDomListener(moveEastDiv, "click", function()
	{
		map.panDirection(+1, 0);
	});

	var moveSouthDiv = this.createButton_(19, 32);
	container.appendChild(moveSouthDiv);
	GEvent.addDomListener(moveSouthDiv, "click", function()
	{
		map.panDirection(0, -1);
	});

	var moveWestDiv = this.createButton_(32, 19);
	container.appendChild(moveWestDiv);
	GEvent.addDomListener(moveWestDiv, "click", function()
	{
		map.panDirection(-1, 0);
	});

	var zoomInDiv = this.createButton_(62, 19);
	container.appendChild(zoomInDiv);
	GEvent.addDomListener(zoomInDiv, "click", function()
	{
		map.zoomIn();
	});

	var zoomOutDiv = this.createButton_(81, 19);
	container.appendChild(zoomOutDiv);
	GEvent.addDomListener(zoomOutDiv, "click", function()
	{
		map.zoomOut();
	});

	map.getContainer().appendChild(container);
	return container;
}

HighcroftMapControl.prototype.getDefaultPosition = function()
{
	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7, 7));
}

HighcroftMapControl.prototype.createButton_ = function(x, y)
{
	var button = document.createElement("div");
	button.style.position = "absolute";
	button.style.display = "block";
	button.style.width = "14px";
	button.style.height = "14px";
	button.style.top = y + "px";
	button.style.left = x + "px";
	button.style.cursor = document.all ? "hand" : "pointer";
	return button;
}
