﻿<!--
//Displays the tooltip text.
//Control is the control you wish the tooltip text to display next to.
//Title is for the bolded title text of the tooltip.
//Text is for the text of the tooltip.
function showToolTip(control,title,text)
{
                  document.getElementById('tooltipTitle').innerHTML = title;
                  document.getElementById('tooltipText').innerHTML = text;
                  
                  var tooltipPopup = document.getElementById('tooltipPopup');
                  
                  //Determine if the browser supports x and y coordinate properties
                  if (control.x)
                  {
                                 //Assign the offset for the popup
                                 tooltipPopup.style.left =(control.x + control.width)+"px";           
                                                 tooltipPopup.style.top = (control.y - control.height)+"px";          
                  } else {
                                //If the browser doesn't support x/y coordinates, crawl the dom manually
                                var objItem = control;
                                var objParent = null;
                                var intX = 0;
                                var intY = 0;

                                                
                                do
                                  {            // Walk up our document tree until we find the body
                                                // and add the distance from the parent to our counter.
                                                intX += objItem.offsetLeft
                                                 intY += objItem.offsetTop
                                                objParent = objItem.offsetParent.tagName
                                                objItem = objItem.offsetParent
                                } while(objParent != 'BODY')
                   
                                 //Assign the offset for the popup
                                 tooltipPopup.style.top = (intY - control.height)+"px";
                                 tooltipPopup.style.left = (intX + control.width)+"px";
                  }
                  tooltipPopup.style.visibility = "visible";
}

function hideToolTip()
{
                                document.getElementById('tooltipPopup').style.visibility = "hidden";
}
-->
