//****************************************
//* ToolTip javascript code.
//****************************************
var offsetXPoint=-60
var offsetYPoint=20
var ie=document.all
var ns6=document.getElementById && !document.all
var enableTip=false

if (ie||ns6)
var objToolTip=document.all? document.all["__dnnToolTip"] : document.getElementById? document.getElementById("__dnnToolTip") : ""

//****************************************
//* ShowToolTip - Width and Color are optional.
//****************************************
function ShowToolTip(pText, pColor, pWidth)
{
if (ns6||ie)
{
// Check the length of the tooltip text.
if (pText.length!=0)
{
// Optional width.
if (typeof pWidth!="undefined")
{
objToolTip.style.width=pWidth+"px"
}
// Optional color.
if (typeof pColor!="undefined" && pColor!="")
{
objToolTip.style.backgroundColor=pColor
}
objToolTip.innerHTML=pText
enableTip=true
}
else
{
enableTip=false
}
return false
}
}

function HideToolTip()
{
if (ns6||ie)
{
enableTip=false
objToolTip.style.visibility="hidden"
objToolTip.style.left="-1000px"
objToolTip.style.backgroundColor=''
objToolTip.style.width=''
}
}

function ieTrueBody()
{
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function PositionTip(e)
{
if (enableTip)
{
var curX=(ns6)?e.pageX : event.x+ieTrueBody().scrollLeft;
var curY=(ns6)?e.pageY : event.y+ieTrueBody().scrollTop;
// Find out how close the mouse is to the corner of the window.
var rightedge=ie&&!window.opera? ieTrueBody().clientWidth-event.clientX-offsetXPoint : window.innerWidth-e.clientX-offsetXPoint-20
var bottomedge=ie&&!window.opera? ieTrueBody().clientHeight-event.clientY-offsetYPoint : window.innerHeight-e.clientY-offsetYPoint-20
var leftedge=(offsetXPoint<0)? offsetXPoint*(-1) : -1000

// If the horizontal distance isn't enough to accomodate the width of the context menu.
if (rightedge<objToolTip.offsetWidth)
{
// Move the horizontal position of the menu to the left by it's width.
objToolTip.style.left=ie? ieTrueBody().scrollLeft+event.clientX-objToolTip.offsetWidth+"px" : window.pageXOffset+e.clientX-objToolTip.offsetWidth+"px"
}
else if (curX<leftedge)
{
objToolTip.style.left="5px"
}
else
{
// Position the horizontal position of the menu where the mouse is positioned.
objToolTip.style.left=curX+offsetXPoint+"px"
}

// Same concept with the vertical position.
if (bottomedge<objToolTip.offsetHeight)
{
objToolTip.style.top=ie? ieTrueBody().scrollTop+event.clientY-objToolTip.offsetHeight-offsetYPoint+"px" : window.pageYOffset+e.clientY-objToolTip.offsetHeight-offsetYPoint+"px"
}
else
objToolTip.style.top=curY+offsetYPoint+"px"
objToolTip.style.visibility="visible"
}
}

document.onmousemove=PositionTip