//MouseEvent gather same relevant data for multiple browswers
function MouseEvent(e)
{
  if(e) {
    this.e = e;
  }else{
    this.e = window.event;
  }
 
  if(e.pageX) {
    this.x = e.pageX;
  }else{
    this.x = e.clientX;
  }
 
  if(e.pageY) {
    this.y = e.pageY;
  }else{
    this.y = e.clientY;
  }
 
  if(e.target) {
    this.target = e.target;
  }else{
    this.target = e.srcElement;
  }
}

//Get the element that was affected(moused over)
//Get the mouse's x/y coords
function displayToolTip(e,div,msg,xpos,ypos,color)
{
  var e = new MouseEvent(e);
 
  var x = e.x + xpos;
  var y = e.y - ypos;
 
  //place the tootip div nearby where the mouse entered the element
  //and replace the text with the appropriate message
  //then make it visible
  theDiv = document.getElementById(div);
  theDiv.style.left = x + 'px';
  theDiv.style.top = y +'px';
  theDiv.style.color = color;
  theDiv.innerHTML = msg;
  theDiv.style.visibility = "visible";
 
  return false;
}


//hide the tooltip when the mouse leaves the element
//and reset the div's text
function hideTooltip(e)
{
  var e = new MouseEvent(e);
 
  theDiv = document.getElementById("feature_story");
  theDiv.style.visibility = "hidden";
  theDiv.innerHTML = '';
 
  return false;
}
