

/***********************************************
* Rember Points to using this tooltip 
* make a css class (id) with rtootip name
* must call this js file under body tag

***********************************************/
document.write("<div id='rtooltip' class='txt_main' style='padding-left:5px;'></div>")
var offsetxpoint=-60 //Customize x offset of tooltip
var offsetypoint=20 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var mozilla=document.getElementById
var mmstart
var hideTimeout
var mmHideMenuTimer
var mmDHFlag=false
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["rtooltip"] : document.getElementById? document.getElementById("rtooltip") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function showrtooltip(thetext, thecolor, thewidth)
{
	
positiontip()
hideTimeout=3000
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor="#ffffff"
tipobj.innerHTML=thetext
enabletip=true
return false
}
}

function positiontip(evt){
var e=(evt)?evt:(window.event)?window.event:null;

 // e = window.event;
//var e=window.captureEvents(Event.MOUSEUP)

 
    var cursor = {x:0, y:0};
    if (e.pageX || e.pageY) {
        cursor.x = e.pageX;
        cursor.y = e.pageY;
    } 
    else {
        var de = document.documentElement;
        var b = document.body;
        cursor.x = e.clientX + 
            (de.scrollLeft || b.scrollLeft) - (de.clientLeft || 0);
        cursor.y = e.clientY + 
            (de.scrollTop || b.scrollTop) - (de.clientTop || 0);
    }
    x=cursor.x-150
	y=cursor.y-10
var curX=x
var curY=y
//Find out how close the mouse is to the corner of the window
var rightedge=x
var bottomedge=y

tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.left=curX+offsetypoint+"px"
tipobj.style.visibility="visible"
}

function hidertooltip(){
	
mmstart=new Date()

mmDHFlag = true;
mmHideMenuTimer = setTimeout("mmDoHide()", hideTimeout);

	
}
function mmDoHide() {
	if (!mmDHFlag) return;
	var elapsed = new Date() - mmstart;
	var timeout = hideTimeout;
	if (elapsed < timeout) {
		mmHideMenuTimer = setTimeout("mmDoHide()", timeout+100-elapsed);
		return;
	}
	mmDHFlag = false;
	hideActiveMenus();
	
}
function hideActiveMenus()
{
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}
//document.onmousemove=positiontip

