_Eldar_,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.active{
color: #8B4513;
background-color:#00FA9A;
border: solid 1px #8B4513;
padding: 3px
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(function() {
var a = $("a"),
b = $("tr");
a.click(function() {
$(".active").not(this).click();
var a = this.id,
tr = b.filter(function() {
return -1 == this.className.indexOf(a)
});
tr.toggle();
$(this).toggleClass("active")
})
});
</script>
</head>
<body>
<div id="list">
<table>
<tr class='tr_51'><td>510</td><td> </td></tr>
<tr class='tr_55'><td>550</td><td> </td></tr>
<tr class='tr_57'><td>570</td><td> </td></tr>
<tr class='tr_51'><td>510</td><td> </td></tr>
<tr class='tr_61'><td>610</td><td> </td></tr>
<tr class='tr_51'><td>510</td><td> </td></tr>
</table>
<a href='#' id='51'>показать строки только 51</a><br>
<a href='#' id='57'>показать строки только 57</a>
</div>
</body>
</html>