/**
 * cs_win.js	version 1.0 (09/01/2002)	js 1.2 (screen.width, ...)
 * =========
 * Window utility functions (Netscape 4.x, IE4.x-6.x, Netscape 6+)
 * 
 * Copyright (C) 2001-2002, 
 *           Alexander Khroustalev
 *        =-=-= email: KhroustalevA@netscape.net =-=-=
 *
*/

function openWindow(url, width, height, name, resize, scroll) {
   var posX = 100;
   var posY = 100;

   width  = width  || 600;   
   height = height || 400;
	
   if (parseInt(navigator.appVersion) >= 4) {
      if (screen.width  > width ) posX = (screen.width  - width )/2;
      if (screen.height > height) posY = (screen.height - height)/2;
   }
   win = window.open(url, (name ? name : 'newWindow'), 'status=no,toolbar=no,menubar=no,location=no,scrollbars=' + (scroll ? 'yes' : 'no') + ',width=' + width + ',height=' + height + ',left=' + posX + ',top=' + posY + ',resizeable=' + (resize ? 'yes' : 'no'));
   win.focus();
}
