//<![CDATA[
function popupWindow(url, scrollbars, width, height, resize) {
  if (!scrollbars) scrollbars = 'no';
  if (!width) width = 100;
  if (!height) height = 100;
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + scrollbars + ',resizable=yes,copyhistory=no,width=' + width + ',height=' + height + ',screenX=150,screenY=150,top=150,left=150');
  if (resize == true) resize();
}

function resize() {
  var i = 0;
  if (navigator.appName == 'Netscape') i = 40;
  if (document.images[0]) window.resizeTo(document.images[0].width + 50, document.images[0].height + 160 - i);
  self.focus();
}

/*
Auto center window script- Eric King (http://redrival.com/eak/index.shtml)
Permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
var win = null;
function NewWindow(mypage, myname, w, h, settings)
{
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  settings = 'top='+TopPosition+',left='+LeftPosition+','+settings;
  //settings = settings.concat('top=', TopPosition, ',left=', LeftPosition, ',', settings);
  win = window.open(mypage, myname, settings)
}
//]]>
