var isNN = (document.getElementById || document.all);

function getObj(name)
{
  if (document.getElementById)
  {
    this.obj = document.getElementById(name);
    if(this.obj.style) this.style = this.obj.style;
    else this.style = this.obj;
  }
  else if (document.all)
  {
    this.obj = document.all[name];
    if(this.obj.style) this.style = this.obj.style;
    else this.style = this.obj;
  }
  else if (document.layers)
  {
    this.obj = getObjNN4(document,name);
    this.style = this.obj;
  }
}

/* used internally by getObj() */
function getObjNN4(obj,name)
{
  var x = obj.layers;
  var foundLayer;
  for (var i=0;i<x.length;i++)
  {
    if (x[i].id == name)
       foundLayer = x[i];
    else if (x[i].layers.length)
      var tmp = getObjNN4(x[i],name);
    if (tmp) foundLayer = tmp;
  }
  return foundLayer;
}
// check for access method to elements (depending on browser)
if(document.getElementById || document.all) var isNN = true;

// bind getMouseXY to mousemove event for document, store coords in X and Y
if (!document.all) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMouseXY;
var X = 0;
var Y = 0;

/* grabs mouse coordinates, using different methods depending on browser */
function getMouseXY(e)
{
  if (document.all) // browser is IE compatible
  {
    X = event.clientX;
    Y = event.clientY;
  }
  else // browser is NS4 compatible
  { 
    X = e.pageX;
    Y = e.pageY;
  }
  // catch possible negative values
  if(X < 0){X = 0}
  if(Y < 0){Y = 0}
  return true;
}


function showPop()
{
  
  handle = new getObj('contentBox');
  
  // calculate new left position for content box
  newLeft = 200;
  if(newLeft < 0) newLeft = 0;
  
  // calculate new top position for content box
  newTop = Y - 40;
  
  // fix an IE-specific scrolling problem
  if( navigator.userAgent.match(/msie/i) ) newTop += document.body.scrollTop;
  
  // relocates, resizes, and displays content box
  handle.style.left = newLeft;
  handle.style.top = newTop;
  if(isNN) handle.style.visibility = 'visible';
  else handle.style.visiblity = 'show';
}

/* hides floating content box */
function hidePop()
{
  handle = new getObj('contentBox');
  if(isNN) handle.style.visibility = 'hidden';
  else handle.obj.visibility = 'hide'
}

function arrow_on(whichOne)
{
}
function arrow_off(whichOne)
{
}
function arrow_reverse(whichOne)
{
}
