function cargarMapa(idmapa,latitud,longitud,zoom){
 
    var latlng = new google.maps.LatLng(latitud, longitud);
    var myOptions = {
      zoom: zoom,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById(idmapa), myOptions);
 	return map;
 
/* 
    if (GBrowserIsCompatible()) { 
    
        var map = new GMap2(document.getElementById(idmapa)); 
        map.setCenter(new GLatLng(latitud,longitud), zoom);
		//map.addControl(new GSmallMapControl());
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		


        return map;
    }   
*/    
}

function crear_icono(ruta_icono){
  var icono = new google.maps.MarkerImage(ruta_icono,
      new google.maps.Size(18,18),
      new google.maps.Point(0,0),
      new google.maps.Point(0,18));
	
	
	return icono;
}


function crear_sombra(ruta_sombra){
  var icono = new google.maps.MarkerImage(ruta_sombra,
      new google.maps.Size(18,18),
      new google.maps.Point(0,0),
      new google.maps.Point(0,18));
	
	return icono;
}



function crear_marca(latitud, longitud, mapa, icono, sombra, titulo, texto){

  var myLatlng = new google.maps.LatLng(latitud,longitud);


  var marcador = new google.maps.Marker({
      position: myLatlng, 
      map: mapa,
      icon: icono,
      shadow: sombra,
      title:titulo
  });
  
  
    /*var infowindow = new google.maps.InfoWindow({
        content: texto
    });*/
  
    google.maps.event.addListener(marcador, 'click', function() {
	  infowindow.setContent(texto);
      infowindow.open(mapa,marcador);
    });
  
}

