function GP_dhtml_support() {
  return (document.layers || 
          document.all || 
          document.getElementById)
}
function GP_dhtml_obj(id) {
  if (document.layers)
    return document.layers[id];
  else if (document.all)
    return document.all[id];
  else if (document.getElementById)
    return document.getElementById(id);
}
function GP_dhtml_style(id) {
  if (document.layers)
    return GP_dhtml_obj(id);
  else if (document.layers || document.getElementById)
    return GP_dhtml_obj(id).style;
}
function GP_dhtml_hide(id) {
  if (GP_dhtml_support())
    GP_dhtml_style(id).visibility = "hidden";
}
function GP_dhtml_show(id) {
  if (GP_dhtml_support())
    GP_dhtml_style(id).visibility = "visible";
}
function GP_dhtml_getX(id) {
  if (GP_dhtml_support())
    if (document.layers || document.getElementById)
      return GP_dhtml_style(id).left;
    else
      return GP_dhtml_style(id).posLeft;
}
function GP_dhtml_getY(id) {
  if (GP_dhtml_support())
    if (document.layers || document.getElementById)
      return GP_dhtml_style(id).top;
    else
      return GP_dhtml_style(id).posTop;
}
function GP_dhtml_setX(id, n) {
  if (GP_dhtml_support())
    if (document.layers)
      GP_dhtml_style(id).left = n;
    else if (document.getElementById)
      GP_dhtml_style(id).left = n + "px";
    else
      GP_dhtml_style(id).posLeft = n + "px";
}
function GP_dhtml_setY(id, n) {
  if (GP_dhtml_support())
    if (document.layers)
      GP_dhtml_style(id).top = n;
    else if (document.getElementById)
      GP_dhtml_style(id).top = n + "px";
    else
      GP_dhtml_style(id).posTop = n + "px";
}
function GP_dhtml_moveTo(id, x, y) {
  if (GP_dhtml_support()) {
    GP_dhtml_setX(id, x);
    GP_dhtml_setY(id, y);
  }
}
function GP_dhtml_moveBy(id, deltaX, deltaY) {
  if (GP_dhtml_support()) {
    var x = parseInt(GP_dhtml_getX(id));
    var y = parseInt(GP_dhtml_getY(id));
    x += deltaX;
    y += deltaY;
    GP_dhtml_setX(id, x);
    GP_dhtml_setY(id, y);
  }
}
function GP_dhtml_text(id, text) {
  if (GP_dhtml_support())
    if (document.layers)
      with (document.layers[id].document) {
        open();
        write(text);
        close();
      }
    else
      GP_dhtml_obj(id).innerHTML = text;
}
function GP_dhtml_breite() {
  if (window.innerWidth)
    return window.innerWidth;
  else if (document.body)
    return document.body.clientWidth;
}
function GP_dhtml_hoehe() {
  if (window.innerHeight)
    return window.innerHeight;
  else if (document.body)
    return document.body.clientHeight;
}
function GP_dhtml_style_breite(id) {
  if (document.layers)
    return GP_dhtml_obj(id).document.width;
  else if (document.all || document.getElementById)
    return GP_dhtml_obj(id).offsetWidth;
}
function GP_dhtml_style_hoehe(id) {
  if (document.layers)
    return GP_dhtml_obj(id).document.height;
  else if (document.all || document.getElementById)
    return GP_dhtml_obj(id).offsetHeight;
}

