/************************************************************************************************************
Ajax dynamic list
Copyright (C) September 2005  DTHMLGoodies.com, Alf Magne Kalleland

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

Dhtmlgoodies.com., hereby disclaims all copyright interest in this script
written by Alf Magne Kalleland.

Alf Magne Kalleland, 2006
Owner of DHTMLgoodies.com
	
************************************************************************************************************/	
function showToolTip(e,text, target){
  document.body.style.cursor = 'pointer';
  
	if(document.all)e = event;
	var tgt = document.getElementById(target);
	var obj = document.getElementById('bubble_tooltip');
	obj.innerHTML = text;
	obj.style.display = 'block';
  


function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

  //alert(findPosY(tgt));
	lf = findPosX(tgt) + tgt.offsetWidth + 5;
  tp = findPosY(tgt) + 5;  
   
  //if (navigator.appName == "Microsoft Internet Explorer") {  
  
  obj.style.top = tp + 'px';
  obj.style.left = lf +'px'; 	
}	

function hideToolTip()
{
  document.body.style.cursor = 'default'
	document.getElementById('bubble_tooltip').style.display = 'none';	
}