function capturaTecla(){
         var tecla = event.keyCode; 
         if ((tecla == 13)) {
		     buscar(); 
         } 
         return tecla;
}
function buscar() {          
          if (document.all){ 
		      if (document.all['palabra_a_buscar'].value != 'Búsqueda'){
                  document.location = 'busqueda.asp?txt=' + document.all['palabra_a_buscar'].value;
			  }
		  }
		  else {
		      if (document.getElementById('palabra_a_buscar').value != 'Búsqueda'){
		          document.location = 'busqueda.asp?txt=' + document.getElementById('palabra_a_buscar').value;
			  }
		  }
}

function buscar_google() {          
          if (document.all){ 
		      if (document.all['palabra_a_buscar'].value != 'Búsqueda'){
				  window.open('http://www.google.com/search?q=' + document.all['palabra_a_buscar'].value,'','');
			  }
		  }
		  else {
		      if (document.getElementById('palabra_a_buscar').value != 'Búsqueda'){
				  window.open('http://www.google.com/search?q=' + document.getElementById('palabra_a_buscar').value,'','');
			  }
		  }
}

var ns4 = (document.layers)? true:false;
var ie4 = (document.all)? true:false;
var ns6 = (!document.all && document.getElementById)? true : false;

function AumentarTamanyo(idElemento) {
	var elemento =  document.all[idElemento];
	if (!elemento.style.fontSize) {
		//primera vez que se intenta aumentar el tamaño del texto
		elemento.style.fontSize =  '120%';
	} else {
		var fsize =  elemento.style.fontSize;
		if (fsize.indexOf(" & chr(34) & "%" & chr(34) & ")) {
			// el valor está indicado en porcentaje:
			fsize =  fsize.substring(0,fsize.indexOf("%"))
			fsize =  Number(fsize)+factor_reduccion;
				if(fsize >=  max_size){
					alert("No se puede aumentar más.")
				}else{
					elemento.style.fontSize =  (fsize+'%');
				}
		}
	}
}
function ReducirTamanyo(idElemento) {
	var elemento =  document.all[idElemento];
	//alert(elemento.style.fontSize);
	if (!elemento.style.fontSize) {
		//primera vez que se intenta reducir el tamaño del texto
		elemento.style.fontSize =  '80%';
	} else {
		var fsize =  elemento.style.fontSize;
		if (fsize.indexOf("%")) {
			// el valor está indicado en porcentaje:
			fsize =  fsize.substring(0,fsize.indexOf("%"))
			fsize =  Number(fsize)-factor_reduccion;
			if(fsize <=  min_size){
				alert("No se puede reducir más.")
			}else{
				elemento.style.fontSize =  (fsize+'%');
			}
		}
	}
}

function RecuperarTamanyo(idElemento) {
	var elemento =  document.all[idElemento];
	elemento.style.fontSize = '100%';
}

var max_size =  250;
var min_size =  50;
var factor_reduccion = 20;
var tamagnoLetras =  100;

function PopupEnviarAUnAmigo(){
    eval('window.open("./recomendar_pagina.asp", "", "width=520px,height=355px,resizable=0,scrollbars=0,status=0")');
}

function Version_Impresion(idc,p){
    eval('window.open("./version_impresion.asp?idc=' + idc + '&p=' + p + '", "", "width=540px,height=355px,resizable=0,scrollbars=1,status=0")');
}

function PopupEnviarNoticiaAUnAmigo(querystring){
    eval('window.open("./recomendar_noticia.asp?idc=' + escape(querystring) + '", "", "width=520px,height=355px,resizable=0,scrollbars=0,status=0")');
}

function PopupSituacionEvento(lon,lat,zoom,tipo,texto){	
    eval('window.open("http://www.tauronetserver.com/googlemaps/mapa.asp?longitud=' + lon + '&latitud=' + lat +
					   '&zoomlevel=' + zoom + '&tipo=' + tipo + '&texto=' + escape(texto) + '", "", "width=520px,height=355px,resizable=0,scrollbars=0,status=0")');
}

function PopupSituacion(lon,lat,zoom,tipo,texto){
    eval('window.open("http://www.tauronetserver.com/googlemaps/mapa.asp?longitud=' + lon + '&latitud=' + lat +
					   '&zoomlevel=' + zoom + '&tipo=' + tipo + '&texto=' + escape(texto) + '", "", "width=520px,height=355px,resizable=0,scrollbars=0,status=0")');
}

function PopupRuta(querystring){
    eval('window.open("http://www.tauronetserver.com/googlemaps/ver_rutas.asp?'+escape(querystring)+'", "", "width=520px,height=355px,resizable=0,scrollbars=0,status=0")');
}

function AbrirPopUpElTiempo(){
    eval('window.open("./eltiempo.asp", "", "width=220px,height=240px,resizable=0,scrollbars=0,status=0")');
}

// /////////////////////////////////////////////////////////////////////////////////////////////////////////