There is no function called getElementByName
. what you need is getElementsByName
which returns an array of all of the elements that have that name. so you can use:
var isSomethingChecked = (document.getElementsByName("koalaCheck")[0].checked ||
document.getElementsByName("kangarooCheck")[0].checked);