function initialize() {
    var myOptions = {
        zoom: 11,
        center: new google.maps.LatLng(-31.408777,-64.185734),
        mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    var map = new google.maps.Map(document.getElementById("mapa_locales"),
        myOptions);
  
    /*
 Asignar las coordenadas de los lugares
 */
    var lugares = [
  ['TEJANO - 9 de Julio 158', -31.41418,-64.185902, 1],
  ['TEJANO - 9 de Julio 269', -31.413727,-64.187431, 2],
  ['TEJANO - 9 de Julio 124', -31.414311,-64.18544, 3],
  ['TEJANO - Dean Funes 154', -31.415317,-64.186321, 4],
  ['TEJANO - Elias Yofre 1270', -31.450922,-64.177323, 5],
  ['TEJANO - Paseo Rivera Indarte', -31.349679,-64.221439, 6],
  ['TEJANO - Obispo Trejo 158', -31.41733,-64.186345, 7],
  ['TEJANO - Nuevo Centro Shopping', -31.413238,-64.204389, 8]
    ];
 
    /*
 definir los carteles en el mismo orden q las coordenadas
 */
    var cartel=new Array();
    cartel[0] = '<div id="content">'+
    '<div id="siteNotice">'+
    '<h1 id="titulo" class="titulo_mapa">TEJANO | Jeans + Complementos</h1>'+
    '</div>'+
    '<h2 id="direccion" class="contenido_mapa">9 de Julio 158 | Tel: (+54) 0351 - 421 7744</h2>'+
    '<div id="imagen">'+
    '<img src="imagenes/general/img_mapa_01.jpg" />'+
    '</div>'+
	'<div id="lugar" class="contenido_mapa">'+
    '<p>C&oacute;rdoba - Argentina</p>'+
    '</div>'+
    '</div>';

    cartel[1] = '<div id="content">'+
    '<div id="siteNotice">'+
    '<h1 id="titulo" class="titulo_mapa">TEJANO | Jeans + Complementos</h1>'+
    '</div>'+
    '<h2 id="direccion" class="contenido_mapa">9 de Julio 269 | Tel: (+54) 0351 - 424 8883</h2>'+
    '<div id="imagen">'+
    '<img src="imagenes/general/img_mapa_02.jpg" />'+
    '</div>'+
	'<div id="lugar" class="contenido_mapa">'+
    '<p>C&oacute;rdoba - Argentina</p>'+
    '</div>'+
    '</div>';
	
    cartel[2] = '<div id="content">'+
    '<div id="siteNotice">'+
    '<h1 id="titulo" class="titulo_mapa">TEJANO | Jeans + Complementos</h1>'+
    '</div>'+
    '<h2 id="direccion" class="contenido_mapa">9 de Julio 124 | Tel: (+54) 0351 - 425 6466</h2>'+
    '<div id="imagen">'+
    '<img src="imagenes/general/img_mapa_03.jpg" />'+
    '</div>'+
	'<div id="lugar" class="contenido_mapa">'+
    '<p>C&oacute;rdoba - Argentina</p>'+
    '</div>'+
    '</div>';
	
    cartel[3] = '<div id="content">'+
    '<div id="siteNotice">'+
    '<h1 id="titulo" class="titulo_mapa">TEJANO | Jeans + Complementos</h1>'+
    '</div>'+
    '<h2 id="direccion" class="contenido_mapa">Dean Funes 154 | Tel: (+54) 0351 - 423 3088</h2>'+
    '<div id="imagen">'+
    '<img src="imagenes/general/img_mapa_04.jpg" />'+
    '</div>'+
	'<div id="lugar" class="contenido_mapa">'+
    '<p>C&oacute;rdoba - Argentina</p>'+
    '</div>'+
    '</div>';
	
    cartel[4] = '<div id="content">'+
    '<div id="siteNotice">'+
    '<h1 id="titulo" class="titulo_mapa">TEJANO | Jeans + Complementos</h1>'+
    '</div>'+
    '<h2 id="direccion" class="contenido_mapa">Elias Yofre 1270 | Tel: (+54) 0351 - 486 2888</h2>'+
    '<div id="imagen">'+
    '<img src="imagenes/general/img_mapa_05.jpg" />'+
    '</div>'+
	'<div id="lugar" class="contenido_mapa">'+
    '<p>C&oacute;rdoba - Argentina</p>'+
    '</div>'+
    '</div>';
	
	cartel[5] = '<div id="content">'+
    '<div id="siteNotice">'+
    '<h1 id="titulo" class="titulo_mapa">TEJANO | Jeans + Complementos</h1>'+
    '</div>'+
    '<h2 id="direccion" class="contenido_mapa">Paseo Rivera Indarte | Tel: (+54) 03543 - 40 2333</h2>'+
    '<div id="imagen">'+
    '<img src="imagenes/general/img_mapa_06.jpg" />'+
    '</div>'+
	'<div id="lugar" class="contenido_mapa">'+
    '<p>C&oacute;rdoba - Argentina</p>'+
    '</div>'+
    '</div>';
	
    cartel[6] = '<div id="content">'+
    '<div id="siteNotice">'+
    '<h1 id="titulo" class="titulo_mapa">TEJANO | Jeans + Complementos</h1>'+
    '</div>'+
    '<h2 id="direccion" class="contenido_mapa">Obispo Trejo 158 | Tel: (+54) 0351 - 422 0061</h2>'+
    '<div id="imagen">'+
    '<img src="imagenes/general/img_mapa_07.jpg" />'+
    '</div>'+
	'<div id="lugar" class="contenido_mapa">'+
    '<p>C&oacute;rdoba - Argentina</p>'+
    '</div>'+
    '</div>';
	
	cartel[7] = '<div id="content">'+
    '<div id="siteNotice">'+
    '<h1 id="titulo" class="titulo_mapa">TEJANO | Jeans + Complementos</h1>'+
    '</div>'+
    '<h2 id="direccion" class="contenido_mapa">Nuevo Centro Shopping | Tel: (+54) 0351 - 482 8134</h2>'+
    '<div id="imagen">'+
    '<img src="imagenes/general/img_mapa_08.jpg" />'+
    '</div>'+
	'<div id="lugar" class="contenido_mapa">'+
    '<p>C&oacute;rdoba - Argentina</p>'+
    '</div>'+
    '</div>';
  
  
    setMarkers(map, lugares, cartel);
  
  	
}

/**
 * Data for the markers consisting of a name, a LatLng and a zIndex for
 * the order in which these markers should display on top of each
 * other.
 */
 
	

function attachM(map, marker, number, cartel) {

    var infowindow = new google.maps.InfoWindow(
    {
        content: cartel[number],
        size: new google.maps.Size(50,50)
    });
    google.maps.event.addListener(marker, 'click', function() {
        infowindow.open(map,marker);
    });
}


function setMarkers(map, locations, cartel ) {
    // Add markers to the map

    // Marker sizes are expressed as a Size of X,Y
    // where the origin of the image (0,0) is located
    // in the top left of the image.

    // Origins, anchor positions and coordinates of the marker
    // increase in the X direction to the right and in
    // the Y direction down.
    var image = new google.maps.MarkerImage('imagenes/general/marcador_mapa.png',
        // This marker is 20 pixels wide by 32 pixels tall.
        new google.maps.Size(30, 50),
        // The origin for this image is 0,0.
        new google.maps.Point(0,0),
        // The anchor for this image is the base of the flagpole at 0,32.
        new google.maps.Point(50, 50));
    var shadow = new google.maps.MarkerImage('imagenes/general/sombra_marcador_mapa.png',
        // The shadow image is larger in the horizontal dimension
        // while the position and offset are the same as for the main image.
        new google.maps.Size(55, 34),
        new google.maps.Point(0,0),
        new google.maps.Point(45, 30));
    // Shapes define the clickable region of the icon.
    // The type defines an HTML <area> element 'poly' which
    // traces out a polygon as a series of X,Y points. The final
    // coordinate closes the poly by connecting to the first
    // coordinate.
    var shape = {
        coord: [1, 1, 1, 20, 18, 20, 18 , 1],
        type: 'poly'
    };
    for (var i = 0; i < locations.length; i++) {
        var beach = locations[i];
        var myLatLng = new google.maps.LatLng(beach[1], beach[2]);
        marker = new google.maps.Marker({
            position: myLatLng,
            map: map,
            shadow: shadow,
            icon: image,
            shape: shape,
            title: beach[0],
            zIndex: beach[3]
        });
        attachM(map,marker, i, cartel);

    }
   
  	
	

	
}
