I followed the tutorial below and got my image fade to work:
http://clagnut.com/sandbox/imagefades/

Now I want to have text become visible once the fade is done. I can't get it to work.

style portion:

.enhanced {
visibility:hidden;
}

javascript functions:

<script language="javascript">
document.write("<style type='text/css'> ##thephoto {visibility:hidden;} </style>");
window.onload = function() {initImage()};
function initImage() {
imageId = 'thephoto';
image = document.getElementById(imageId);
setOpacity(image, 0);
image.style.visibility = 'visible';
fadeIn(imageId,0);
}
function setOpacity(obj, opacity) {
opacity = (opacity == 100)?99.999pacity;

// IE/Win
obj.style.filter = "alpha(opacity:"+opacity+")";

// Safari<1.2, Konqueror
obj.style.KHTMLOpacity = opacity/100;

// Older Mozilla and Firefox
obj.style.MozOpacity = opacity/100;

// Safari 1.2, newer Firefox and Mozilla, CSS3
obj.style.opacity = opacity/100;
}
function fadeIn(objId,opacity) {
if (document.getElementById) {
obj = document.getElementById(objId);
if (opacity <= 100) {
setOpacity(obj, opacity);
opacity += 10;
window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 150);
}
if (opacity = 100) {
textId = 'enhanced';
text = document.getElementById(textId);
text.style.visibility="visible";
}
}
}
</script>

I have added this to the last function:

if (opacity = 100) {
textId = 'enhanced';
text = document.getElementById(textId);
text.style.visibility="visible";
}

But the text appears instantly.