// JavaScript Document

    function initialize(x,y) {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(20.994137,-89.60638), 12);
		map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());
		
		// Create our "tiny" marker icon
		var tinyIcon = new GIcon();
		tinyIcon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
		tinyIcon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
		tinyIcon.iconSize = new GSize(12, 20);
		tinyIcon.shadowSize = new GSize(22, 20);
		tinyIcon.iconAnchor = new GPoint(6, 20);
		tinyIcon.infoWindowAnchor = new GPoint(5, 1);
		// Set up our GMarkerOptions object literal
		markerOptions = { icon:tinyIcon };
		
		if(!x || x==0){		var point = new GPoint (-4,40);
		}else {	var point = new GPoint (x,y);		}
		
		
		var marker = new GMarker(point, markerOptions); 
		map.addOverlay(marker); 
		
		GEvent.addListener(map, "click", function (overlay,point){
			if (point){
				marker.setPoint(point);
				document.form1.x.value=point.x
				document.form1.y.value=point.y
			}
		});
      }
    }
	

