var shower;
function tooltips(parent,objID,text){
	this.objID 	= 	objID;
	this.text		=	text;
	this.parent 	= 	document.getElementById(parent);
	this.init();
	this.opacity	=	0;
}

tooltips.prototype.init = function(){
	var dd 				= 	document.createElement('div');
	dd.innerHTML		=	this.text;
	dd.style.visibility	=	'visible';
	dd.id				=	this.objID;
	dd.className		=	'help_div';
	dd.style.display 	= 	'none';
	this.parent.appendChild(dd);
}

tooltips.prototype.show = function(){
	this_ = this;
	var obj = document.getElementById(this.objID);
	obj.style.display = 'block';
	//obj.style.opacity = 0;
	//this.opacity = 0;
	clearTimeout(window.shower);
	window.shower = null;
	//add_opacity(this.objID);
}

tooltips.prototype.hide = function(){
	this_ = this;
	document.getElementById(this.objID).style.display = 'none';
	//clearTimeout(window.shower);
	//clearTimeout(window.shower);
	//window.shower = null;
	//remove_opacity(this.objID)
	
}

var opacity = 0;

function add_opacity(objID){
	objID_ = objID;
	var obj = document.getElementById(objID);
	window.shower = setTimeout("add_opacity(objID_)",10);
	if (opacity < 100){
		obj.style.opacity 	= 	'0.' + opacity;
		obj.style.filter 	= 	'alpha(opacity=' + opacity + ')';
		opacity +=2;
		window.shower;
	} else {
		clearTimeout(window.shower);
	}
}

function remove_opacity (objID){
	var obj = document.getElementById(objID);
	this_ = this;
	window.shower = setTimeout("remove_opacity(objID_)",10);
	if (opacity > 0){
		obj.style.opacity 	= 	'0.' + opacity;
		obj.style.filter 	= 	'alpha(opacity=' + opacity + ')';
		opacity -=2;
		window.shower;
	} else {
		obj.style.opacity = '0';
		obj.style.filter = 'alpha(opacity=0)';
		clearTimeout(window.shower);
	}
}
	
