function neuesFenster(url, wdwidth, wdheight)	{
	msgWindow=window.open(url, "displayWindow", "toolbar=no, scrollbars=yes, directories=no, status=no, copyhistory=no, width="+ wdwidth +", height="+ wdheight +", resizable=yes")
}

function IsNumeric(sText) {
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;


   for (i = 0; i < sText.length && IsNumber == true; i++)
      {
      Char = sText.charAt(i);
      if (ValidChars.indexOf(Char) == -1)
         {
         IsNumber = false;
         }
      }
   return IsNumber;

}

function fitWindow(addWidth, addHeight, imgWidth, imgHeight) {
  if (window.innerWidth){
    iWidth = window.innerWidth;
    iHeight = window.innerHeight;
  }else{
    iWidth = document.body.clientWidth;
    iHeight = document.body.clientHeight;
  }
  iWidth = imgWidth - (iWidth - addWidth);
  iHeight = imgHeight - (iHeight - addHeight);
  window.resizeBy(iWidth, iHeight);
}

function moveFotoViewer() {
  if (window.innerWidth){
    iWidth = window.innerWidth;
    iHeight = window.innerHeight;
  }else{
    iWidth = document.body.clientWidth;
    iHeight = document.body.clientHeight;
  }
  moveWidth = (screen.width/2) - (iWidth/2);
  moveHeight = (screen.height/2) - (iHeight/2);
  //alert(moveWidth+", "+moveHeight);
  window.moveTo(moveWidth, moveHeight);
}
