﻿function BuildYahooLocation(mapDivId, sLocation, iZoomLevel, maptype, wid, hei) {
    // Create a map object
    //var map = new YMap(document.getElementById('map'));
    var map = new YMap(document.getElementById(mapDivId), maptype, new YSize(wid, hei));

    // Add map type control   
    map.addTypeControl();

    // Add map zoom (long) control   
    map.addZoomLong();

    // Set map type to either of: YAHOO_MAP_SAT, YAHOO_MAP_HYB, YAHOO_MAP_REG   
    //map.setMapType(YAHOO_MAP_REG);

    // Display the map centered on a geocoded location
    map.drawZoomAndCenter(sLocation, iZoomLevel);

    // Create a new marker for an address
    //var myMarkerContent = "<h2>test</h2>";
    var myMarker = new YMarker(sLocation);
    //myMarker.addLabel('<b sytle="color:white">X</b>');
    map.addOverlay(myMarker);

    //alert(YAHOO_MAP_REG);
}
