< 4; i++) { for (j = 0; j < 4; j++) { button = getelement(form, i + '_' + j); button.value='X'; } } score = 0; moves = 0; } function getelement(form, name) { var k; var elements = form.elements; for (k = 0; k < elements.length; k++) { if (elements[k].name == name) return elements[k]; } } function toggle(form, x, y) { if (x < 0 || y < 0 || x > max || y > max) { //alert('Ignore (' + x + ',' + y + ')'); return; } name = x + '_' + y; button = getelement(form, name); a = button.value; button.value = '!!!'; //alert(a + ' (' + x + ',' + y + ')') ; button.value = a; if (button.value == 'X') { button.value = '.'; score ++; } else { button.value = 'X'; score --; } }

mganan.com

' rows='12' cols='52'>

mganan.com