	//Toolbar otros (Escala)
	
	var EscalaAnterior=0;
	
	function LaEscalaHaCambiado() {
		document.f1.Escala.value = document.mapa.getScale();
		if (EscalaAnterior != document.mapa.getScale()) {
			return (true);
		} else {
			return (false);
		}
	}
	function ZoomEscala(Escala) {
		var Mapa = document.mapa;
		Mapa.zoomScale(Mapa.getLat(), Mapa.getLon(), Escala);
	}
	function TeclaEnEscala(obj,e) {
		if ((e.keyCode < 96 || e.keyCode > 105) && (e.keyCode < 48 || e.keyCode > 57) && (e.keyCode < 37 || e.keyCode > 40) && e.keyCode != 46 && e.keyCode != 8) {
			if (e.keyCode != 13) {
				e.returnValue = false;
				return;
			} else {
				document.mapa.zoomScale(document.mapa.getLat(),document.mapa.getLon(),eval(document.f1.Escala.value));
				e.returnValue = false;
				document.mapa.focus();
			}
		}
	}
	//Toolbar otros (Copiar)
	function CopiarMapa () {
		if (document.mapa) {
			if (!document.mapa.isBusy()) {
				document.mapa.copyMap();
			}
		}
	}
	
	function MostrarCondiciones () {
		var Props = "Width=600, height=500, top=0, left=0 , location=0, toolbar=0, status=0, menubar=0, resizable=1, scrollbars=0";
		window.open("../Condiciones.asp?Idioma=" + Idioma ,"Condiciones",Props);		
	}
	
	//Toolbar otros (Ayuda)
	function MostrarAyuda(strRuta) {
		var Props = "top=0, left=0 , location=0, toolbar=0, status=0, menubar=0, resizable=1, scrollbars=0";
		window.open(strRuta,"",Props);
	}
	
	//Toolbar otros (Inicio)
	function IrAInicio(){
		window.location = "default.asp?Idioma=" + Idioma;
	}
		
	function CambiarIdioma(Actual) {		
		var Mapa = document.mapa;
		var Ext = Mapa.getMapExtent(true,true);
		var Lat = Math.round(Mapa.getLat() * 1000000) / 1000000;
		var Lon =Math.round(Mapa.getLon() * 1000000) / 1000000;
		var Ancho = Math.round(Ext.MaxX - Ext.MinX);
		var Alto = Math.round(Ext.MaxY - Ext.MinY);
		if (Actual == "es")
			var URL = "principal.asp?Idioma=eu&MPID=" + MPID;
		else
			var URL = "principal.asp?Idioma=es&MPID=" + MPID;

		URL += "&Lat=" + Lat + "&Lon=" + Lon + "&Ancho=" + Ancho + "&Alto=" + Alto;	
		
		window.location = URL;
	}
	
	function linkb5m ()
{
	mapa = document.mapa;
	xy = mapa.lonLatToMcs (mapa.getLon(), mapa.getLat());
	
	window.open("http://b5m.gipuzkoa.net/url5000/?id=X_" + xy.getX() + "_" + xy.getY());
}
