Javascript to Show/Hide component based on a field value

This sounds like it belongs in a new thread, but have you checked this:

Perhaps that can be a starting point for you.