<!-- oculto para navegadores antiguos



var map;
var MSGS = new Array;
MSGS[0] = 'Ha ocurrido algún error al intentar Obtener las lineas del proyecto';
var respuesta = new Array();
var IconoLupa = 'http://www.tuplaza.es/Imagenes/Iconos/IconoLupa.png';
var Localidades = new Array();


function iniciarApp() {

    var latlng = new google.maps.LatLng(40.4104,-3.6921);
    var myOptions = {
      zoom: 11,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    map = new google.maps.Map(document.getElementById("Mapa"), myOptions);
    defineLocalidades();

  }


var localidad = Class.create({
    initialize: function(json) {
        if (json) {
            this.localidad = json.sitio;
            this.lat = json.latitud;
            this.lon = json.longitud;

            var latlon = new google.maps.LatLng(json.latitud,json.longitud);

            this.ICON = new google.maps.MarkerImage(IconoLupa,
            // This marker is 20 pixels wide by 32 pixels tall.
            new google.maps.Size(24, 24),
            // 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(8, 8));

            var Marcador = new google.maps.Marker({
                position: latlon,
                icon: this.ICON,
                map: map,
                title: json.sitio
            });
            this.Marcador = Marcador;

            var contenido = new Element('div').addClassName('globo');
            var cabecera = new Element('div').addClassName('tituloGlobo').update(json.sitio);
            var enlace = new Element('a',{'href':'http://www.tuplaza.es/plazas-de-garaje/'+json.sitio,'title':'Ver plazas de garaje en alquiler, venta y compartidas en ' + json.sitio}).update('ver plazas de garaje en ' + json.sitio);
            contenido.insert(cabecera).insert('<br>').insert(enlace);

            var infowindow = new google.maps.InfoWindow({
                content: contenido
            });

            google.maps.event.addListener(Marcador, 'dblclick', function() {
               infowindow.close();
               location.href = 'http://www.tuplaza.es/plazas-de-garaje/'+json.sitio;
            });

            google.maps.event.addListener(Marcador, 'click', function() {
              infowindow.open(map,Marcador);
            });

        } else {
         }
    }
});

// fin de ocultación -->