function sitcan() {
  var remote = open("http://visor.grafcan.es/visorweb/","cmayot","height=810,width=1000,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=0"); 
  
}


function sitcanenp() {
  var remote = open("http://mapa.grafcan.com/Mapa?svc=7","cmayot","height=810,width=1000,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=0"); 
  
}

function contaminantes(contaminante) {
	contaminante_=contaminante;
	url=''+contaminante_+'.html';
	
  var remote = open(url,"cmayot","height=350,width=600,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0"); 
  
}
 

function sitcannovedades() {
  var remote = open("http://pre.sitcan.com/website/visor","cmayot","height=635,width=760,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=0"); 
}

function construccion() {
  var remote = open("http://www.gobiernodecanarias.org/cmayot/interreg/construccion.html","cmayot","height=170,width=350,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=1,toolbar=0,statusbar=false,"); 
  
}
function ayudadescarga() {
  var remote = open("http://www.gobiernodecanarias.org/cmayot/descargas/ayuda.html","cmayot","height=150,width=350,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=1,toolbar=0,statusbar=false,"); 
  
}
function cabecera(){
var navegador;
var quitarAncho=175;
navegador=navigator.appName;
//alert(navegador);
if (navegador!="Microsoft Internet Explorer"){
	//alert("entra");
	quitarAncho=170;
}
hz=window.screen.height -quitarAncho; 
ancho='height="'+hz+'"';
//document.write(ancho);
document.write('<table class="fondoplantilla" width="100%" border="0"+ '+ancho+ ' cellpadding="0" cellspacing="0" ><tr><td height="100%" valign="top">');
}
function pie(){
document.write('</td ></tr>')
document.write('<tr><td width><table width="100%" height="100%" cellspacing="0" cellpadding="0">');
document.write('<tr> <td align="center" class="piepagina">© Gobierno');
document.write('de Canarias. <br>Consejer&iacute;a de Medio Ambiente y Ordenaci&oacute;n Territorial.</td></tr></table>');
document.write('<td></tr></table>');
}

function cabecerafototeca(){
var navegador;
var quitarAncho=175;
navegador=navigator.appName;
//alert(navegador);
if (navegador!="Microsoft Internet Explorer"){
	//alert("entra");
	quitarAncho=165;
}
hz=window.screen.height -quitarAncho; 
ancho='height="'+hz+'"';
//document.write(ancho);
document.write('<table class="nada" width="100%" border="0"+ '+ancho+ ' cellpadding="0" cellspacing="0" ><tr class="nada"><td class="nada" height="100%" valign="top">');
}

function piefototeca(){
document.write('</td ></tr>')
document.write('<tr class="nada"><td height="10" class="nada"><table border="0" class="nada" cellpadding="0" cellspacing="0" width="100%" >');
document.write('<tr class="nada"><td align="center" class="piepagina"> <span class="cuerpo-1"><strong><font size="-2">© Gobierno');
document.write('de Canarias.</font></strong><font size="-2"> <br><strong>Consejer&iacute;a de Medio');
document.write('Ambiente y Ordenaci&oacute;n Territorial.</strong></font></span></td></tr></table>');
document.write('<td></tr></table>');
}
function cabecerainterreg(){
var navegador;
var quitarAncho=175;
navegador=navigator.appName;
//alert(navegador);
if (navegador!="Microsoft Internet Explorer"){
	//alert("entra");
	quitarAncho=165;
}
hz=window.screen.height -quitarAncho; 
ancho='height="'+hz+'"';
//document.write(ancho);
document.write('<table class="fondoInterreg" width="100%" border="0"+ '+ancho+ ' cellpadding="0" cellspacing="0" ><tr class="nada"><td class="nada" height="100%" valign="top">');
}
function cabeceracmayot(){
var navegador;
var quitarAncho=175;
navegador=navigator.appName;
//alert(navegador);
if (navegador!="Microsoft Internet Explorer"){
	//alert("entra");
	quitarAncho=165;
}
hz=window.screen.height -quitarAncho; 
ancho='height="'+hz+'"';
//document.write(ancho);
document.write('<table class="fondoEscudo" width="100%" border="0"+ '+ancho+ ' cellpadding="0" cellspacing="0" ><tr class="nada"><td class="nada" height="100%" valign="top">');
}
function marquesinaInicio(){

	navegador=navigator.appName;
	//alert(navegador);
	if (navegador!="Microsoft Internet Explorer"){
		document.write('<MARQUEE    height="300"     direction= "up"  scrollamount= "1"  scrolldelay= "0" onmouseover="this.stop()" onmouseout="this.start()">');
	} else {
		document.write('<MARQUEE    height="100%"    direction= "up"  scrollamount= "1"  scrolldelay= "0" onmouseover="this.stop()" onmouseout="this.start()">');
	}


}

function marquesinaFin(){
		document.write('</marquee>');
	
}

function cabeceraconsejoeuropeo(){
var navegador;
var quitarAncho=175;
navegador=navigator.appName;
//alert(navegador);
if (navegador!="Microsoft Internet Explorer"){
	//alert("entra");
	quitarAncho=165;
}
hz=window.screen.height -quitarAncho; 
ancho='height="'+hz+'"';
//document.write(ancho);
document.write('<table class="fondoConsejoEuropeo" width="100%" border="0"+ '+ancho+ ' cellpadding="0" cellspacing="0" ><tr class="nada"><td class="nada" height="100%" valign="top">');
}
function alturatabla(){
	var navegador;

	hz=window.screen.height - 450; 
	//alert(hz);
	alto='height="'+hz+'"';
	//document.write(ancho);
	document.write('<img src="http://www.gobiernodecanarias.org/cmayot/imagenes/transparente.gif" width="1"' + alto +'>');
}


function combo(){
//anio1=document.getElementById("anio1");

//anio2=document.getElementById("anio2");
	while (document.getElementById("anio2").length> 0) {
	//alert("entra");
    	document.getElementById("anio2").remove(0);
	} 

inicio=document.getElementById("anio1").options[document.getElementById("anio1").selectedIndex].value;
fin=2007;
i=0;
//alert(inicio);

	while (fin >= inicio){
        //alert("entra");
		var opcion = new Option(fin,fin); 
		document.getElementById("anio2").options[i]=opcion;
		fin--;
		i++;
	
	}

}

 function valores(nombre_isla,id_isla){
	pagina=document.getElementById("estadisticas").options[document.getElementById("estadisticas").selectedIndex].value;
	//anio2=anio.options[anio.selectedIndex].value;
	inicio=document.getElementById("anio1").options[document.getElementById("anio1").selectedIndex].value;
	fin=document.getElementById("anio2").options[document.getElementById("anio2").selectedIndex].value;
	nombre_isla=' para la isla de  ' + nombre_isla ;
	url=pagina +'?anio1=' + inicio +'&anio2='+ fin +'&isla='+ id_isla +'&nombre_isla='+ nombre_isla;
	//alert(url);
	document.location=url;
} 


 
 


function municipios(){
	
	//alert("lolo");
		while (document.getElementById("municipios").length> 0) {
	//alert("entra");
    		document.getElementById("municipios").remove(0);
		}
        
		id_isla=document.getElementById("islas").options[document.getElementById("islas").selectedIndex].value;
		

    	switch (id_isla) {

		 case "3805":
			  id_municipio=new Array ('13','48');
  		       nombre_municipio= new Array  ('Frontera','Valverde');
			  break;
			  
		 case "3806":
				id_municipio=new Array ('7','8','9','27','14','16','24','29','30','33','37','45','47','53');
  		        nombre_municipio= new Array  ('Barlovento','Breña Alta','Breña Baja','El Paso','Fuencaliente','Garafía','Los Llanos de Aridane','Puntagorda','Puntallana','San Andres y Sauces','Santa Cruz de la Palma','Tazacorte','Tijarafe','Villa de Mazo');
			  break;
			  
		 case "3804":
			  id_municipio=new Array ('2','3','21','36','49','50');
			  nombre_municipio= new Array  ('Agulo','Alejeró','Hermigua','San Sebastián','Valle Gran Rey','Vallehermoso');
  		      break;
			  
		 case "3807":
			  id_municipio=new Array ('1','4','5','6','10','11','32','41','12','15','17','19','20','22','18','25','26','31','42','28','23','34','35','38','39','40','43','44','46','51','52');
			  nombre_municipio= new Array  ('Adeje','Arafo','Arico','Arona','Buenavista del Norte','Candelaria','El Rosario','El Sauzal','Fasnia','Garachico','Granadilla de Abona','Guía de Isora','Güímar','Icod de los Vinos','La Guancha','La Matanza de Acentejo','La Orotava','Los Realejos','Los Silos','Puerto de la Cruz','San Cristóbal de La Laguna','San Juan de la Rambla','San Miguel de Abona','Santa Cruz de Tenerife','Santa Úrsula','Santiago del Teide','Tacoronte','El Tanque','Tegueste','La Victoria de Acentejo','Vilaflor');
  		      break;
			  
		 case "3503":
			  id_municipio=new Array ('1','2','5','6','8','9','11','16','12','13','19','20','21','22','23','25','26','27','32','31','33');
			  nombre_municipio= new Array  ('Agaete','Agüimes','Artenara','Arucas','Firgas','Gáldar','Ingenio','Las Palmas de Gran Canaria','Mogán','Moya','San Bartolomé de Tirajana','La Aldea de San Nicolás','Santa Brígida','Santa Lucía de Tirajana','Santa María de Guía','Tejeda','Telde','Teror','Valleseco','Valsequillo','Vega de San Mateo');
  		      break;			  			  
		

		 case "3502":
			  id_municipio=new Array ('3','7','14','15','17','30');
			  nombre_municipio= new Array  ('Antigua','Betancuria','La Oliva','Pájara','Puerto del Rosario','Tuineje');
  		      break;			  			  
		
		 case "3501":
			  id_municipio=new Array ('4','10','18','24','28','29','34');
			  nombre_municipio= new Array  ('Arrecife','Haría','San Bartolomé','Teguise','Tías','Tinajo','Yaiza');
  		      break;			  			  
		}		
//alert(islas_id[0][0]);



	   i=0;
       while (i < id_municipio.length ) {
	
     	var opcion = new Option(nombre_municipio[i],id_municipio[i]); 
		document.getElementById("municipios").options[i]=opcion;
		i++;
      }
   
      //document.getElementById("municipios").options[0].defaultSelected=true;
	  document.getElementById("municipios").options[0].selected=true;


}

 function valores_municipios(){
	
	inicio=document.getElementById("anio1").options[document.getElementById("anio1").selectedIndex].value;
	fin=document.getElementById("anio2").options[document.getElementById("anio2").selectedIndex].value;
	id_isla=document.getElementById("islas").options[document.getElementById("islas").selectedIndex].value;
	id_municipio=document.getElementById("municipios").options[document.getElementById("municipios").selectedIndex].value;
	nombre_isla=document.getElementById("islas").options[document.getElementById("islas").selectedIndex].text;
	nombre_municipio= document.getElementById("municipios").options[document.getElementById("municipios").selectedIndex].text;
	url='municipios.jsp?anio1=' + inicio +'&anio2='+ fin +'&isla='+ id_isla +'&nombre_isla='+ nombre_isla +'&municipio='+id_municipio+'&nombre_municipio='+nombre_municipio;
	//alert(url);
	
	document.location=url;
}
function premios(){

document.location=document.getElementById("anio_cesar").options[document.getElementById("anio_cesar").selectedIndex].value;

}

function pgea(nombreFoto) {
	nombreFoto_=nombreFoto;
	url='http://www.gobiernodecanarias.org/cmayot/medioambiente/medionatural/biodiversidad/especies/catalogodeespeciesamenazadas/planes_especies_amenazadas_aprobados/imagenes/'+nombreFoto_+'.jpg';
	
  var remote = open(url,"cmayot","height=720,width=510,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0"); 
  
}

function residuos(){


var ip = java.net.InetAddress.getLocalHost().getHostAddress ();
document.writeln('Tu IP es: "' + ip + '"')
	
}

function publicaciones(nombreFoto) {
	nombreFoto_=nombreFoto;
	url='http://www.gobiernodecanarias.org/cmayot/medioambiente/centrodocumentacion/publicaciones/libros/imagenes/'+nombreFoto_+'.jpg';
	
  var remote = open(url,"cmayot","height=600,width=420,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0"); 
  
}