// The following emulates the link hover effect of IE in NS.

// var hoverBgColor = "#32CB65";    // Copied from the IE a:hover definition.
var hoverColor   = "#FF8000";

function hover(layer) {

  var link, str;

  // Create a new, child layer by copying the link in this one and changing
  // the background and text colors.

  link = layer.document.links[0];
  str = '<a href="' + link.href + '"';
  if (link.target)
    str += ' target= "' + link.target + '"'
  str += '><font color="' + hoverColor + '">' + link.text + '</font>';

  layer.hoverLayer = new Layer(layer.clip.width, layer);
  layer.hoverLayer.document.open("text/html", "replace");
  layer.hoverLayer.document.write(str);
  layer.hoverLayer.document.close();
//  layer.hoverLayer.bgColor = hoverBgColor;

  // Show the hover layer initially.

  layer.hoverLayer.visibility =  "show";

  // Set up event capturing on this layer to toggle visibilitly of the
  // new layer.

  layer.onMouseOver = hoverOn;
  layer.onMouseOut  = hoverOff;
}

function hoverOn() {

  this.hoverLayer.visibility = "show";
}

function hoverOff() {

  this.hoverLayer.visibility = "hide";
}
