var log = false;

var addressList = [];
function getAddressList(){return addressList;}
function setAddressList(list){addressList = list;}

// Lista de comentarios
var listaComentarios = [];
function getListaComentarios(){return listaComentarios;}
function setListaComentarios(list){listaComentarios = list;}

// Marcadores-mapa de los puntos de interés (hoteles + talleres)
var marcadoresComentarios = [];
function getMarcadoresComentarios(){return marcadoresComentarios;}
function setMarcadoresComentarios(list){marcadoresComentarios = list;}

var countryDefault = new Array("ES","Spain");
function getCountryCode(){return countryDefault[0];}
function getCountryDescription(){return countryDefault[1];}
		
// GClientGeocoder
var geocoder = null;
function setGeocoder(geo){geocoder = geo;}
function getGeocoder(){ return geocoder;}

var lastCenterSelected = 0;
function setLastCenter(index){lastCenterSelected = index;}
function getLastCenter(){return lastCenterSelected;}

// Mapa
var map2 = null;
function getMap(){return map2;}    
function setMap(map){map2 = map;}    

var tipoConsulta = NO_QUERY;
function setTipoConsulta(value){tipoConsulta = value};
function getTipoConsulta(){return tipoConsulta};

// Si true, muestra el marcador de "Usted Está Aquí" (esto es cuando el usuario ha hecho
// un submit del formulario o cuando ha hecho click en uno de los enlaces del "Quiso
// Usted Decir")
// Si false, no muestra el marcador de "Usted Está Aquí"
var showMarkerUEA = false;
function setShowUEA(val){showMarkerUEA = val;}
function isPrintableUEA(){return showMarkerUEA;}

// Array que contiene los datos del marcador de "Usted Está Aquí"
var UEA = [];
function getUEA(){return UEA;}
function setUEA(arr){UEA = arr;}


// =========================
// CONSTANTES
var MARKER_UEA = 0;
var NO_QUERY = -1;    
// Si el usuario ha hecho doble click sobre el mapa o si ha hecho un Zoom In
var QUERY_BY_CLICK = 1;
// Si el usuario ha hecho unsubmit del formulario o si a hecho click en uno de los
// enlaces del "Quiso Usted Decir"
var QUERY_BY_FORM = 0;
// Si el usuario ha hecho un Zoom In
var QUERY_BY_ZOOM = 2;
// Si el usuario ha hecho click sobre uno de los enlaces del alista de centros
var QUERY_BY_LINK = 3;
var UEA_MARKER = 0;
var UEA_DIRECCION = 1;
var UEA_STR = 2;
var UEA_LAT_LNG = 3;

// Punto central inicial
var CENTRO_DEFAULT = new GLatLng(39.940010,-3.239180);
// Zoom inicial (está pensado para un tamaño de contenedor del mapa de 700x500. Si
// el tamaño cambia, habrá que modificar este zoom para que en la carga inicial del
// salga la Península Ibérica centrada y ocupando todo el contenedor)
var ZOOM_DEFAULT = 6;
// Zoom a partir del cual hay que mostrar los marker de los centros del gas
var ZOOM_MIN = 12;
// Zoom máximo permitido al usuario
var ZOOM_MAX = 17;
// Zoom cuando se quiere mostrar la infoWindow de un centro del gas
var ZOOM_CENTRO = 15;

// Número máximo de elementos que se mostrarán en las listas:
//  - de "quiso usted decir"
//  - de centros más cercanos
var MAX_NUM_ELEM_LIST = 10;

// Localización puntos concretos
//var madrid = new GLatLng(40.416882, -3.702376);
//var centroPeninsula = new GLatLng(40.240010,-4.239180);

