// <![CDATA[
// TOOLTIP - CAUSEMENU //
var offsetxpoint=0 //Customize x offset of tooltip
var offsetypoint=0 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
	var tipobj=document.all? document.all["causeMenuTooltip"] : document.getElementById? document.getElementById("causeMenuTooltip") : ""
function ietruebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function ddrivetip(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
		return false
	}
}
function positiontip(e){
	if (enabletip){
		tipobj.style.left="-220px"
		tipobj.style.top="325px"
		tipobj.style.visibility="visible"
	}
}
function hideddrivetip(){
	if (ns6||ie){
		enabletip=false
		tipobj.style.visibility="hidden"
		tipobj.style.left="-220px"
	}
}
			
// TOOLTIP 2 - HOW TO PARTNER - FLOWCHART //
var offsetxpoint2=-140 //Customize x offset of tooltip
var offsetypoint2=-220 //Customize y offset of tooltip
var ie2=document.all
var ns62=document.getElementById && !document.all
var enabletip2=false
if (ie2||ns62)
	var tipobj2=document.all? document.all["flowchartTooltip"] : document.getElementById? document.getElementById("flowchartTooltip") : ""
function ietruebody2(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function ddrivetip2(thetext, thecolor, thewidth){
	if (ns62||ie2){
		if (typeof thewidth!="undefined") tipobj2.style.width=thewidth+"px"
		if (typeof thecolor!="undefined" && thecolor!="") tipobj2.style.backgroundColor=thecolor
		tipobj2.innerHTML=thetext
		enabletip2=true
		return false
	}
}
function positiontip2(e){
	if (enabletip2){
		var curX2=(ns62)?e.pageX : event.clientX+ietruebody2().scrollLeft;
		var curY2=(ns62)?e.pageY : event.clientY+ietruebody2().scrollTop;
		//Find out how close the mouse is to the corner of the window
		var rightedge2=ie2&&!window.opera? ietruebody2().clientWidth-event.clientX-offsetxpoint2 : window.innerWidth-e.clientX-offsetxpoint2-20
		var bottomedge2=ie2&&!window.opera? ietruebody2().clientHeight-event.clientY-offsetypoint2 : window.innerHeight-e.clientY-offsetypoint2-20					
		var leftedge2=(offsetxpoint2<0)? offsetxpoint2*(-1) : -1000						
		//if the horizontal distance isn't enough to accomodate the width of the context menu
		if (rightedge2<tipobj2.offsetWidth)
			//move the horizontal position of the menu to the left by it's width
			tipobj2.style.left=ie? ietruebody2().scrollLeft+event.clientX-tipobj2.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj2.offsetWidth+"px"
		else if (curX2<leftedge2)
			tipobj2.style.left="5px"
		else
			//position the horizontal position of the menu where the mouse is positioned
			tipobj2.style.left=curX2+offsetxpoint2+"px"
		
		//same concept with the vertical position
		if (bottomedge2<tipobj2.offsetHeight)
			tipobj2.style.top=ie2? ietruebody2().scrollTop+event.clientY-tipobj2.offsetHeight-offsetypoint2+"px" : window.pageYOffset+e.clientY-tipobj2.offsetHeight-offsetypoint2+"px"
		else
			tipobj2.style.top=curY2+offsetypoint2+"px"
			tipobj2.style.visibility="visible"
	}
}
function hideddrivetip2(){
	if (ns62||ie2){
		enabletip2=false
		tipobj2.style.visibility="hidden"
		tipobj2.style.left="-1000px"
		tipobj2.style.backgroundColor=''
		tipobj2.style.width=''
	}
}

// RUN ALL TOOLTIPS //
function runTooltips(e) {
	positiontip(e);
	positiontip2(e);
}
document.onmousemove=runTooltips;
// ]]>