Image Checkbox Widget: How to extract current state in Javascript