// JavaScript Document

function opencentwin(url, name, width, height) {

var horizontalOffset, verticalOffset, retwin;

  if (width < 1) {
    width = screen.availWidth;
  }
  if (height < 1) {
    height = screen.availHeight;
  }

//  if (navigator.appName == "Microsoft Internet Explorer") {
  if (screen.availWidth > 0) {
    horizontalOffset = (screen.availWidth / 2) - (width / 2);
    verticalOffset = (screen.availHeight / 2) - (height / 2);
  }
  else {
    horizontalOffset = 400 - (width / 2);
    verticalOffset = 300 - (height / 2);
  }

  if (horizontalOffset + width > screen.availWidth || verticalOffset + height > screen.availHeight) {
    horizontalOffset = 0;
    verticalOffset = 0;
  }

  retwin = window.open(url, name, "toolbar=no,location=0,directories=0,status=no,menubar=no,scrollbars=yes,resizable=no,screenX=" + horizontalOffset + ",screenY=" + verticalOffset + ",left=" + horizontalOffset + ",top=" + verticalOffset + ",width=" + width + ",height=" + height);
  return retwin;

}