var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
var horizontallocation = 0
var verticallocation = 0
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(obj, thetext, thecolor, thewidth){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true

var offsetxpoint = -35
var offsetypoint = -25 - (8*(thetext.length/18)) //The longer the text, the larger the vertical offset
horizontallocation = 0
verticallocation = 0

coords = findPos(obj)
horizontallocation = coords[0] + offsetxpoint
verticallocation = coords[1] + offsetypoint

return false
}
}

function findPos(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
do {
curleft += obj.offsetLeft;
curtop += obj.offsetTop;
} while (obj = obj.offsetParent);
}
return [curleft,curtop];
}

function positiontip(e){
if (enabletip){
tipobj.style.left=horizontallocation+"px"
tipobj.style.top=verticallocation+"px"
tipobj.style.visibility="visible"
}
}

function hideddrivetip(obj){
if (ns6||ie) {
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}

document.onmousemove=positiontip
