Code:
function showHideField(fieldId)
{
	var obj = getRefById(fieldId);
	obj.style.display = (obj.style.display == 'none')?'inline':'none';
	return true;
}

function getRefById(id)
{
	var ref = (document.getElementById)?document.getElementById(id):
			((document.all)?document.all[id]:((document.layers)?document.layers[id]:null));
	return ref;
}
I call it like

<input type="checkbox" onchange="showHideField('field_id');">

It works in FireFox but not in IE.