function setOpacity(domId, val) {
	obj = document.getElementById(domId);
	obj.style.MozOpacity = val;
	obj.style.opacity = val/10;
	obj.style.filter = 'alpha(opacity=' + val*10 + ')';
};

function appear(domId){
	obj = document.getElementById(domId); //Get the element
	obj.style.display = 'none';
	
	if(obj.style.display != "none") return false; //Return if it is already being displayed
	obj.style.display = ''; //Un-hide the object before its animation
	var alpha = 0; //Set the initial value of alpha to 0 (invisible)
	
	function a(){ //Internal function
			alpha++; //Increment alpha
			setOpacity(domId, alpha); //Set the opacity of our element to the specified alpha
			if(alpha < 11)setTimeout(a, 100);
			/*Till alpha is 10, keep calling the
			a() function after 100 milliseconds */
}
	
	setTimeout(a, 500); //This is where we call the a() function for the first time
};