<!--

// ----------------------------------------------------------------------------
//
// Copyright (C) 2000-2002 Spanner Sofware Ltd
//
// This code is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// version 2.0 as published by the Free Software Foundation. See
// http://www.gnu.org/copyleft/gpl.html for full details.
// 
// This code is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// Please notify us of any improvements by sending them to
// support@spannersoftware.com
// 
// Pop-up dialog functions
// popup.js
// 
// Ref  Date        Author  Action
// 000  28-11-2002  VJS     Created
// 
// ----------------------------------------------------------------------------

function openChild(filename, windowname, width, height, option_list) {
  x = (640 - width)/2, y = (480 - height)/2;
	
	if (screen) {
		y = (screen.availHeight - height)/2;
		x = (screen.availWidth - width)/2;
  }
	
	if (screen.availWidth > 1800) { 
		x = ((screen.availWidth/2) - width)/2;
	}
	
	if (option_list != '') {
	  option_list = ',' + option_list;
	}
	
	childWindow = window.open(filename, windowname, 'resizable=no,width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+option_list);
	if (childWindow.opener == null) childWindow.opener = self;
}

//-->