function verPrimeraImagen(){
if ($('#divPrimeraImagen'))
    $('#divPrimeraImagen').show();
}

function cargarAjax(accion, id_div, parametros){//}, barra_progreso){
    if (1==2){//Sin opcion de cargar
        var estilo = $('#' + id_div).attr("class");
        $('#' + id_div).attr("class", "cargando");
        $('#' + id_div).html("Cargando...");
    }
    var direccion = 'ajax.php?accion=' + accion;
    $.ajax({
        type: 'POST',
        data: parametros,
        url: direccion,
        success: function(data) {
            try{
                //alert('1');
                var obj = jQuery.parseJSON(data);
                //alert('2');
                $('#' + id_div).html(obj.html);
                //alert('3');
                eval(obj.javascript);
                //alert('4');
                if (estilo != "cargando")
                    $('#' + id_div).attr("class", estilo);
            }
            catch(err){
                alert("err.description: " + err.description);
                alert("id_div: " + id_div);
                alert("accion: " + accion);
            }
        },
        error: function(xhr, err, thr){
            alert("Error: " + xhr.status + " accion=" + accion + ":\n" + thr);
        }
    });
}

function esEnter(e){
	var esIE=(document.all);
	var esNS=(document.layers);
	tecla=(esIE) ? event.keyCode : e.which;
	if(tecla==13){
		$('#btnBuscar').click();
	  }
	  else{	  
	  return false;
	  }
}
