function OpenImage(url) {
  var leftpos = (screen.availWidth / 2) - (512 / 2);
  var toppos = (screen.availHeight / 2) - (384 / 2);

  PopUpWindow = window.open(url, '', 'width=512, height=384, left='+ leftpos +', top='+ toppos +', resizable=1, scrollbars=0');
}

