function YahooCreateMarker(point, title) {
  var marker= new YMarker(point);
  YEvent.Capture(marker, EventsList.MouseClick, function(){marker.openSmartWindow(title);});
  return marker;
}

           
function YahooShow(GxMapControl){
    var mapControl=GxMapControl;
    document.getElementById(mapControl.ContainerName).innerHTML = '<div id="' + mapControl.ContainerName + '_MAP" style="width: ' + mapControl.Width + 'px; height: ' + mapControl.Height + 'px;"></div>';
    var map = new YMap(document.getElementById(GxMapControl.ContainerName + '_MAP'));

    Coord = mapControl.City;
    Coord = Coord.split(',');
        
    if (Coord!="0,0") map.drawZoomAndCenter(new YGeoPoint(Coord[0],Coord[1]),parseInt(mapControl.Precision));
    else map.drawZoomAndCenter(new YGeoPoint(mapControl.Latitude,mapControl.Longitude),parseInt(mapControl.Precision));


    // Controls
    if (mapControl.Type_Control==CONTROL_TYPE_VISIBLE) map.addTypeControl();
    if (mapControl.Small_Zoom_Control==CONTROL_SMALL_ZOOM_VISIBLE) map.addZoomShort();
    if (mapControl.Scale_Control==CONTROL_SCALE_VISIBLE) map.addZoomScale(); else map.removeZoomScale();
    if (mapControl.Large_Control==CONTROL_LARGE_VISIBLE) {
        map.addPanControl();
        map.addZoomLong();
    }
    if (mapControl.Small_Control==CONTROL_SMALL_VISIBLE) {
        map.addPanControl();
        map.addZoomShort();
    }
    
    /// No encontre overview control para Yahoo.
    /// if (mapControl.OverView_Control==CONTROL_OVERVIEW_VISIBLE) {};

    // Map Type
    switch (mapControl.Type)
    {
        case TYPE_NORMAL:
            map.setMapType(YAHOO_MAP_REG);        
            break;
        case TYPE_SATELLITE:
            map.setMapType(YAHOO_MAP_SAT);
            break;
        case TYPE_HYBRID:             
            map.setMapType(YAHOO_MAP_HYB);
            break;
    }
    
    // Points
    var point;
    var infowin;
    for(var i=0;mapControl.GxMap.Points[i]!=undefined;i++){
        point = new YGeoPoint(mapControl.GxMap.Points[i].PointLat, mapControl.GxMap.Points[i].PointLong);
        infowin = "<B>" + mapControl.GxMap.Points[i].PointInfowinTit + "</B><Br>";
        infowin += mapControl.GxMap.Points[i].PointInfowinDesc + "<Br>";
        infowin += "<A HREF=" + mapControl.GxMap.Points[i].PointInfowinLink + ">" + mapControl.GxMap.Points[i].PointInfowinLinkDsc + "</A>" + "<Br>";
        var varUrl = mapControl.GxMap.Points[i].PointInfowinImg;
        infowin += "<img src=" + '"' + varUrl + '"' + "/>" + "<Br>";
        map.addOverlay(YahooCreateMarker(point,infowin));
    }
}
