function selectAll(state,name) { var ids = document.getElementsByName(name); for (var i = 0; i < ids.length; i++) { ids[i].checked = state; } } function selectAllCheckboxByID(state,name,id) { var ids = document.getElementsByName(name); for (var i = 0; i < ids.length; i++) { if(ids[i].id == id) { ids[i].checked = state; } } } function selectAlls(state) { var inputs = document.getElementsByTagName_r("input"); for(var i =0;i<inputs.length;i++) { if(inputs[i].type == "checkbox") { inputs[i].checked =state; } } } function GetRow(oElem) { while (oElem) { if (oElem.tagName.toLowerCase() == "tr" && oElem.parentElement.tagName.toLowerCase() == "tbody") { return oElem; } if (oElem.tagName.toLowerCase() == "table" || oElem.tagName.toLowerCase() == "th") { return false; } oElemoElem = oElem.parentElement; } } function selectRowCheckbox(state) { var row = GetRow(window.event.srcElement); var cells = row.childNodes; for(var i=0;i<cells.length;i++) { var cell = cells[i].childNodes[0]; if(cell.tagName == "INPUT") { cell.checked = state; } } } function selectRadio(name,value) { var radioObject = document.getElementsByName(name); if(value === "") { radioObject[0].checked = true; return; } for (var i = 0; i < radioObject.length; i++) { if(radioObject[i].value == value) { radioObject[i].checked = true; break; } } } function selectCheckbox(name,value) { var checkObject = document.getElementsByName(name); var valuues = value.split(","); for(var j = 0; j < values.length; j++) { for (var i = 0; i < checkObject.length; i++) { if(checkObject[i].value == values[j]) { checkObject[i].checked = true; break; } } } } function selectOption(name,value) { var options = document.getElementsByName(name)[0].options; for (var i = 0; i < options.length; i++) { if(options[i].value === value) { options[i].selected = true; break; } } }