// Use jQuery via $j(...)
$j(document).ready(function(){
	var other='1';
	$j("#select_zona_lo").change(onSelectLo).change();
	$j("#select_tipo_lo").change(onSelectLo).change();
	
});
function onSelectLo(event) {
	var id = $j(event.target).attr("id");
	var zona = '';
	var tipo = '';
	zona = $j("#select_zona_lo option:selected").val();
	tipo = $j("#select_tipo_lo option:selected").val();
	if(zona == 0 && tipo == 0) return true;
	$j("#contenedor").hide();
	$j("#loading_cont").show();
	var options = {
	  url: "/locales/box.php",
	  type: 'POST',
	  async: false,
	  data: "ajax=1&zona="+ zona + "&tipo=" + tipo,
	  success: function(resp) { 
                document.getElementById("contenedor").innerHTML=resp;
		$j("#loading_cont").hide();
                $j("#contenedor").show();
		return true;
	  },
	  complete: function(resp) { 
	  },
	  error: function(resp,txterr, ult) {
		alert("ERROR: "+ resp.responseText + " " + txterr + " " + ult);
		return false;
	  }
	};
	$j.ajax(options);
	return false;
}

