checked=false function selectAll (field) { var aa= document.getElementById('field'); if (checked == false) { checked = true } else { checked = false } for (var i =0; i < aa.elements.length; i++) { aa.elements[i].checked = checked; } } function bgr_color(obj,color) { obj.style.backgroundColor=color } function submitcheck(formObj) { //Only validate if there are fields to validate if (checkOptions = formObj.elements['pro[]']) { if(checkOptions.length) { //chekOptions is an array (i.e. two or more options) for(var i=0; i