
function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0,limitNum);
	} else {
		limitCount.value = limitNum - limitField.value.length;
	}
}

    function geonamesQuery(lang) {	
      //ul.form.submit();
	var valor = document.getElementById('q').value;
	getGoogle(valor);
	return false;
    }



function getGoogle(valor) {
  geocoder.getLatLng(
    valor,
    function(point) {
	loadmap();
        map.setCenter(point, 13, G_HYBRID_TYPE);
//        var marker = new GMarker(point);
//        map.addOverlay(marker);
    }
  );
}	

function ocultar(id) {
	var ocultar = document.getElementById(id);
	ocultar.style.display = 'none';
}
function mostrar(id) {
	var mostrar = document.getElementById(id);
	mostrar.style.display = 'block';
}
function addclassname(id1, id2, clase) {
	document.getElementById(id1).className=clase;
	document.getElementById(id2).className='';
}
function getval(id) {
	if (document.getElementById(id)) var resultadovalor = document.getElementById(id).value;
	else var resultadovalor = '';
	return resultadovalor;
}