var icon = new GIcon();

var iconS = new GIcon();

var map;



icon.image = "/users/obparadise/pictures/marker4a.png";

icon.iconSize = new GSize(34, 34);

icon.shadowSize = new GSize(1, 1);

// icon.iconAnchor = new GPoint(6, 34);

icon.iconAnchor = new GPoint(-10, 20);

// icon.infoWindowAnchor = new GPoint(6, 0);

icon.infoWindowAnchor = new GPoint(19, -11);



iconS.image = "/users/obparadise/pictures/marker5.png";

iconS.iconSize = new GSize(24, 24);

iconS.shadowSize = new GSize(1, 1);

// iconS.iconAnchor = new GPoint(7, 7);

iconS.iconAnchor = new GPoint(-10, 20);

// iconS.infoWindowAnchor = new GPoint(-6, -6);

iconS.infoWindowAnchor = new GPoint(10, -16);



function createMarker(ptn,pte, infoText,icon) {

  point = new GLatLng(ptn, pte);

  /* var winTxt = '<div>'+infoText+'</div>'; */

  var winTxt = ''+infoText+'';

  var cmdLoc = '<div class="mapLoc"><a style="display:none" class="png-fix" id="mapBack" href="javascript:$(\'#mapBack\').hide();$(\'#mapMap\').show();map.setCenter(new GLatLng('+ptn+', '+pte+'));map.setZoom(8); map.panBy(new GSize(0, 50));">&lt;&lt; zpět</a> <a id="mapMap" href="javascript:$(\'#mapBack\').show();$(\'#mapMap\').hide();map.setCenter(new GLatLng('+ptn+', '+pte+'));map.setZoom(16); map.panBy(new GSize(0, 50));">na mapě &gt;&gt;</a></div>';

  var marker = new GMarker(point,icon);

  // if(icon != iconS) {

    GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(winTxt+cmdLoc);});

    GEvent.addListener(marker, "mouseover", function() {marker.openInfoWindowHtml(winTxt+cmdLoc);});

  // }

  return marker;

}



    	function InitGMap() {

    	  if (GBrowserIsCompatible()) {
			var mp = document.getElementById("mapProjector");
			mp.style.height = "400px";
     	   	map = new GMap2(document.getElementById("mapProjector"));
     	   	map.getPane(G_MAP_FLOAT_PANE).style.marginTop = "30px";
     	   	map.addControl(new GSmallMapControl());
     	   	map.setCenter(new GLatLng(30.30933333,-87.52597222), 16);
     	   map.addOverlay(new GMarker(new GLatLng(30.30933333,-87.52597222)));
     	   map.setUIToDefault();
//map.addOverlay(createMarker(30.30933333,-87.52597222, '',iconS));

    	  }

  	  }

	//  $(document).ready(InitGMap);
