Here the onClick function handler in the sunroof checkbox is the key ingredient. OnClick also then sends the "check" information via the doorSet(this) parameter to the function doorSet(sunroofField) parameter, thus checking the two-door radio button with the same click. The value of (This) gets passed to (sunroofField). The value of the field onClick is "checked."
Notice that the onClick="doorSet(this)" calls the doorset function and passes it the parameters from this two-door checkbox. The parameter is the value "checked", which is the only value a radio button can have onClick. This "checked" property is then picked up in the "if" statement of the function doorSet.