Assign an ID to it and reference it by the ID:
Code:
<input type=hidden name=flag value=0 id=flag>
<script language=javascript>
/*******************
obj: the ID of the field you want to change
val: the value you want to change it to
*******************/
function changeValue(obj,val)
{
obj.value = val;
}
</script>
HTH,
Snib
<><