Required Fields - Checkbox should trigger warning that text needs to be entered

Hello, I am hoping someone can help me with the javascript associated with what I am trying to do. I would like to make the text field required when one of the checkboxes are checked. Would anyone be willing to write that for me? I am clueless when it comes to javascript. I have 3 of these to do but hope that getting the script for one will allow me to copy and paste the other two using their field names.
Also, how can I check to make sure I did it correctly? I assume that I would just need to go into the preview and attempt to bypass the text field? Would a warning pop up if I miss the text field?
