// JavaScript Document

var tempo;

function mostrarBuscarPor(filtro, idBuscador, idDropdown) {
	var elementoBusqueda = document.getElementById(idBuscador);
	if (elementoBusqueda != null) {
		elementoBusqueda.innerHTML = document.getElementById(filtro).innerHTML;
		document.getElementById("por").value = elementoBusqueda.innerHTML;
		document.getElementById("por").value=$.trim(document.getElementById("por").value);
	}
	var opciones = document.getElementById(idDropdown);
	if (opciones != null) {
		opciones.style.display = 'none';
	}
	
}
function desplegarOpciones(idDropdown) {
	var opciones = document.getElementById(idDropdown);
	if (opciones != null) {
		opciones.style.display = 'inline';
	}
}
function ocultarOpciones(idDropdown) {
	var opciones = document.getElementById(idDropdown);
	if (opciones != null) {
		opciones.style.display = 'none';
	}
}

function ocultarOpcionesT(idObjeto) {
    tempo = setTimeout("ocultarOpciones('" + idObjeto + "')", 200);
}
function mostrarDiv(id){
	if(document.getElementById(id).style.display== "none") {
		document.getElementById(id).style.display = "inline";
	} else {
		document.getElementById(id).style.display = "none";
	}
}