var xset=-60
var yset=20
var ie=document.all
var ns6=document.getElementById && !document.all
var tipOn=false
if (ie||ns6)
var tipobj=document.all? document.all["glpop"] : document.getElementById? document.getElementById("glpop") : ""

function getmsg(key){
	switch(key.toLowerCase())
	{
		case 'purchase intention':
		 return '<b>Purchase Intention:</b><i><br>The instruction to the Customer Acquisition Exchange identifying the merchant site you intend to purchase from. This instruction is used to find an exchange partner affiliated with the merchant who\'s referral URL you must use to transact the business.';
		case 'referral url':
		 return '<b>Referral URL:</b><i><br>The link issued to you by your affiliated merchant that directs your prospects to the merchant\'s site. It also identifies you as the referrer earning you commission from any resulting sales.  Referral URLs are used by the Customer Acquisition Exchange to find exchange partners.';
		default:
		 return 'See Glossary link at the top of this screen for more information';
	}
}

function glpop(msg,overide,w){
   if (ns6||ie){
      if (w!=null)tipobj.style.width=w;
      tipobj.innerHTML=(overide!=null)?overide:getmsg(msg);
      tipOn=true;
      return false;
   }
}

function positiontip(e){
   var IEbod=(document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
   if (tipOn){
      var curX=(ns6)?e.pageX : event.x+IEbod.scrollLeft;
      var curY=(ns6)?e.pageY : event.y+IEbod.scrollTop;

      var rightedge=ie&&!window.opera? IEbod.clientWidth-event.clientX-xset : window.innerWidth-e.clientX-xset-20
      var bottomedge=ie&&!window.opera? IEbod.clientHeight-event.clientY-yset : window.innerHeight-e.clientY-yset-20
      var leftedge=(xset<0)? xset*(-1) : -1000

      if (rightedge<tipobj.offsetWidth)  tos.left=ie? IEbod.scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
      else if (curX<leftedge)  tos.left="5px"
      else tos.left=curX+xset+"px"

      if (bottomedge<tipobj.offsetHeight) tos.top=ie? IEbod.scrollTop+event.clientY-tipobj.offsetHeight-yset+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-yset+"px"
      else tos.top=curY+yset+"px"
      tos.visibility="visible"
   }
}

function hideglpop(){
   if (ns6||ie){
      tipOn=false
      tos.visibility="hidden"
      tos.left="-1000px"
   }
}
document.onmousemove=positiontip
var tos=tipobj.style;