<tr>
<td align="right" class="lbl"><b id="unitlbl"></b></td>
<td align=left><input type="hidden" name="unittext" id="unittext"></td>
</tr>
<script type="text/javascript"><!--
(document.forms['newticket'].unittext.value == '(%INPUT_c3%)')
//--></script>
More than a couple of problems.
1. This is incomplete...
<input type="hidden" name="unittext" id="unittext">
There is no point to a hidden field if there's no value. There should be a value="" included inside. However this won't solve your problem anyway and I don't think you need a hidden field to do your mod.
2. This won't do anything for two reasons...
(document.forms['newticket'].unittext.value == '(%INPUT_c3%)')
a. %INPUT_c3% is a macro that gets filled in from the URL query string. Unless you bring in your c3 value via the URL, this will always be blank.
b. Incorrect syntax. A double equal sign is used for conditionals. IF a == b, THEN c. If you want to set something to something else, just a single equal sign will do.
To make an input field for c3, you need to NAME it "xunittext". The "value" is the part that the user fills in.
Short of writing this code for you, all I can say is that you're running down the wrong track... but you're learning.
Manually write the code for the input field, xunittext, and then figure out how to toggle its visibility. There are several ways using CSS controlled by Javascript.