Here's my code:

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");
if (isIE||isNN) whichDog.style.visibility="hidden";
else if (isN4) document.theLayer.visibility="hide";

setting style to hidden gives whichDog.style is "undefined" error. Using alerts i found out that whichDog object is getting set but whichDog.style object is not getting set.

How can i set whichDog.style object?

Thanks.
anubhatia@yahoo.com