function cargaBotones(){
	
	var activa = 9;
	
	var boton1 = document.getElementById('b1');
	var boton2 = document.getElementById('b2');
	var boton3 = document.getElementById('b3');
	var boton4 = document.getElementById('b4');
	var boton5 = document.getElementById('b5');
	var boton6 = document.getElementById('b6');
	var boton7 = document.getElementById('b7');
	var boton8 = document.getElementById('b8');
	var boton9 = document.getElementById('b9');
	var boton10 = document.getElementById('b10');
//	var boton11 = document.getElementById('b11');
	var boton12 = document.getElementById('b12');
	var boton13 = document.getElementById('b13');
	
	
	
	boton1.onmouseover = function() { if (activa!=1){ boton1.src="../moduloSIG/img/zoomin2.gif"; boton1.style.cursor = "pointer" }}
	boton1.onmouseout = function() { if (activa!=1){ boton1.src="../moduloSIG/img/zoomin.gif" }}
	
	boton2.onmouseover = function() { if (activa!=2){ boton2.src="../moduloSIG/img/zoomout2.gif"; boton2.style.cursor = "pointer" }}
	boton2.onmouseout = function() { if (activa!=2){ boton2.src="../moduloSIG/img/zoomout.gif" }}
	
	boton3.onmouseover = function() { if (activa!=3){ boton3.src="../moduloSIG/img/Fit2.gif"; boton3.style.cursor = "pointer" }}
	boton3.onmouseout = function() { if (activa!=3){ boton3.src="../moduloSIG/img/Fit.gif" }}
	
	boton4.onmouseover = function() { if (activa!=4){ boton4.src="../moduloSIG/img/InteractivePan2.gif"; boton4.style.cursor = "pointer" }}
	boton4.onmouseout = function() {  if (activa!=4){ boton4.src="../moduloSIG/img/InteractivePan.gif" }}
	
	boton5.onmouseover = function() { if (activa!=5){ boton5.src="../moduloSIG/img/infoEdificio2.gif"; boton5.style.cursor = "pointer" }}
	boton5.onmouseout = function() { if (activa!=5){ boton5.src="../moduloSIG/img/infoEdificio.gif" }}
	
	boton6.onmouseover = function() {  if (activa!=6){ boton6.src="../moduloSIG/img/infoViario2.gif"; boton6.style.cursor = "pointer" }}
	boton6.onmouseout = function() {  if (activa!=6){ boton6.src="../moduloSIG/img/infoViario.gif" }}
	
	boton7.onmouseover = function() { boton7.src="../moduloSIG/img/leyenda2.gif"; boton7.style.cursor = "pointer" }
	boton7.onmouseout = function() { boton7.src="../moduloSIG/img/leyenda.gif" }
	
	boton8.onmouseover = function() { boton8.src="../moduloSIG/img/limpiarMapa2.gif"; boton8.style.cursor = "pointer" }
	boton8.onmouseout = function() {  boton8.src="../moduloSIG/img/limpiarMapa.gif" }
	
	boton9.onmouseover = function() {if (activa!=9){boton9.src="../moduloSIG/img/zoommas2.gif"; boton9.style.cursor = "pointer" }}
	boton9.onmouseout = function() { if (activa!=9){boton9.src="../moduloSIG/img/zoommas.gif" }}
	
	boton10.onmouseover = function() { if (activa!=10){boton10.src="../moduloSIG/img/zoommenos2.gif"; boton10.style.cursor = "pointer" }}
	boton10.onmouseout = function() { if (activa!=10){boton10.src="../moduloSIG/img/zoommenos.gif" }}
	
//	boton11.onmouseover = function() {if (activa!=11){ boton11.src="../moduloSIG/img/mail2.gif"; boton11.style.cursor = "pointer" }}
//	boton11.onmouseout = function() { if (activa!=11){boton11.src="../moduloSIG/img/mail.gif" }}
	
	boton12.onmouseover = function() { if (activa!=12){boton12.src="../moduloSIG/img/acerca2.gif"; boton12.style.cursor = "pointer" }}
	boton12.onmouseout = function() { if (activa!=12){boton12.src="../moduloSIG/img/acerca.gif" }}
	
	boton13.onmouseover = function() {if (activa!=13){ boton13.src="../moduloSIG/img/ayuda2.gif"; boton13.style.cursor = "pointer" }}
	boton13.onmouseout = function() { if (activa!=13){boton13.src="../moduloSIG/img/ayuda.gif" }}
			
	boton1.onclick = function() { 
		onBtnZoomInAuto();
	}

	boton2.onclick = function() { 
		onBtnZoomOutAuto();
	}

	boton3.onclick = function() {
		onBtnReset();
	}

	boton4.onclick = function() { 
	  
		boton1.src="../moduloSIG/img/zoomin.gif";
		boton2.src="../moduloSIG/img/zoomout.gif";
		boton3.src="../moduloSIG/img/Fit.gif";
		boton4.src="../moduloSIG/img/InteractivePan3.gif";
		boton5.src="../moduloSIG/img/infoEdificio.gif";
		boton6.src="../moduloSIG/img/infoViario.gif";
		boton9.src="../moduloSIG/img/zoommas.gif";
		boton10.src="../moduloSIG/img/zoommenos.gif";
		
		activa = 4;
		
		
		onBtnMover();
	}

	boton5.onclick = function() { 
		onBtnVersionImprimir();
	}

	boton6.onclick = function() { 
		boton1.src="../moduloSIG/img/zoomin.gif";
		boton2.src="../moduloSIG/img/zoomout.gif";
		boton3.src="../moduloSIG/img/Fit.gif";
		boton4.src="../moduloSIG/img/InteractivePan.gif";
		boton5.src="../moduloSIG/img/infoEdificio.gif";
		boton6.src="../moduloSIG/img/infoViario3.gif";
		boton9.src="../moduloSIG/img/zoommas.gif";
		boton10.src="../moduloSIG/img/zoommenos.gif";
		
		activa = 6;
		
		onBtnInfoViario();
	}

	boton9.onclick = function() { 
		boton1.src="../moduloSIG/img/zoomin.gif";
		boton2.src="../moduloSIG/img/zoomout.gif";
		boton3.src="../moduloSIG/img/Fit.gif";
		boton4.src="../moduloSIG/img/InteractivePan.gif";
		boton5.src="../moduloSIG/img/infoEdificio.gif";
		boton6.src="../moduloSIG/img/infoViario.gif";
		boton9.src="../moduloSIG/img/zoommas3.gif";
		boton10.src="../moduloSIG/img/zoommenos.gif";
		
		activa = 9;
		
		onBtnZoomIn();
		
	}

	boton10.onclick = function() { 
		boton1.src="../moduloSIG/img/zoomin.gif";
		boton2.src="../moduloSIG/img/zoomout.gif";
		boton3.src="../moduloSIG/img/Fit.gif";
		boton4.src="../moduloSIG/img/InteractivePan.gif";
		boton5.src="../moduloSIG/img/infoEdificio.gif";
		boton6.src="../moduloSIG/img/infoViario.gif";
		boton9.src="../moduloSIG/img/zoommas.gif";
		boton10.src="../moduloSIG/img/zoommenos3.gif";
		
		activa = 10;
		
		onBtnZoomOut();
	}
	
/*	boton11.onclick = function() { 
		insertarPagina(document.getElementById("idDivComprobacion"),"captcha.jsp",null);
		document.getElementById("ventana_mail").style.display="block";
	
	} */
	
	boton12.onclick = function() { 
		document.getElementById("ventana_acerca").style.display="block";

	}
	
	boton13.onclick = function() { 	
		window.open("../moduloSIG/ayudaAct/index.html");			
	}	

	
	boton7.onclick = function() { 
		document.getElementById("ventana_leyenda").style.display="block";
	}
	
	boton8.onclick = function() { 
		cerrarVentanaInformacion();
		
		eraselayer();
	}

}


function abrirVentanaInformacion(){
	
	limpiarVentanaInformacion();
	
	if (document.getElementById("ventana_informacion").style.display == "none"){	
	 		 	
		document.getElementById("ventana_informacion").style.display = "block";	
	}
}

function cerrarVentanaInformacion(){

	if (document.getElementById("ventana_informacion").style.display == "block"){	
	 	
	 	limpiarVentanaInformacion();
		document.getElementById("ventana_informacion").style.display = "none";	
	}
}


function cerrarVentanaInformacionEstatica(){
	cerrarVentanaInformacion();

	var cerrar = 0;
	if (document.getElementById("ventana_informacion").style.display == "none"){
		cerrar = 0;
	 }
}


function limpiarVentanaInformacion(){

	if (document.getElementById("featureList") != null) {
		document.getElementById("featureList").innerHTML = " ";
	}
}

function ocultaInformacion() { 
	if ( document.getElementById("ventana_informacion") != null ){
		document.getElementById("ventana_informacion").style.display="none";
	}
}

function ocultaAcerca() { 
	document.getElementById("ventana_acerca").style.display="none";
}

function ocultaMail() { 
	document.getElementById("ventana_mail").style.display="none";
}

function ocultaMailRespuesta() { 
	document.getElementById("ventana_mail_respuesta").style.display="none";
}

function ocultaLeyenda() { 
	document.getElementById("ventana_leyenda").style.display="none";
}

function ocultaPopup() { 
	document.getElementById("ventana_popup").style.display="none";
	var elTabla = document.getElementById("idTable");
	if ( elTabla != null){
		document.getElementById("idTable").style.display="none";
	}
}
	
function oculta(x){

	if (x==1){
		document.getElementById("apartado1").className = "kwick download2";
		
		document.getElementById("apartado1a").style.display = "none";
		document.getElementById("apartado1b").style.display = "block";
	}else if (x==2){
		document.getElementById("apartado1").className = "kwick download";
		
		document.getElementById("apartado1a").style.display = "block";
		document.getElementById("apartado1b").style.display = "none";
	}else if (x==3){
		document.getElementById("apartado2").className = "kwick documentation2";
		
		document.getElementById("apartado2a").style.display = "none";
		document.getElementById("apartado2b").style.display = "block";
	}else if (x==4){
		document.getElementById("apartado2").className = "kwick documentation";
		
		document.getElementById("apartado2a").style.display = "block";
		document.getElementById("apartado2b").style.display = "none";
	}else if (x==5){
		document.getElementById("apartado3").className = "kwick blog2";
		
		document.getElementById("apartado3a").style.display = "none";
		document.getElementById("apartado3b").style.display = "block";
	}else if (x==6){
		document.getElementById("apartado3").className = "kwick blog";
		
		document.getElementById("apartado3a").style.display = "block";
		document.getElementById("apartado3b").style.display = "none";
	}else if (x==7){
		document.getElementById("apartado4").className = "kwick trac2";
		
		document.getElementById("apartado4a").style.display = "none";
		document.getElementById("apartado4b").style.display = "block";
	}else if (x==8){
		document.getElementById("apartado4").className = "kwick trac";
		
		document.getElementById("apartado4a").style.display = "block";
		document.getElementById("apartado4b").style.display = "none";
	}

}
/*
// Movimiento de capas

		//Si el navegador del cliente es Mozilla la variable siguiente valdrá true
		var moz = document.getElementById && !document.all;
		//Flag que indica si estamos o no en proceso de arrastrar el ratón
		var estoyArrastrando = false;
		//Variable para almacenar un puntero al objeto que estamos moviendo
		var dobj;
		
		function arrastrarRaton(e){
			if (estoyArrastrando) {
				newLeft = moz ? e.clientX : event.clientX;
				newTop = moz ? e.clientY : event.clientY;

				dobj.style.left = newLeft - parseInt(dobj.style.width)/2;
				dobj.style.top = newTop - parseInt(dobj.style.height)/2;

				return false;
			}
		}


		function soltarBoton(e) {	
			estoyArrastrando = false;
		}
		
		
		function presionarBoton(e) {
			//Obtenemos el elemento sobre el que se ha presionado el botón del ratón
			var fobj = moz ? e.target : event.srcElement;
			
			// Buscamos el primer elemento en la que esté contenido aquel sobre el que se ha pulsado
			// que pertenezca a la clase titulo_leyenda. 
			if (fobj.className == "titulo_leyenda") {
				fobj = document.getElementById("ventana_leyenda");
			}
			
			// Si hemos obtenido un objeto movible...			
			if (fobj.className == "ventana_leyenda") {
				// Activamos el flag para indicar que se empieza a arrastrar
				estoyArrastrando = true;
				// Guardamos un puntero al objeto que se está moviendo en la variable global
				dobj = fobj;

				// Devolvemos false para no realizar ninguna acción posterior
				return false;
			}
		}
		
		document.onmousedown = presionarBoton;
		document.onmouseup = soltarBoton;
		document.onmousemove = arrastrarRaton;

		document.oncontextmenu=new Function("return false");	
		
		*/
		
