anchor.diff:      var categoryIdVal = "";
   
       $("#public_entity_category_id").change(function() {
  -	categoryIdVal = $(this).val();
  -    });
  -    
  +	var categoryIdVal = $(this).val();
  +    });
  +
       make_autocomplete($("#place_name"),
                         "../places/index",
  -		      categoryIdVal,
  -		      <%= "'#{I18n.translate(:area_city)}'" %>);
  +        	      <%= "'#{I18n.translate(:area_city)}'" %>);
   
       make_autocomplete($("#public_entity_name"),
                         "../public_entities/search?form=short",
  -		      categoryIdVal,		      
  -		      <%= "'#{I18n.translate(:public_entity_name)}'" %>);
  +        	      <%= "'#{I18n.translate(:public_entity_name)}'" %>);
   
       make_autocomplete($("#public_entity_name_filter"),
  -		      "../public_entities/search?form=short",
  -		      categoryIdVal,		      
  -		      <%= "'#{I18n.translate(:public_entity_name)}'" %>);
  +        	      "../public_entities/search?form=short",
  +        	      <%= "'#{I18n.translate(:public_entity_name)}'" %>);
       
       if ($('#map_canvas').length > 0) {
   	initialize_map();
  
positive.code: 
  }
  
  function make_autocomplete(jQueryObject, searchUrl, categoryIdVal, msg) {
      jQueryObject.autocomplete({
  	source: function(request, response) {
  	    $.ajax({
  		url: searchUrl,
  		dataType: "json",
  		data: {
  		    term: request.term,
  		    category_id: categoryIdVal,
  		},
  		success: function(data) {
  		    response($.map(data, function(item) {
  
negative.code: 	    return false; 
  	},
  	change: function(event, ui) {
              var cat = $("#public_entity_category_id").val();
  	    if (ui.item == null) {
  		$.ajax({
      	    	    url: searchUrl,
      	    	    dataType: "json",
      	    	    data: {
      	    		term: $(this).val(),
      	    		category_id: cat,
      	    		exact: 1
      	    	    },
      	    	    success: function(data) {
  