Making text appear after javascript function has run

I have the fade in of my image working, and would now like to have text appear after the fade in of the photo.
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.999:opacity;

	// IE/Win
	obj.style.filter = "alpha(opacity:"+opacity+")";
	
	// Safari&lt;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 &lt;= 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.

Have you tried changing the single = to ==