how to validate a checkbox using javascript