// Tooltip functions var timerID = 0; var currentTooltip = new Array(); var currentType = new Array(); var tooltipDelay = 1000; //the number of milliseconds before the active tooltip disappears when rolled out var startDelay = 500; //the number of milliseconds before the tooltip displays var hvs; var wvs; var startTime = 0; var z = 100; function showTooltip(theTip,theLink,theType, offX, offY) { var plusX = (offX)? offX:0; var plusY = (offY)? offY:0; var offBot = -5; var offLeft = 0; var xName = "right"; var yName = "bot"; var myLink = document.getElementById(theLink); var myTip = document.getElementById(theTip); var mTipXY = findPos(myLink); var myTipTop = myLink.offsetTop; var myTipLeft = myLink.offsetLeft; var tipHeight = myTip.offsetHeight; var tipWidth = 255 //myTip.offsetWidth; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE hvs = window.innerHeight; wvs = window.innerWidth; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' hvs = document.documentElement.clientHeight; wvs = document.documentElement.clientWidth; } if( (myTipTop + tipHeight) > hvs && myTipTop > (hvs/2)){ offBot = tipHeight-10; yName = "top" } if( (myTipLeft + tipWidth + 20) > wvs){ offLeft = tipWidth+15; xName = "left" } myTip.style.position = "absolute"; myTip.style.zIndex = z; myTip.style.top = myLink.offsetTop - offBot + plusY +"px"; myTip.style.left = myLink.offsetLeft + myLink.offsetWidth - offLeft + plusX + "px"; clearTimeout(startTime); startTime = 0; hideTooltip(); startTime = setTimeout(function(){afterPause(myTip,theTip,theType)}, startDelay); } function afterPause(myTip,theTip,theType){ trackEvent("toolTip",theType); resetTooltipTimer() clearTimeout(startTime); startTime = 0; myTip.style.display = 'block'; var l = currentTooltip.length currentTooltip[l]=theTip; currentType[l]=theType; z++; } function tooltipTimer(){ resetTooltipTimer() clearTimeout(startTime); startTime = 0; timerID = setTimeout("hideTooltip()", tooltipDelay); } function hideTooltip() { for (var i=0;i