<script>
	// this function turns a checkbox into a radio button... sort of
function toggle_%(id)s(visibleCheckbox, hiddenBoolean) {
        vis = document.getElementById(visibleCheckbox);
	hidden = document.getElementById(hiddenBoolean);
        if (vis.checked) {
                hidden.value = 1;
        } else {
                hidden.value = 0;
        }
        return true;
}
</script>
	<div tal:define="val python:request.get('%(id)s', here.%(accessor)s())">
	<input id="%(id)s_hidden" type="hidden" name="%(id)s" value="0" 
	       tal:attributes="value string:$val" />
                <input class="noborder" 
                       type="checkbox" 
		       id="%(id)s_checkbox"
                       name="%(id)s_checkbox"
                       value="on" 
                       tabindex=""
                       onfocus="formtooltip('%(id)s_help',1)" 
                       onblur="formtooltip('%(id)s_help',0)" 
	               onClick="toggle_%(id)s('%(id)s_checkbox', '%(id)s_hidden'); "
                       tal:attributes="tabindex tabindex;
                       	               checked python: val == '1'"
                       />
      </div>

