function checkAll() { var end = document.getElementById("max").value if(end=="0") { end = 0 } else if(end==10) { end = 10 } for(i=0;i