function WindowOpen (URL, WindowName, x, y, Width, Height, Parameters) {
  var ReturnValue;

  if (Parameters != '') Parameters.concat(',');    /* Syntaxkorrektur */

  if(! window[WindowName] ||								/* Object doesn't exist */
       window[WindowName].closed) {							/* Window is closed     */
    window[WindowName] = window.open (URL, WindowName,
				      Parameters + ',toolbar=no,location=no,menu=no,' +
				      'left=' + (x) + ',top=' + (y) + ',width=' + (Width) + ',height=' + (Height)
				     );
    ReturnValue = true;									/* animation-start-control */
  }
  window[WindowName].focus();

  return (ReturnValue);
}

function WindowAnimationKernel (WindowName, x, y, Width, Height, XStep, YStep, WidthStep, HeightStep, Steps) {
  x	 += XStep;
  y	 += YStep;
  Width  += WidthStep;
  Height += HeightStep;
  window[WindowName].moveTo(x,y);
  window[WindowName].resizeTo(Width,Height);

  Steps--;
  if (Steps) {
    window.setTimeout("WindowAnimationKernel ('" + WindowName + "'," + x + "," + y + "," + Width + "," + Height + "," + XStep + "," + YStep + "," + WidthStep + "," + HeightStep + "," + Steps + ")",10);
  }
  else {
    window[WindowName].focus();
  }
}


function WindowAnimation (URL, WindowName, x, y, EndX, EndY, EndWidth, EndHeight, Speed, Parameters) {
  if (WindowOpen(URL, WindowName, x, y, 100, 100, Parameters)) {
    var Steps	 = Math.ceil(100/Speed);
    var XStep	 = (EndX-x)		/ Steps;
    var YStep	 = (EndY-y)		/ Steps;
    var WidthStep  = (EndWidth -100)	/ Steps;
    var HeightStep = (EndHeight-100)	/ Steps;

    WindowAnimationKernel (WindowName, x, y, 100, 100, XStep, YStep, WidthStep, HeightStep, Steps);
  }
}

