this.onload = function(evt)
{
  zoomLoad(evt);
};

function zoomLoad(evt)
{
  var doc, body, div, a, m, b, s;
  if ((doc = document) && (body = doc.body) && doc.createElement &&
      body.appendChild && (div = doc.createElement("DIV")))
  {
    div.style.background = "#ECE9D8";
    div.style.color = "#000000";
    div.style.position = "absolute";
    div.style.left = "0";
    div.style.top = "0";
    div.style.border = "2px groove";
    div.style.padding = "3px";
    if ((m = document.URL.match(/^([^:\/?#]+:)?(\/\/[^\/?#]*)?([^?#]*)(\?([^#]*))?(#.*)?/)))
    {
      b = m[1] + m[2] + m[3].replace(/[^\/]+$/, "");
      s = 1;
      if (m[5])
        if (m[5].match(/\bstyle=small\b/))
          s = 0;
        else if (m[5].match(/\bstyle=large\b/))
          s = 2;
    }
    if ((a = createZoomButton(div, m[1] + m[2] + m[3] + "?style=small",
        b + "pc/zoom0" + (s == 0 ? "-down" : "") + ".png", "")))
    {
      a.onmouseover = zoomButtonMouseOver;
      a.onmouseout = zoomButtonMouseOut;
    }
    if ((a = createZoomButton(div, m[1] + m[2] + m[3],
        b + "pc/zoom1" + (s == 1 ? "-down" : "") + ".png", "")))
    {
      a.onmouseover = zoomButtonMouseOver;
      a.onmouseout = zoomButtonMouseOut;
    }
    if ((a = createZoomButton(div, m[1] + m[2] + m[3] + "?style=large",
        b + "pc/zoom2" + (s == 2 ? "-down" : "") + ".png", "")))
    {
      a.onmouseover = zoomButtonMouseOver;
      a.onmouseout = zoomButtonMouseOut;
    }
    body.appendChild(div);
  }
  return;
}

function createZoomButton(parent, href, src, alt)
{
  var doc, a, image;
  if (parent && (doc = parent.document || parent.ownerDocument) &&
      doc.createElement && parent.appendChild &&
      (a = doc.createElement("A")))
  {
    a.href= href;
    if (a.appendChild && (image = doc.createElement("IMG")))
    {
      image.src = src;
      image.alt = alt;
      image.style.border = "0 none";
      image["originalSrc"] = src;
      a["image"] = a.appendChild(image);
    }
    return parent.appendChild(a);
  }
  return null;
}

function getTargetElement(evt, tagName)
{
  var e;
  if ((evt || (evt = window.event)) && tagName &&
      (tagName = tagName.toUpperCase()))
    for (e = evt.target || evt.srcElement; e; e = e.parentNode)
      if (e.nodeType == 1 && e.nodeName.toUpperCase() == tagName)
        return e;
  return null;
}

function zoomButtonMouseOver(evt)
{
  var a, image, m, src;
  if ((a = getTargetElement(evt, "A")) && (image = a["image"]) &&
      image["originalSrc"] &&
      (m = image["originalSrc"].match(/^(.*?)(-down)?(\.[^.]*)$/)))
    image.src = m[1] + "-up" + m[3];
  return;
}

function zoomButtonMouseOut(evt)
{
  var a, image;
  if ((a = getTargetElement(evt, "A")) && (image = a["image"]) &&
      image["originalSrc"])
    image.src = image["originalSrc"];
  return;
}

