anchor.diff:                     String checkbox_size_value =  new Integer(selected_matches.size()).toString();
                      
    %>                  
  -     <input type="hidden" name="checkbox_size_name" id="checkbox_size_name" value="<%=checkbox_size_value%>" />
  +     <input type="hidden" name="<%=checkbox_size_name%>" id="<%=checkbox_size_name%>" value="<%=checkbox_size_value%>" />
    <%                  
                      
                      
  
positive.code: 			   var checkbox = document.getElementById(checkbox_name);
  			   if(checkbox != null) {
  			   	checkbox.checked = 1;
  			   }
  			}
  	        }
  	    }
  	}
  
  
negative.code:   <script type="text/javascript">
    
  	function checkAll() {
  	    var size = document.getElementById("size");
        	    var size_str = size.value;
  	    var m = parseInt(size_str);
  	    var i;
  	    var j;
  	    for (i=0; i<m; i++) {
  	        var checkbox_size_name = "checkbox_size_" + i;
  	        if (document.getElementById(checkbox_size_name) != null) {
  			var checkbox_size_value = document.getElementById(checkbox_size_name).value;
  			var n = parseInt(checkbox_size_value);
  