<!-- "OverlayWindow" Autor: www.All-Community.de

/***************************************************
** Freigegeben zur privaten Nutzung,              **
** solange Hinweis auf Autor nicht entfernt wird. **
***************************************************/

document.overlayWindows = new Array();

function windowShow() {

  this.style.visibility = 'visible';
  return true;

};

function windowHide() {

  this.style.visibility = 'hidden';
  return true;

};

function windowMove(x, y) {

  this.style.left = x;
  this.style.top = y;
  return true;

};

function windowMoveBy(x, y) {

  this.style.left = this.x() + x;
  this.style.top = this.y() + y;
  return true;

};

function windowResize(width, height) {

  this.style.width = width;
  this.style.height = height;
  return true;

};

function windowResizeBy(width, height) {

  this.style.width = this.width() + width;
  this.style.height = this.height() + height;
  return true;

};

function windowSetContent(content) {

  (document.getElementById(this.id)).innerHTML = content;
  return true;

};

function windowInnerHTML () { return (document.getElementById(this.id)).innerHTML };
function windowX         () { return this.style.left.replace(/\D/g, '') };
function windowY         () { return this.style.top.replace(/\D/g, '') };
function windowWidth     () { return this.style.width.replace(/\D/g, '') };
function windowHeight    () { return this.style.height.replace(/\D/g, '') };

function overlayWindow(width, height, content, style) {

  this.id         = "overlayWindow_"+(document.overlayWindows.length);
  style           = (style != null) ? style : "border: 3px ridge skyblue; background-color: ghostwhite;";

  var p  = '<DIV ID="'+this.id+'" style="width: '+width+'; height: '+height+'; position: absolute; overflow:none; left: 100; top: 100; visibility: hidden; '+style+'">';
      p += content;
      p += '</DIV>\n';

  document.writeln(p);

  this.style = (document.getElementById(this.id)).style;
  document.overlayWindows[document.overlayWindows.length] = this;
  document.overlayWindows[this.id] = this;

};

overlayWindow.prototype.innerHTML   = windowInnerHTML;
overlayWindow.prototype.x           = windowX;
overlayWindow.prototype.y           = windowY;
overlayWindow.prototype.width       = windowWidth;
overlayWindow.prototype.height      = windowHeight;
overlayWindow.prototype.show        = windowShow;
overlayWindow.prototype.hide        = windowHide;
overlayWindow.prototype.move        = windowMove;
overlayWindow.prototype.moveBy      = windowMoveBy;
overlayWindow.prototype.resize      = windowResize;
overlayWindow.prototype.resizeBy    = windowResizeBy;
overlayWindow.prototype.setContent  = windowSetContent;
overlayWindow.prototype.constructor = overlayWindow;
overlayWindow.prototype.all = document.overlayWindows;

// Copyright www.All-Community.de 06/2003 -->

