If it's in the same frame, then you can simplify:
parent.topFrame.document.getElementById('lblDNC').style.visibility
to:
document.getElementById('lblDNC').style.visibility

also, read my second edit. I changed the IF to have two ='s