if (typeof window.onload == 'function') {bpOldOnLoad = window.onload;}
window.onload = function()
{
  if (window.bpOldOnLoad) {bpOldOnLoad();}
  var i = 1, b = xGetElementById('b' + i);
  while (b) {
    b.onmousemove = bpOnMousemove;
    b.onmouseout = bpOnMouseout;
    b = xGetElementById('b' + (++i));
  }
}
function bpOnMousemove(e)
{
  var p, h, x, y, offset = 50; // offset = distance between mouse and right edge of preview
  p = xGetElementById('p' + this.id);
  if (p) {
    p.style.display = 'block';
    e = new xEvent(e);
    x = e.pageX;
    y = e.pageY;
    x -= xWidth(p) + offset; // puts preview left of banner
    h = xHeight(p);
    if (y + h > xScrollTop() + xClientHeight()) {
      y -= h;
    }
    xMoveTo(p, x, y);
  }
}
function bpOnMouseout()
{
  var p = xGetElementById('p' + this.id);
  if (p) p.style.display = 'none';
}


