function show_only_matching() {
  // get form values
  country_code = $("option:selected").val();
  postal_code = $("[name=postal_code]").val().toLowerCase();
  
  // hide all elements
  $("tr").hide();
  // show only matching
  selector = "tr[class^=" + country_code + "_" + postal_code + "]";
  $(selector).show();
  // show the table header
  $("tr:first").show();
  $("tr.noBg").show();
  // show the ZIP field
  $('#content form').children().next().show();
  $('.scroll-active').jScrollPane({showArrows:true, scrollbarWidth: 9, scrollbarMargin: 0});  
}

// when the document is fully loaded
$(document).ready(function() {
	activateDealers();
});

function activateDealers() {
    // disable the form submit
    // (JS is active, so no need for submitting anything)
    $('#content form').submit(function() { return false; })
      .children()
      .next()
      .hide();
    $('tr').hide();
	$('.scroll-active').jScrollPane({showArrows:true, scrollbarWidth: 9, scrollbarMargin: 0})
}
