/*	window_open_popup(url,name,width,height)

 	This script opens a popup window with a speci-
	fied size.

	Version 1.1
	Copyright (C) 2002-2005 by Andreas Strohkirch.
 	All rights reserved.
 
	A LICENCE IS NEEDED FOR USING THIS SOURCE CODE.
	ANY UNAUTHORISED FORM OF DISSEMINATION, COPYING,
	DISCLOSURE, MODIFICATION, DISTRIBUTION, PUBLICA-
	TION AND/OR USE OF THIS SOURCE CODE IS STRICTLY
	PROHIBITED. FOR MORE INFORMATION PLEASE CONTACT 
	ANDREASSTROHKIRCH add WEB dot DE. */

function window_open_popup(str_url,str_name,int_width,int_height)
	{
	// Set window position
	if (parseInt(navigator.appVersion.substring(0,1)) >= 4)
		{
		int_posleft  = (screen.availWidth  - parseInt(int_width)) / 2;
		int_posright = (screen.availHeight - parseInt(int_height))  / 2;
		if (int_posleft < 0)
			{
			int_posleft = 0;
			int_width   = screen.availWidth;
			}
		if (int_posright < 0)
			{
			int_posright = 0;
			int_height   = screen.availHeight;
			}
		}

	// Set window properties
	int_width.toString
	int_height.toString
	str_properties = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + int_width + ",height=" + int_height

	// Open window
	var wnd=window.open('', str_name, str_properties);
	wnd.location.href = str_url;
	if (wnd.opener == null) wnd.opener = self;

	wnd.moveTo(int_posleft,int_posright);
	wnd.focus();
	}
