function createLetterMarker(point, icon_url) {
  var icon = new GIcon();
  icon.shadow = "/images/googlemaps/shadow50.png";
  icon.iconSize = new GSize(20, 34);
  icon.shadowSize = new GSize(37, 34);
  icon.iconAnchor = new GPoint(9, 34);
  icon.infoWindowAnchor = new GPoint(9, 2);
  icon.infoShadowAnchor = new GPoint(18, 25);
  icon.image = icon_url;
  var marker = new GMarker(point, icon);
  return marker;
}

// Piotr 24.06.08 - popup a bubble when user selects marker
function setMarkerText(marker, html) {
  GEvent.addListener(marker,"mouseover", function() {
    try {
      marker.openExtInfoWindow(
        map,
        "custom_info_window_bubble",
        html,
        {beakOffset: 2}
        );
    } catch (err){
    }
  });
}


// like previous but for little house marker
function createLetterMarker_v2(point, icon_url, html) {
  var icon = new GIcon();
  icon.shadow = "/images/googlemaps/sign_shadow.png";
  icon.iconSize = new GSize(20, 33);
  icon.shadowSize = new GSize(32, 33);
  icon.iconAnchor = new GPoint(9, 33);
  icon.image = icon_url;
  icon.infoWindowAnchor = new GPoint(3,2);

  var marker = new GMarker(point, icon);
  // Piotr 24.06.08 - popup a bubble with details when user selects marker
  if (html!= null) {
    setMarkerText(marker,html);
  }

  return marker;
}

function createLetterMarkerLink(point, icon_url, url) {
  var marker = createLetterMarker(point, icon_url);
	GEvent.addListener(marker, 'click', function() {
		window.location = url;
  });
  return marker;
}

function createCentredImageLink(point, icon_url, url, height, width) {
  var icon = new GIcon();
  icon.iconSize = new GSize(height, width);
  icon.iconAnchor = new GPoint((width / 2) - 1, (height / 2) + 1);
  icon.image = icon_url;
  var marker = new GMarker(point, icon);
	GEvent.addListener(marker, 'click', function() {
		window.location = url;
  });
  return marker;
}

