/**
 *	Class to display a floating tool tip.
 *
 *	@author		Unknown
 *	@version	1.0
 *	@copyright	Katana Productions Pty Ltd 2002
 *
 *	@param	x     The x position of the floating tool tip.
 *	@param	y     The y position of the floating tool tip.
 *	@param	html  The HTML to display in the floating tool tip.
*/
function FloatingToolTip(x, y, html)
{
  this.x = x;
  this.y = y;
  this.html = html;
  this.style = 'floatingMenu';
}

FloatingToolTip.ID = 'floatingtooltip';

/**
 *	Show the floating tool tip.
*/
FloatingToolTip.prototype.show = function(elm)
{
  if (document.all(FloatingToolTip.ID))
  {
    this.hide();
  }
  var html = '<div id="' + FloatingToolTip.ID + '" style="position:absolute;left:' + this.x + 'px;top:' + this.y + 'px;font-weight:normal;background-color:infobackground;border:1px solid black;padding:3px;" class="' + this.style + '" noWrap>' + this.html + '</div>';
  document.body.innerHTML = document.body.innerHTML + html;
  document.body.onclick = this.hide;
}

/**
 *	Hide the floating tool tip.
*/
FloatingToolTip.prototype.hide = function()
{
  document.all(FloatingToolTip.ID).outerHTML = '';
  document.body.onclick = null;
}