function initToolTips()
{
  if(ns4||ns6||ie4||ie8)
  {
    if(ns4) toolTipSTYLE = document.toolTipLayer;
    else if(ns6) toolTipSTYLE = document.getElementById("toolTipLayer").style;
    else if(ie4) toolTipSTYLE = document.all.toolTipLayer.style;
    else if(IE) toolTipSTYLE = document.all.toolTipLayer.style;

    if(ns4) document.captureEvents(Event.MOUSEMOVE);
    else
    {
      toolTipSTYLE.visibility = "visible";
      toolTipSTYLE.display = "none";
    }
    if (!IE) document.captureEvents(Event.MOUSEMOVE)
	document.onmousemove = moveToMouseLoc;
  }
}
function toolTip(msg, fg, bg, l, im)
{
  if(toolTip.arguments.length < 1) // hide
  {
    if(ns4) toolTipSTYLE.visibility = "hidden";
    else toolTipSTYLE.display = "none";
  }
  else // show
  {
    if(!fg) fg = "#777777";
    if(!bg) bg = "#333333";
    if(!l) l = 0;
   lft = l;
	if ( im == "img" ) 
		{
		var msg1 = "<img src='"+msg+"'>";
		}
		else
		{
		var msg1 = msg;
		}



	var content =
    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '"><td>' +
    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + bg + 
    '"><td align="left" class="ToolTip" >' + msg1 +
    '&nbsp\;</font></td></table></td></table>';
    if(ns4)
    {
      toolTipSTYLE.document.write(content);
      toolTipSTYLE.document.close();
      toolTipSTYLE.visibility = "visible";
    }
    if(ns6)
    {
      document.getElementById("toolTipLayer").innerHTML = content;
      toolTipSTYLE.display='block'
    }
    if(ie4||ie8)
    {
      document.all("toolTipLayer").innerHTML=content;
      toolTipSTYLE.display='block'
    }
  }
}
function moveToMouseLoc(e)
{
  if(ns4||ns6)
  {
    x = (e.pageX + 25);
    y = (e.pageY - 250);
  }
  else
  {
    x = ((event.x + document.body.scrollLeft) + 25);
    y = ((event.y + document.body.scrollTop) - 250);
  }
	//var cl = left = (screen.width/2) - cw/2;
	//var ct = (screen.height/2) - ch/2;
	//y = 100;
	//x = 200;


 if (lft == "" ){lft = null;}
 	
  toolTipSTYLE.left = ((x + offsetX) - lft);
  toolTipSTYLE.top = (y + offsetY) ;
  return true;
}

