function ShowImage(url, target, width, height) {
  l = ((screen.availWidth - width - 10) * .5);
  t = ((screen.availHeight - height - 10) * .5);

  param = 'scrollbars=yes, ' +
          'toolbar=no, ' +
          'location=no, ' +
          'status=yes, ' +
          'menubar=no, ' +
          'resizable=yes, ' +
          'width=' + width + ', ' +
          'height=' + height + ', ' +
          'left=' + l + ', ' +
          'top=' + t;

  Win = window.open(url, 
                    target,
                    param);
  Win.resizeTo(width, height);
  Win.location.href = url;      
  Win.focus();  
}
function OpenNews(url) {

  target = 'news_view';
  width = 600;
  height = 600;
  l = ((screen.availWidth - width - 10) * .5);
  t = ((screen.availHeight - height - 10) * .5);
  param = 'scrollbars=yes, ' +
          'toolbar=no, ' +
          'location=no, ' +
          'status=no, ' +
          'menubar=no, ' +
          'resizable=no, ' +
          'width=' + width + ', ' +
          'height=' + height + ', ' +
          'left=' + l + ', ' +
          'top=' + t;

  Win = window.open('',
                    target,
                    param);
  Win.resizeTo(width, height);
  Win.location.href = url;
  Win.focus();
}

function OpenWindow(url, target, width, height) {

  scrollbars = "yes";
  l = ((screen.availWidth - width - 10) * .5);
  t = ((screen.availHeight - height - 10) * .5);

  if (width > screen.availWidth - 10) {
    width = screen.availWidth - 10;
    scrollbars = "yes";
  }
  if (height > screen.availHeight - 10) {
    height = screen.availHeight - 10;
    scrollbars = "yes";
  }

  param = 'scrollbars=' + scrollbars + ', ' +
          'toolbar=no, ' +
          'location=no, ' +
          'status=no, ' +
          'menubar=no, ' +
          'resizable=no, ' +
          'width=' + width + ', ' +
          'height=' + height + ', ' +
          'left=' + l + ', ' +
          'top=' + t;

  Win = window.open('',
                    target,
                    param);
  Win.resizeTo(width, height);
  Win.location.href = url;
  Win.focus();
}

function OpenWindowResizable (url, target, width, height) {

  scrollbars = "yes";
  l = ((screen.availWidth - width - 10) * .5);
  t = ((screen.availHeight - height - 10) * .5);

  if (width > screen.availWidth - 10) {
    width = screen.availWidth - 10;
    scrollbars = "yes";
  }
  if (height > screen.availHeight - 10) {
    height = screen.availHeight - 10;
    scrollbars = "yes";
  }

  param = 'scrollbars=' + scrollbars + ', ' +
          'toolbar=no, ' +
          'location=no, ' +
          'status=no, ' +
          'menubar=no, ' +
          'resizable=yes, ' +
          'width=' + width + ', ' +
          'height=' + height + ', ' +
          'left=' + l + ', ' +
          'top=' + t;

  Win = window.open('',
                    target,
                    param);
  Win.resizeTo(width, height);
  Win.location.href = url;
  Win.focus();
}