/***********************************************************
* popup.js - controls popup windows                        *
* © Copyright 43plc 2001                                   *
* Author: Phil Ewington (phil@n-igma.net)                  *
* Last Updated: 09/09/01                                   *
*                                                          *
* Syntax: popit(url,name,width,height,scrollbars,resizable)*
***********************************************************/


function popit(u,n,w,h,s) {

	/* Center the window */
	l = (((screen.availWidth / 2) - (w / 2)) - 12);
	t = ((screen.availHeight / 2) - (h / 2));
	
	/* Netscape does not allow windows to be resized if resizable attribute is not set */
	navigator.appName == 'Netscape' ? r=1 : r=0;

	/* Create string for window features */
	f = 'width='+w+',height='+h+',left='+l+',top='+t+',scrollbars='+s+',resizable=1';

	/* Open new window and give it focus */
	var activeWindow = window.open(u,n,f);
	activeWindow.focus();
}