/*****************************************************
 * descriptionButton
 * 8/08/2010
 *
 * The Best
 *****************************************************/
	descriptionButton.desc = "";
 
function descriptionButton() {
	this.hideTimer	 = false;
	this.description_button = false;
	this.hideDelay = 500;
	this.lastSRC = null;
}

descriptionButton.prototype.show = function(src,description) {

	if(!this.description_button) {
	this.description_button = document.createElement('DIV');
	this.description_button.id = 'description_button';
	this.description_button.style.background = '#FFFFFF url("/image/description_bouton.gif") no-repeat';
	this.description_button.style.position = 'absolute';
	this.description_button.style.width = '92px';
	this.description_button.style.height = '21px';
	this.description_button.style.zIndex = '140000';
	this.description_button.style.top = '0px';
	this.description_button.style.left = '0px';
	this.description_button.onmouseout = new Function("hideTooltip()");
	this.description_button.onmouseover = function(event) {showTooltip(event,descriptionButton.desc);return false;};
	}

	if (src!==this.lastSRC) {
	this.lastSRC = src;
//	descriptionButton.desc = src.parentNode.getElementsByTagName('DIV')[0].innerHTML;
	descriptionButton.desc = description;
	src.appendChild(this.description_button);
	}
	
	this.description_button.style.display='block';
	if (this.hideTimer) window.clearTimeout(this.hideTimer)
}

descriptionButton.prototype.hide = function(src) {
//	src.onmouseover = new Function("descriptionButton.show('"+src+"')");
	this.hideTimer = window.setTimeout("descriptionButton.hideDescription('" + src + "')", this.hideDelay);
}

descriptionButton.prototype.hideDescription = function(src) {

	//src.removeChild(descriptionButton.description_button);
	descriptionButton.description_button.style.display='none';
}

descriptionButton = new descriptionButton();
