var bTooltip = 
{
 tip_id : "btooltip",
 makeLayer : function (str)
 {  
  var tip_obj = document.getElementById(this.tip_id);
  if (tip_obj==undefined)
  {
   var tip = document.createElement("div");
   tip.id = this.tip_id;
   tip.style.backgroundColor= "#FFFFE1";
   tip.style.fontFamily= "굴림";
   tip.style.fontSize= "12px";
   tip.style.padding= "2px";
   tip.style.color= "#000";
   tip.style.border= "1px solid #000";
   tip.style.position= "absolute";
   tip.style.zIndex= "99999";
   tip.style.display= "none";
  
   document.body.appendChild(tip);
   tip.appendChild(document.createTextNode(str));
  }
 },
 moveLayer : function (e)
 {
  var xp = 0, yp = 0;
  if (document.all)  
  {
   xp = event.clientX + document.documentElement.scrollLeft;
   yp = event.clientY + document.documentElement.scrollTop;
  }else
  {
   xp = e.pageX; 
   yp = e.pageY; 
  }
  xp += 10;
  yp += 10;
  var tip_obj = document.getElementById(this.tip_id);
  if (tip_obj!=undefined)
  {
   tip_obj.style.top = yp + "px";
   tip_obj.style.left = xp + "px";
   tip_obj.style.display= "block";
  }
 },
 hiddenLyaer : function (e)
 {
  var to = e?e.relatedTarget:event.toElement; 
  var to_id = null;  
  try
  {
   to_id = to.id;
  }
  catch (e)
  {
   to_id = null;
  }
  if (this.tip_id==to_id)
  return;
  if (document.all) 
  {
   try
   {
    document.getElementById(this.tip_id).removeNode(true); 
   }
   catch (e){}   
  }else
  {
   try
   {
    document.body.removeChild(document.getElementById(this.tip_id));
   }
   catch (e){} 
  }
 },
 on : function (tg)
 {
  var de = tg.de;
  var pno = tg.pno;
  var fstr = null;
  tg.de= "";
  tg.pno= "";
  
  GetEGWPara(tg,de,pno);
  
 }
}

function GetEGWPara(tg,de,pno)
{
	var xhr = null;
	var fstr = null;
	if (window.XMLHttpRequest)
	{
		xhr = new XMLHttpRequest();
		if (xhr.overrideMimeType)
			xhr.overrideMimeType('text/xml');
	}
	else if (window.ActiveXObject)
	{
		try
		{
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e1)
		{
			try
			{
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e2) { }
		}
	}
	if (xhr)
	{
		xhr.onreadystatechange = function()
		{
			if (xhr.readyState == 4)
			{
				fstr = xhr.responseText;
				  bTooltip.makeLayer(fstr);
				  tg.onmouseover = new Function("bTooltip.makeLayer('" + fstr + "')");
				  tg.onmousemove = new Function("bTooltip.moveLayer(arguments[0])");
				  tg.onmouseout = new Function("bTooltip.hiddenLyaer(arguments[0])");
			}
		}
		xhr.open("GET", "/EGW/_GetParaProc.php?de=" + de +"&pno=" + pno, true); 
		xhr.send(null);
	}
	
	return fstr;
}
