if(document.getElementById(item).checked == true)
You either have an = missing
if(document.getElementById(item).checked === true)
or have unnecessary characters on the end of the test
Thesing == true is pointless as the value you are comparing it to will be converted to true or false if you omit that comparison. Only if you don't want the other value converted to true or false and want to test if it is alreeady true or false is it worth comparing it to true and then you need === in order to do an exact comparison without a conversion.
Similarly == false is also pointless as you can achieve the same result using ! on the front of the other value instead.