/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Saul Salvatierra :: http://myarea.com.sapo.pt
with help from Ultimater :: http://ultimiacian.tripod.com  */

var theObj="";
var ydist = 0;

// Used for member/guest section text pop-up for client logos (display with mouse at lower left corner)
function toolTip(text,me) {
  ydist = 2;
  theObj=me;
  theObj.onmousemove=updatePos;
  document.getElementById('toolTipBox').innerHTML=text;
  document.getElementById('toolTipBox').style.display="block";
  window.onscroll=updatePos;
}

// Used for homepage insert pop-up (display with mouse at center point)
function toolTip2(text,me) {
  ydist = 202;
  theObj=me;
  theObj.onmousemove=updatePos;
  document.getElementById('toolTipBox').innerHTML=text;
  document.getElementById('toolTipBox').style.display="block";
  window.onscroll=updatePos;
}

function updatePos() {
  var ev=arguments[0]?arguments[0]:event;
  var x=ev.clientX;
  var y=ev.clientY;
  diffX=38;
  diffY=0;
  
  // CHANGED TO document.documentElement WHEN UPDATED TO DOCTYPE 4.01 FOR WIBIYA TOOLBAR!!!!
  var browserName=navigator.appName; 
  if (browserName=="Microsoft Internet Explorer") {
     document.getElementById('toolTipBox').style.top  = y-ydist+diffY+document.documentElement.scrollTop+ "px";
     document.getElementById('toolTipBox').style.left = x-2+diffX+document.documentElement.scrollLeft+"px";
  }
  else {
     document.getElementById('toolTipBox').style.top  = y-ydist+diffY+document.body.scrollTop+ "px";
     document.getElementById('toolTipBox').style.left = x-2+diffX+document.body.scrollLeft+"px";
  }
  theObj.onmouseout=hideMe;
}

function hideMe() {
  document.getElementById('toolTipBox').style.display="none";
}